@react-querybuilder/datetime 8.13.0 → 8.14.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.
Files changed (36) hide show
  1. package/dist/cjs/react-querybuilder_datetime.cjs.development.d.ts +1 -1
  2. package/dist/cjs/react-querybuilder_datetime.cjs.development.date-fns.d.ts +1 -1
  3. package/dist/cjs/react-querybuilder_datetime.cjs.development.dayjs.d.ts +1 -1
  4. package/dist/cjs/react-querybuilder_datetime.cjs.development.jsdate.d.ts +1 -1
  5. package/dist/cjs/react-querybuilder_datetime.cjs.development.luxon.d.ts +1 -1
  6. package/dist/cjs/react-querybuilder_datetime.cjs.production.d.ts +1 -1
  7. package/dist/cjs/react-querybuilder_datetime.cjs.production.date-fns.d.ts +1 -1
  8. package/dist/cjs/react-querybuilder_datetime.cjs.production.dayjs.d.ts +1 -1
  9. package/dist/cjs/react-querybuilder_datetime.cjs.production.jsdate.d.ts +1 -1
  10. package/dist/cjs/react-querybuilder_datetime.cjs.production.luxon.d.ts +1 -1
  11. package/dist/cjs/{types-BWNR3hk5.d.ts → types-B0Eveeq4.d.ts} +9 -9
  12. package/dist/{getDatetimeRuleProcessorSQL-CtUjFtho.js → getDatetimeRuleProcessorSQL-Cxyajj0g.js} +6 -6
  13. package/dist/{getDatetimeRuleProcessorSQL-CtUjFtho.js.map → getDatetimeRuleProcessorSQL-Cxyajj0g.js.map} +1 -1
  14. package/dist/react-querybuilder_datetime.d.mts +1 -1
  15. package/dist/react-querybuilder_datetime.date-fns.d.mts +1 -1
  16. package/dist/react-querybuilder_datetime.dayjs.d.mts +1 -1
  17. package/dist/react-querybuilder_datetime.jsdate.d.mts +1 -1
  18. package/dist/react-querybuilder_datetime.legacy-esm.d.ts +1 -1
  19. package/dist/react-querybuilder_datetime.legacy-esm.date-fns.d.ts +1 -1
  20. package/dist/react-querybuilder_datetime.legacy-esm.date-fns.js +1 -1
  21. package/dist/react-querybuilder_datetime.legacy-esm.dayjs.d.ts +1 -1
  22. package/dist/react-querybuilder_datetime.legacy-esm.dayjs.js +1 -1
  23. package/dist/react-querybuilder_datetime.legacy-esm.js +1 -1
  24. package/dist/react-querybuilder_datetime.legacy-esm.jsdate.d.ts +1 -1
  25. package/dist/react-querybuilder_datetime.legacy-esm.jsdate.js +1 -1
  26. package/dist/react-querybuilder_datetime.legacy-esm.luxon.d.ts +1 -1
  27. package/dist/react-querybuilder_datetime.legacy-esm.luxon.js +1 -1
  28. package/dist/react-querybuilder_datetime.luxon.d.mts +1 -1
  29. package/dist/react-querybuilder_datetime.production.d.mts +1 -1
  30. package/dist/react-querybuilder_datetime.production.date-fns.d.mts +1 -1
  31. package/dist/react-querybuilder_datetime.production.dayjs.d.mts +1 -1
  32. package/dist/react-querybuilder_datetime.production.jsdate.d.mts +1 -1
  33. package/dist/react-querybuilder_datetime.production.luxon.d.mts +1 -1
  34. package/dist/{types-h3_NfrpO.d.ts → types-C-P0L9xh.d.mts} +15 -15
  35. package/dist/{types-BO9Xuapi.d.mts → types-DuaAB95e.d.ts} +15 -15
  36. package/package.json +11 -11
@@ -1,4 +1,4 @@
1
- import { _ as RuleProcessor, a as RQBJsonLogicDateAfter, c as RQBJsonLogicDateIn, d as RQBJsonLogicDateNotOn, f as RQBJsonLogicDateOn, g as ExportOperatorMap, h as RQBJsonLogicDateTimeOperations, i as RQBDateTimeLibraryAPI, l as RQBJsonLogicDateNotBetween, m as RQBJsonLogicDateOnOrBefore, n as IsDateFieldFunction, o as RQBJsonLogicDateBefore, p as RQBJsonLogicDateOnOrAfter, r as RQBDateTimeJsonLogic, s as RQBJsonLogicDateBetween, t as IsDateField, u as RQBJsonLogicDateNotIn, v as ValueProcessorByRule } from "./types-BWNR3hk5.js";
1
+ import { _ as RuleProcessor, a as RQBJsonLogicDateAfter, c as RQBJsonLogicDateIn, d as RQBJsonLogicDateNotOn, f as RQBJsonLogicDateOn, g as ExportOperatorMap, h as RQBJsonLogicDateTimeOperations, i as RQBDateTimeLibraryAPI, l as RQBJsonLogicDateNotBetween, m as RQBJsonLogicDateOnOrBefore, n as IsDateFieldFunction, o as RQBJsonLogicDateBefore, p as RQBJsonLogicDateOnOrAfter, r as RQBDateTimeJsonLogic, s as RQBJsonLogicDateBetween, t as IsDateField, u as RQBJsonLogicDateNotIn, v as ValueProcessorByRule } from "./types-B0Eveeq4.js";
2
2
 
3
3
  //#region src/datetimeRuleProcessorJsonLogic.d.ts
4
4
 
@@ -1,4 +1,4 @@
1
- import { _ as RuleProcessor, h as RQBJsonLogicDateTimeOperations, i as RQBDateTimeLibraryAPI, v as ValueProcessorByRule } from "./types-BWNR3hk5.js";
1
+ import { _ as RuleProcessor, h as RQBJsonLogicDateTimeOperations, i as RQBDateTimeLibraryAPI, v as ValueProcessorByRule } from "./types-B0Eveeq4.js";
2
2
 
3
3
  //#region src/rqbDateTimeLibraryAPI.date-fns.d.ts
4
4
 
@@ -1,4 +1,4 @@
1
- import { _ as RuleProcessor, h as RQBJsonLogicDateTimeOperations, i as RQBDateTimeLibraryAPI, v as ValueProcessorByRule } from "./types-BWNR3hk5.js";
1
+ import { _ as RuleProcessor, h as RQBJsonLogicDateTimeOperations, i as RQBDateTimeLibraryAPI, v as ValueProcessorByRule } from "./types-B0Eveeq4.js";
2
2
 
3
3
  //#region src/rqbDateTimeLibraryAPI.dayjs.d.ts
4
4
 
@@ -1,4 +1,4 @@
1
- import { _ as RuleProcessor, h as RQBJsonLogicDateTimeOperations, i as RQBDateTimeLibraryAPI, v as ValueProcessorByRule } from "./types-BWNR3hk5.js";
1
+ import { _ as RuleProcessor, h as RQBJsonLogicDateTimeOperations, i as RQBDateTimeLibraryAPI, v as ValueProcessorByRule } from "./types-B0Eveeq4.js";
2
2
 
3
3
  //#region src/rqbDateTimeLibraryAPI.jsdate.d.ts
4
4
 
@@ -1,4 +1,4 @@
1
- import { _ as RuleProcessor, h as RQBJsonLogicDateTimeOperations, i as RQBDateTimeLibraryAPI, v as ValueProcessorByRule } from "./types-BWNR3hk5.js";
1
+ import { _ as RuleProcessor, h as RQBJsonLogicDateTimeOperations, i as RQBDateTimeLibraryAPI, v as ValueProcessorByRule } from "./types-B0Eveeq4.js";
2
2
 
3
3
  //#region src/rqbDateTimeLibraryAPI.luxon.d.ts
4
4
 
@@ -1,4 +1,4 @@
1
- import { _ as RuleProcessor, a as RQBJsonLogicDateAfter, c as RQBJsonLogicDateIn, d as RQBJsonLogicDateNotOn, f as RQBJsonLogicDateOn, g as ExportOperatorMap, h as RQBJsonLogicDateTimeOperations, i as RQBDateTimeLibraryAPI, l as RQBJsonLogicDateNotBetween, m as RQBJsonLogicDateOnOrBefore, n as IsDateFieldFunction, o as RQBJsonLogicDateBefore, p as RQBJsonLogicDateOnOrAfter, r as RQBDateTimeJsonLogic, s as RQBJsonLogicDateBetween, t as IsDateField, u as RQBJsonLogicDateNotIn, v as ValueProcessorByRule } from "./types-BWNR3hk5.js";
1
+ import { _ as RuleProcessor, a as RQBJsonLogicDateAfter, c as RQBJsonLogicDateIn, d as RQBJsonLogicDateNotOn, f as RQBJsonLogicDateOn, g as ExportOperatorMap, h as RQBJsonLogicDateTimeOperations, i as RQBDateTimeLibraryAPI, l as RQBJsonLogicDateNotBetween, m as RQBJsonLogicDateOnOrBefore, n as IsDateFieldFunction, o as RQBJsonLogicDateBefore, p as RQBJsonLogicDateOnOrAfter, r as RQBDateTimeJsonLogic, s as RQBJsonLogicDateBetween, t as IsDateField, u as RQBJsonLogicDateNotIn, v as ValueProcessorByRule } from "./types-B0Eveeq4.js";
2
2
 
3
3
  //#region src/datetimeRuleProcessorJsonLogic.d.ts
4
4
 
@@ -1,4 +1,4 @@
1
- import { _ as RuleProcessor, h as RQBJsonLogicDateTimeOperations, i as RQBDateTimeLibraryAPI, v as ValueProcessorByRule } from "./types-BWNR3hk5.js";
1
+ import { _ as RuleProcessor, h as RQBJsonLogicDateTimeOperations, i as RQBDateTimeLibraryAPI, v as ValueProcessorByRule } from "./types-B0Eveeq4.js";
2
2
 
3
3
  //#region src/rqbDateTimeLibraryAPI.date-fns.d.ts
4
4
 
@@ -1,4 +1,4 @@
1
- import { _ as RuleProcessor, h as RQBJsonLogicDateTimeOperations, i as RQBDateTimeLibraryAPI, v as ValueProcessorByRule } from "./types-BWNR3hk5.js";
1
+ import { _ as RuleProcessor, h as RQBJsonLogicDateTimeOperations, i as RQBDateTimeLibraryAPI, v as ValueProcessorByRule } from "./types-B0Eveeq4.js";
2
2
 
3
3
  //#region src/rqbDateTimeLibraryAPI.dayjs.d.ts
4
4
 
@@ -1,4 +1,4 @@
1
- import { _ as RuleProcessor, h as RQBJsonLogicDateTimeOperations, i as RQBDateTimeLibraryAPI, v as ValueProcessorByRule } from "./types-BWNR3hk5.js";
1
+ import { _ as RuleProcessor, h as RQBJsonLogicDateTimeOperations, i as RQBDateTimeLibraryAPI, v as ValueProcessorByRule } from "./types-B0Eveeq4.js";
2
2
 
3
3
  //#region src/rqbDateTimeLibraryAPI.jsdate.d.ts
4
4
 
@@ -1,4 +1,4 @@
1
- import { _ as RuleProcessor, h as RQBJsonLogicDateTimeOperations, i as RQBDateTimeLibraryAPI, v as ValueProcessorByRule } from "./types-BWNR3hk5.js";
1
+ import { _ as RuleProcessor, h as RQBJsonLogicDateTimeOperations, i as RQBDateTimeLibraryAPI, v as ValueProcessorByRule } from "./types-B0Eveeq4.js";
2
2
 
3
3
  //#region src/rqbDateTimeLibraryAPI.luxon.d.ts
4
4
 
@@ -959,7 +959,7 @@ type FlexibleOption<N extends string = string> = Simplify<WithUnknownIndex<Requi
959
959
  *
960
960
  * @group Option Lists
961
961
  */
962
- type ToFlexibleOption<Opt$1 extends BaseOption | string> = WithUnknownIndex<RequireAtLeastOne<Opt$1 extends string ? FlexibleOption<Opt$1> : Opt$1, "name" | "value">>;
962
+ type ToFlexibleOption<Opt extends BaseOption | string> = WithUnknownIndex<RequireAtLeastOne<Opt extends string ? FlexibleOption<Opt> : Opt, "name" | "value">>;
963
963
  /**
964
964
  * A generic {@link Option} requiring both `name` _and_ `value` properties.
965
965
  * Props that extend {@link OptionList} accept {@link BaseOption}, but
@@ -987,24 +987,24 @@ type BaseFullOption<N extends string = string> = Simplify<SetRequired<BaseOption
987
987
  *
988
988
  * @group Option Lists
989
989
  */
990
- type ToFullOption<Opt$1 extends BaseOption> = Opt$1 extends BaseFullOption ? Opt$1 : Opt$1 extends BaseOption<infer IdentifierType> ? WithUnknownIndex<Opt$1 & FullOption<IdentifierType>> : never;
990
+ type ToFullOption<Opt extends BaseOption> = Opt extends BaseFullOption ? Opt : Opt extends BaseOption<infer IdentifierType> ? WithUnknownIndex<Opt & FullOption<IdentifierType>> : never;
991
991
  /**
992
992
  * A group of {@link Option}s, usually within an {@link OptionList}.
993
993
  *
994
994
  * @group Option Lists
995
995
  */
996
- interface OptionGroup<Opt$1 extends BaseOption = FlexibleOption> {
996
+ interface OptionGroup<Opt extends BaseOption = FlexibleOption> {
997
997
  label: string;
998
- options: WithUnknownIndex<Opt$1>[];
998
+ options: WithUnknownIndex<Opt>[];
999
999
  }
1000
1000
  /**
1001
1001
  * A group of {@link BaseOption}s, usually within a {@link FlexibleOptionList}.
1002
1002
  *
1003
1003
  * @group Option Lists
1004
1004
  */
1005
- type FlexibleOptionGroup<Opt$1 extends BaseOption | string = BaseOption> = {
1005
+ type FlexibleOptionGroup<Opt extends BaseOption | string = BaseOption> = {
1006
1006
  label: string;
1007
- options: (Opt$1 extends BaseFullOption ? Opt$1 : ToFlexibleOption<Opt$1>)[];
1007
+ options: (Opt extends BaseFullOption ? Opt : ToFlexibleOption<Opt>)[];
1008
1008
  };
1009
1009
  /**
1010
1010
  * An array of options or option groups, like {@link OptionList} but the option type
@@ -1012,7 +1012,7 @@ type FlexibleOptionGroup<Opt$1 extends BaseOption | string = BaseOption> = {
1012
1012
  *
1013
1013
  * @group Option Lists
1014
1014
  */
1015
- type FlexibleOptionList<Opt$1 extends BaseOption> = ToFlexibleOption<Opt$1>[] | FlexibleOptionGroup<ToFlexibleOption<Opt$1>>[];
1015
+ type FlexibleOptionList<Opt extends BaseOption> = ToFlexibleOption<Opt>[] | FlexibleOptionGroup<ToFlexibleOption<Opt>>[];
1016
1016
  /**
1017
1017
  * An array of options or option groups, like {@link OptionList}, but using
1018
1018
  * {@link FullOption} instead of {@link Option}. This means that every member is
@@ -1020,7 +1020,7 @@ type FlexibleOptionList<Opt$1 extends BaseOption> = ToFlexibleOption<Opt$1>[] |
1020
1020
  *
1021
1021
  * @group Option Lists
1022
1022
  */
1023
- type FullOptionList<Opt$1 extends BaseOption> = Opt$1 extends BaseFullOption ? Opt$1[] | OptionGroup<Opt$1>[] : ToFullOption<Opt$1>[] | OptionGroup<ToFullOption<Opt$1>>[];
1023
+ type FullOptionList<Opt extends BaseOption> = Opt extends BaseFullOption ? Opt[] | OptionGroup<Opt>[] : ToFullOption<Opt>[] | OptionGroup<ToFullOption<Opt>>[];
1024
1024
  //#endregion
1025
1025
  //#region ../core/src/types/ruleGroups.d.ts
1026
1026
  /**
@@ -1749,4 +1749,4 @@ type IsDateFieldFunction = (...[rule, opts]: Parameters<RuleProcessor>) => boole
1749
1749
  type IsDateField = IsDateFieldFunction | Record<string, unknown> | Record<string, unknown>[] | boolean | undefined;
1750
1750
  //#endregion
1751
1751
  export { RuleProcessor as _, RQBJsonLogicDateAfter as a, RQBJsonLogicDateIn as c, RQBJsonLogicDateNotOn as d, RQBJsonLogicDateOn as f, ExportOperatorMap as g, RQBJsonLogicDateTimeOperations as h, RQBDateTimeLibraryAPI as i, RQBJsonLogicDateNotBetween as l, RQBJsonLogicDateOnOrBefore as m, IsDateFieldFunction as n, RQBJsonLogicDateBefore as o, RQBJsonLogicDateOnOrAfter as p, RQBDateTimeJsonLogic as r, RQBJsonLogicDateBetween as s, IsDateField as t, RQBJsonLogicDateNotIn as u, ValueProcessorByRule as v };
1752
- //# sourceMappingURL=types-BWNR3hk5.d.ts.map
1752
+ //# sourceMappingURL=types-B0Eveeq4.d.ts.map
@@ -117,7 +117,7 @@ const getDatetimeRuleProcessorMongoDBQuery = (apiFns) => (rule, options) => {
117
117
  };
118
118
 
119
119
  //#endregion
120
- //#region \0@oxc-project+runtime@0.99.0/helpers/typeof.js
120
+ //#region \0@oxc-project+runtime@0.103.0/helpers/typeof.js
121
121
  function _typeof(o) {
122
122
  "@babel/helpers - typeof";
123
123
  return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(o$1) {
@@ -128,7 +128,7 @@ function _typeof(o) {
128
128
  }
129
129
 
130
130
  //#endregion
131
- //#region \0@oxc-project+runtime@0.99.0/helpers/toPrimitive.js
131
+ //#region \0@oxc-project+runtime@0.103.0/helpers/toPrimitive.js
132
132
  function toPrimitive(t, r) {
133
133
  if ("object" != _typeof(t) || !t) return t;
134
134
  var e = t[Symbol.toPrimitive];
@@ -141,14 +141,14 @@ function toPrimitive(t, r) {
141
141
  }
142
142
 
143
143
  //#endregion
144
- //#region \0@oxc-project+runtime@0.99.0/helpers/toPropertyKey.js
144
+ //#region \0@oxc-project+runtime@0.103.0/helpers/toPropertyKey.js
145
145
  function toPropertyKey(t) {
146
146
  var i = toPrimitive(t, "string");
147
147
  return "symbol" == _typeof(i) ? i : i + "";
148
148
  }
149
149
 
150
150
  //#endregion
151
- //#region \0@oxc-project+runtime@0.99.0/helpers/defineProperty.js
151
+ //#region \0@oxc-project+runtime@0.103.0/helpers/defineProperty.js
152
152
  function _defineProperty(e, r, t) {
153
153
  return (r = toPropertyKey(r)) in e ? Object.defineProperty(e, r, {
154
154
  value: t,
@@ -159,7 +159,7 @@ function _defineProperty(e, r, t) {
159
159
  }
160
160
 
161
161
  //#endregion
162
- //#region \0@oxc-project+runtime@0.99.0/helpers/objectSpread2.js
162
+ //#region \0@oxc-project+runtime@0.103.0/helpers/objectSpread2.js
163
163
  function ownKeys(e, r) {
164
164
  var t = Object.keys(e);
165
165
  if (Object.getOwnPropertySymbols) {
@@ -381,4 +381,4 @@ const getDatetimeRuleProcessorSQL = (apiFns) => (rule, options) => {
381
381
 
382
382
  //#endregion
383
383
  export { getDatetimeValueProcessorOracle as a, defaultDateTimeNLOperatorMap as c, getDatetimeRuleProcessorCEL as d, getDatetimeJsonLogicOperations as f, getDatetimeValueProcessorMySQL as i, getDatetimeRuleProcessorNL as l, processIsDateField as m, getDatetimeValueProcessorANSI as n, getDatetimeValueProcessorPostgreSQL as o, isISOStringDateOnly as p, getDatetimeValueProcessorMSSQL as r, datetimeValueProcessorNL as s, getDatetimeRuleProcessorSQL as t, getDatetimeRuleProcessorMongoDBQuery as u };
384
- //# sourceMappingURL=getDatetimeRuleProcessorSQL-CtUjFtho.js.map
384
+ //# sourceMappingURL=getDatetimeRuleProcessorSQL-Cxyajj0g.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"getDatetimeRuleProcessorSQL-CtUjFtho.js","names":["defaultIsDateField: IsDateFieldFunction","defaultDateTimeNLOperatorMap: ExportOperatorMap","datetimeValueProcessorNL: ValueProcessorByRule"],"sources":["../src/utils.ts","../src/getDatetimeJsonLogicOperations.ts","../src/getDatetimeRuleProcessorCEL.ts","../src/getDatetimeRuleProcessorMongoDBQuery.ts","../src/getDatetimeRuleProcessorNL.ts","../src/getDatetimeRuleProcessorSQL.ts"],"sourcesContent":["import type { RuleProcessor } from 'react-querybuilder';\nimport type { IsDateField, IsDateFieldFunction } from './types';\n\nexport const isISOStringDateOnly = (\n date: unknown\n): date is `${number}${number}${number}${number}-${number}${number}-${number}${number}` =>\n typeof date === 'string' && /^\\d{4}-\\d{2}-\\d{2}$/.test(date);\n\nexport const defaultIsDateField: IsDateFieldFunction = (\n ...[rule, opts]: Parameters<RuleProcessor>\n): boolean =>\n rule.operator !== 'contains' &&\n rule.operator !== 'beginsWith' &&\n rule.operator !== 'endsWith' &&\n rule.operator !== 'doesNotContain' &&\n rule.operator !== 'doesNotBeginWith' &&\n rule.operator !== 'doesNotEndWith' &&\n rule.operator !== 'null' &&\n rule.operator !== 'notNull' &&\n /^(?:date|datetime|datetimeoffset|timestamp)\\b/i.test(opts?.fieldData?.datatype as string);\n\nexport const processIsDateField = (\n isDateField: IsDateField,\n ...[rule, opts]: Parameters<RuleProcessor>\n): boolean => {\n if (typeof isDateField === 'boolean') {\n return isDateField;\n }\n\n if (typeof isDateField === 'function') {\n return isDateField(rule, opts);\n }\n\n if (Array.isArray(isDateField)) {\n return isDateField.some(condition =>\n Object.entries(condition).every(([key, value]) => opts?.fieldData?.[key] === value)\n );\n }\n\n if (typeof isDateField === 'object') {\n return Object.entries(isDateField).every(([key, value]) => opts?.fieldData?.[key] === value);\n }\n\n return defaultIsDateField(rule, opts);\n};\n","import type { RQBDateTimeLibraryAPI, RQBJsonLogicDateTimeOperations } from './types';\n\n/**\n * Custom operations for use with JsonLogic objects generated by\n * {@link datetimeRuleProcessorJsonLogic}.\n */\nexport const getDatetimeJsonLogicOperations = ({\n isAfter,\n isBefore,\n isSame,\n}: RQBDateTimeLibraryAPI): RQBJsonLogicDateTimeOperations => ({\n dateAfter: (a, b) => isAfter(a, b),\n dateBefore: (a, b) => isBefore(a, b),\n dateBetween: (a, b, c) =>\n isSame(b, a) ||\n isSame(b, c) ||\n (isAfter(b, a) && isBefore(b, c)) ||\n (isAfter(b, c) && isBefore(b, a)),\n dateNotBetween: (a, b, c) =>\n !isSame(b, a) &&\n !isSame(b, c) &&\n ((isBefore(a, c) && (isBefore(b, a) || isAfter(b, c))) ||\n (isAfter(a, c) && (isBefore(b, c) || isAfter(b, a)))),\n dateIn: (a, b) => b.some(v => isSame(a, v)),\n dateNotIn: (a, b) => b.every(v => !isSame(a, v)),\n dateNotOn: (a, b) => !isSame(a, b),\n dateOn: (a, b) => isSame(a, b),\n dateOnOrAfter: (a, b) => isAfter(a, b) || isSame(a, b),\n dateOnOrBefore: (a, b) => isBefore(a, b) || isSame(a, b),\n});\n","import type { RuleProcessor } from 'react-querybuilder';\nimport { defaultRuleProcessorCEL, lc, toArray } from 'react-querybuilder';\nimport type { RQBDateTimeLibraryAPI } from './types';\nimport { processIsDateField } from './utils';\n\nconst shouldNegate = (op: string) => /^(does)?not/i.test(op);\n\n/**\n * Generates a rule processor with date/time features for use by\n * {@link @react-querybuilder/core!formatQuery formatQuery} with the \"cel\" format.\n */\nexport const getDatetimeRuleProcessorCEL =\n (apiFns: RQBDateTimeLibraryAPI): RuleProcessor =>\n (rule, options) => {\n const opts = options ?? /* istanbul ignore next */ {};\n const { context = {} } = opts;\n\n if (rule.valueSource === 'field' || !processIsDateField(context.isDateField, rule, opts)) {\n return defaultRuleProcessorCEL(rule, opts);\n }\n\n const ts = (d: string | Date) => `timestamp(\"${apiFns.toISOString(d)}\")`;\n\n const operatorTL = lc(rule.operator.replace(/^=$/, '=='));\n\n switch (operatorTL) {\n case '<':\n case '<=':\n case '==':\n case '!=':\n case '>':\n case '>=':\n return `${rule.field} ${operatorTL} ${ts(rule.value)}`;\n }\n\n const valueAsArray: string[] = toArray(rule.value, { retainEmptyStrings: false });\n const valueAsDateArray = valueAsArray\n .map(v => apiFns.toDate(v))\n .filter(dateVal => apiFns.isValid(dateVal));\n\n switch (operatorTL) {\n case 'in':\n case 'notin': {\n if (valueAsDateArray.length === 0) return '';\n const [prefix, suffix] = shouldNegate(operatorTL) ? ['!(', ')'] : ['', ''];\n return `${prefix}${rule.field} in [${valueAsDateArray\n .map(val => ts(val))\n .join(', ')}]${suffix}`;\n }\n\n case 'between':\n case 'notbetween': {\n if (valueAsDateArray.length < 2) return '';\n const [first, second] = valueAsDateArray;\n const [firstDate, secondDate] = apiFns.isBefore(first, second)\n ? [first, second]\n : [second, first];\n return operatorTL === 'between'\n ? `(${rule.field} >= ${ts(firstDate)} && ${rule.field} <= ${ts(secondDate)})`\n : `(${rule.field} < ${ts(firstDate)} || ${rule.field} > ${ts(secondDate)})`;\n }\n }\n\n return defaultRuleProcessorCEL(rule, opts);\n };\n","import type { RuleProcessor } from 'react-querybuilder';\nimport { defaultRuleProcessorMongoDBQuery, mongoOperators, toArray } from 'react-querybuilder';\nimport type { RQBDateTimeLibraryAPI } from './types';\nimport { processIsDateField } from './utils';\n\n/**\n * Generates a rule processor with date/time features for use by\n * {@link @react-querybuilder/core!formatQuery formatQuery} with the \"mongodb_query\" format.\n */\nexport const getDatetimeRuleProcessorMongoDBQuery =\n (apiFns: RQBDateTimeLibraryAPI): RuleProcessor =>\n (rule, options) => {\n const opts = options ?? /* istanbul ignore next */ {};\n const { field, operator, value, valueSource } = rule;\n\n if (valueSource === 'field' || !processIsDateField(opts.context?.isDateField, rule, opts)) {\n return defaultRuleProcessorMongoDBQuery(rule, opts);\n }\n\n if (operator === '=') {\n return { [field]: apiFns.toDate(value) };\n }\n\n switch (operator) {\n case '<':\n case '<=':\n case '!=':\n case '>':\n case '>=':\n return { [field]: { [mongoOperators[operator]]: apiFns.toDate(value) } };\n }\n\n const valueAsArray: string[] = toArray(rule.value, { retainEmptyStrings: false });\n const valueAsDateArray = valueAsArray\n .map(v => apiFns.toDate(v))\n .filter(dateVal => apiFns.isValid(dateVal));\n\n switch (operator) {\n case 'in':\n case 'notIn':\n return { [field]: { [mongoOperators[operator]]: valueAsDateArray } };\n\n case 'between':\n case 'notBetween': {\n if (valueAsDateArray.length < 2) return '';\n const [first, second] = valueAsDateArray;\n const orderedArray = apiFns.isBefore(first, second) ? [first, second] : [second, first];\n return operator === 'between'\n ? { [field]: { $gte: orderedArray[0], $lte: orderedArray[1] } }\n : {\n $or: [{ [field]: { $lt: orderedArray[0] } }, { [field]: { $gt: orderedArray[1] } }],\n };\n }\n }\n\n return defaultRuleProcessorMongoDBQuery(rule, opts);\n };\n","import type { ExportOperatorMap, RuleProcessor, ValueProcessorByRule } from 'react-querybuilder';\nimport {\n defaultOperatorProcessorNL,\n defaultRuleProcessorNL,\n getQuotedFieldName,\n lc,\n normalizeConstituentWordOrder,\n toArray,\n} from 'react-querybuilder';\nimport type { RQBDateTimeLibraryAPI } from './types';\nimport { isISOStringDateOnly, processIsDateField } from './utils';\n\nexport const defaultDateTimeNLOperatorMap: ExportOperatorMap = {\n // '=': 'is',\n // '!=': 'is not',\n '<': 'is before',\n '>': 'is after',\n '<=': 'is on or before',\n '>=': 'is on or after',\n in: ['is one of the dates', 'is the same as a date in'],\n notin: ['is not one of the dates', 'is not the same as any date in'],\n between: ['is between', 'is between the dates in'],\n notbetween: ['is not between', 'is not between the dates in'],\n};\n\n/**\n * Generates a value processor with date/time features for use by\n * {@link @react-querybuilder/core!formatQuery formatQuery} with the \"natural_language\" format.\n */\nexport const datetimeValueProcessorNL: ValueProcessorByRule = (rule, opts) => {\n if (isISOStringDateOnly(opts?.context?.originalValue)) {\n return new Intl.DateTimeFormat(opts?.context?.locales, {\n dateStyle: 'full',\n ...opts?.context?.dateFormat,\n }).format(rule.value);\n }\n return new Intl.DateTimeFormat(opts?.context?.locales, {\n dateStyle: 'full',\n timeStyle: 'long',\n ...opts?.context?.dateTimeFormat,\n }).format(rule.value);\n};\n\n/**\n * Generates a rule processor with date/time features for use by {@link @react-querybuilder/core!formatQuery formatQuery} with\n * the \"natural_language\" format.\n */\nexport const getDatetimeRuleProcessorNL =\n (apiFns: RQBDateTimeLibraryAPI): RuleProcessor =>\n (rule, options) => {\n const opts = options ?? /* istanbul ignore next */ {};\n const operatorLowerCase = lc(rule.operator);\n let finalValue = '';\n\n // istanbul ignore next\n const {\n fieldData,\n quoteFieldNamesWith = ['', ''] as [string, string],\n fieldIdentifierSeparator = '',\n operatorProcessor = defaultOperatorProcessorNL,\n // valueProcessor = datetimeValueProcessorNL,\n wordOrder = 'SVO',\n context = {},\n operatorMap = defaultDateTimeNLOperatorMap,\n } = opts;\n\n if (!processIsDateField(context.isDateField, rule, opts)) {\n return defaultRuleProcessorNL(rule, opts);\n }\n\n if (rule.valueSource === 'field') {\n return defaultRuleProcessorNL(rule, { ...opts, operatorMap: defaultDateTimeNLOperatorMap });\n }\n\n if (\n (operatorLowerCase === 'in' ||\n operatorLowerCase === 'notin' ||\n operatorLowerCase === 'between' ||\n operatorLowerCase === 'notbetween') &&\n !rule.value\n ) {\n return '';\n }\n\n const valueAsArray: string[] = toArray(rule.value, { retainEmptyStrings: false });\n const valueAsDateArray = valueAsArray\n .map((v): [string, Date] => [v, apiFns.toDate(v)])\n .filter(v => apiFns.isValid(v[1]));\n\n switch (operatorLowerCase) {\n case 'in':\n case 'notin':\n {\n if (valueAsDateArray.length === 0) return '';\n finalValue = `(${valueAsDateArray\n .map(value =>\n datetimeValueProcessorNL(\n { field: rule.field, operator: '=', value: value[1] },\n { ...opts, context: { ...context, originalValue: value[0] } }\n )\n )\n .join(', ')})`;\n }\n break;\n\n case 'between':\n case 'notbetween':\n {\n if (valueAsDateArray.length < 2) return '';\n const [first, second] = valueAsDateArray;\n const orderedArray = apiFns.isBefore(first[1], second[1])\n ? [first, second]\n : [second, first];\n finalValue = orderedArray\n .map(([originalValue, value]) =>\n datetimeValueProcessorNL(\n { field: rule.field, operator: '=', value },\n { ...opts, context: { ...context, originalValue } }\n )\n )\n .join(` ${opts.translations?.and ?? 'and'} `);\n }\n break;\n\n default: {\n const [originalValue, value] = valueAsDateArray[0] ?? ['', ''];\n finalValue = originalValue\n ? datetimeValueProcessorNL(\n { field: rule.field, operator: '=', value },\n { ...opts, context: { ...context, originalValue } }\n )\n : '';\n }\n }\n\n const processedField = getQuotedFieldName(fieldData?.label ?? rule.field, {\n quoteFieldNamesWith,\n fieldIdentifierSeparator,\n });\n\n const processedOperator = operatorProcessor(rule, {\n ...opts,\n operatorMap: { ...defaultDateTimeNLOperatorMap, ...operatorMap },\n });\n\n const wordOrderMap = {\n S: processedField,\n V: processedOperator,\n O: finalValue,\n };\n\n return normalizeConstituentWordOrder(wordOrder)\n .map(term => `${wordOrderMap[term]}`)\n .join(' ')\n .trim();\n };\n","import type { RuleProcessor, SQLPreset, ValueProcessorByRule } from 'react-querybuilder';\nimport {\n defaultRuleProcessorSQL,\n defaultValueProcessorByRule,\n getQuotedFieldName,\n lc,\n mapSQLOperator,\n toArray,\n} from 'react-querybuilder';\nimport type { RQBDateTimeLibraryAPI } from './types';\nimport { isISOStringDateOnly, processIsDateField } from './utils';\n\n/**\n * Generates a value processor with date/time features for use by\n * {@link @react-querybuilder/core!formatQuery formatQuery} with the \"sql\" format and \"ansi\" preset.\n */\nexport const getDatetimeValueProcessorANSI =\n ({ toISOStringDateOnly, toISOString }: RQBDateTimeLibraryAPI): ValueProcessorByRule =>\n (rule, opts) => {\n if (isISOStringDateOnly(opts?.context?.originalValue)) {\n return defaultValueProcessorByRule({ ...rule, value: toISOStringDateOnly(rule.value) }, opts);\n }\n return defaultValueProcessorByRule({ ...rule, value: toISOString(rule.value as Date) }, opts);\n };\n\n/**\n * Generates a value processor with date/time features for use by {@link @react-querybuilder/core!formatQuery formatQuery} with\n * the \"sql\" format and \"mssql\" preset.\n */\nexport const getDatetimeValueProcessorMSSQL =\n ({ toISOStringDateOnly, toISOString }: RQBDateTimeLibraryAPI): ValueProcessorByRule =>\n (rule, opts) => {\n const datatype = /^(?:small)?datetime/i.test(opts?.fieldData?.datatype as string)\n ? 'datetimeoffset'\n : 'date';\n const value =\n datatype === 'datetimeoffset' ? toISOString(rule.value) : toISOStringDateOnly(rule.value);\n return defaultValueProcessorByRule(\n { ...rule, value },\n { ...opts, wrapValueWith: [`cast(`, ` as ${datatype})`] }\n );\n };\n\n/**\n * Generates a value processor with date/time features for use by {@link @react-querybuilder/core!formatQuery formatQuery} with\n * the \"sql\" format and \"mysql\" preset.\n */\nexport const getDatetimeValueProcessorMySQL =\n ({ toISOStringDateOnly, toISOString }: RQBDateTimeLibraryAPI): ValueProcessorByRule =>\n (rule, opts) => {\n const datatype = /^(?:datetime|timestamp)/i.test(opts?.fieldData?.datatype as string)\n ? 'datetime'\n : 'date';\n const value =\n datatype === 'datetime' ? toISOString(rule.value) : toISOStringDateOnly(rule.value);\n return defaultValueProcessorByRule(\n { ...rule, value },\n { ...opts, wrapValueWith: [`cast(`, ` as ${datatype})`] }\n );\n };\n\n/**\n * Generates a value processor with date/time features for use by {@link @react-querybuilder/core!formatQuery formatQuery} with\n * the \"sql\" format and \"oracle\" preset.\n */\nexport const getDatetimeValueProcessorOracle =\n ({ toISOStringDateOnly, toISOString }: RQBDateTimeLibraryAPI): ValueProcessorByRule =>\n (rule, opts) => {\n // Oracle date format for _reading_ ISO 8601: 'YYYY-MM-DD\"T\"HH24:MI:SS.ff3\"Z\"'\n const datatype = /^timestamp/i.test(opts?.fieldData?.datatype as string) ? 'timestamp' : 'date';\n const value =\n datatype === 'timestamp'\n ? toISOString(rule.value).replaceAll('T', ' ').replace('Z', ' UTC')\n : toISOStringDateOnly(rule.value);\n return defaultValueProcessorByRule(\n { ...rule, value },\n { ...opts, wrapValueWith: [datatype, ``] }\n );\n };\n\n/**\n * Generates a value processor with date/time features for use by {@link @react-querybuilder/core!formatQuery formatQuery} with\n * the \"sql\" format and \"postgresql\" preset.\n */\nexport const getDatetimeValueProcessorPostgreSQL =\n ({ toISOStringDateOnly, toISOString }: RQBDateTimeLibraryAPI): ValueProcessorByRule =>\n (rule, opts) => {\n const datatype = /^timestamp/i.test(opts?.fieldData?.datatype as string) ? 'timestamp' : 'date';\n const value =\n datatype === 'timestamp' ? toISOString(rule.value) : toISOStringDateOnly(rule.value);\n return defaultValueProcessorByRule(\n { ...rule, value },\n { ...opts, wrapValueWith: [datatype, ``] }\n );\n };\n\nconst presetToValueProcessorMap = {\n ansi: getDatetimeValueProcessorANSI,\n mssql: getDatetimeValueProcessorMSSQL,\n mysql: getDatetimeValueProcessorMySQL,\n oracle: getDatetimeValueProcessorOracle,\n postgresql: getDatetimeValueProcessorPostgreSQL,\n sqlite: getDatetimeValueProcessorANSI,\n} satisfies Record<SQLPreset, (apiFns: RQBDateTimeLibraryAPI) => ValueProcessorByRule>;\n\n/**\n * Generates a rule processor with date/time features for use by {@link @react-querybuilder/core!formatQuery formatQuery} with\n * the \"sql\" format.\n */\nexport const getDatetimeRuleProcessorSQL =\n (apiFns: RQBDateTimeLibraryAPI): RuleProcessor =>\n (rule, options) => {\n const opts = options ?? /* istanbul ignore next */ {};\n const operator = mapSQLOperator(rule.operator);\n const operatorLowerCase = lc(operator);\n // istanbul ignore next\n const {\n quoteFieldNamesWith = ['', ''] as [string, string],\n fieldIdentifierSeparator = '',\n context = {},\n } = opts;\n let finalValue = '';\n\n if (rule.valueSource === 'field' || !processIsDateField(context.isDateField, rule, opts)) {\n return defaultRuleProcessorSQL(rule, opts);\n }\n\n const valueProcessor = presetToValueProcessorMap[opts.preset!](apiFns);\n\n const valueAsArray: string[] = toArray(rule.value, { retainEmptyStrings: false });\n const valueAsDateArray = valueAsArray\n .map((v): [string, Date] => [v, apiFns.toDate(v)])\n .filter(v => apiFns.isValid(v[1]));\n\n switch (operatorLowerCase) {\n case 'in':\n case 'not in':\n {\n if (valueAsDateArray.length === 0) return '';\n finalValue = `(${valueAsDateArray\n .map(value =>\n valueProcessor(\n { field: rule.field, operator: '=', value: value[1] },\n { ...opts, context: { originalValue: value[0] } }\n )\n )\n .join(', ')})`;\n }\n break;\n\n case 'between':\n case 'not between':\n {\n if (valueAsDateArray.length < 2) return '';\n const [first, second] = valueAsDateArray;\n const orderedArray = apiFns.isBefore(first[1], second[1])\n ? [first, second]\n : [second, first];\n finalValue = orderedArray\n .map(([originalValue, value]) =>\n valueProcessor(\n { field: rule.field, operator: '=', value },\n { ...opts, context: { originalValue } }\n )\n )\n .join(' and ');\n }\n break;\n\n default: {\n const [originalValue, value] = valueAsDateArray[0] ?? ['', ''];\n finalValue = valueProcessor(\n { field: rule.field, operator: '=', value },\n { ...opts, context: { originalValue } }\n );\n }\n }\n\n return `${getQuotedFieldName(rule.field, { quoteFieldNamesWith, fieldIdentifierSeparator })} ${operator} ${finalValue}`.trim();\n };\n"],"mappings":";;;AAGA,MAAa,uBACX,SAEA,OAAO,SAAS,YAAY,sBAAsB,KAAK,KAAK;AAE9D,MAAaA,sBACX,GAAG,CAAC,MAAM,UAEV;;aAAK,aAAa,cAClB,KAAK,aAAa,gBAClB,KAAK,aAAa,cAClB,KAAK,aAAa,oBAClB,KAAK,aAAa,sBAClB,KAAK,aA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AS,EAAE,eAAe,MAAM,IAAI,IAChD,CACF,CACA,KAAK,KAAK,CAAC;AAEhB;EAEF,KAAK;EACL,KAAK;GACH;AACE,QAAI,iBAAiB,SAAS,EAAG,QAAO;IACxC,MAAM,CAAC,OAAO,UAAU;AAIxB,kBAHqB,OAAO,SAAS,MAAM,IAAI,OAAO,GAAG,GACrD,CAAC,OAAO,OAAO,GACf,CAAC,QAAQ,MAAM,EAEhB,KAAK,CAAC,eAAe,WACpB,eACE;KAAE,OAAO,KAAK;KAAO,UAAU;KAAK;KAAO,oCACtC,aAAM,SAAS,EAAE,eAAe,IACtC,CACF,CACA,KAAK,QAAQ;;AAElB;EAEF,SAAS;;GACP,MAAM,CAAC,eAAe,+BAAS,iBAAiB,qEAAM,CAAC,IAAI,GAAG;AAC9D,gBAAa,eACX;IAAE,OAAO,KAAK;IAAO,UAAU;IAAK;IAAO,oCACtC,aAAM,SAAS,EAAE,eAAe,IACtC;;;AAIL,QAAO,GAAG,mBAAmB,KAAK,OAAO;EAAE;EAAqB;EAA0B,CAAC,CAAC,GAAG,SAAS,GAAG,aAAa,MAAM"}
1
+ {"version":3,"file":"getDatetimeRuleProcessorSQL-Cxyajj0g.js","names":["defaultIsDateField: IsDateFieldFunction","defaultDateTimeNLOperatorMap: ExportOperatorMap","datetimeValueProcessorNL: ValueProcessorByRule"],"sources":["../src/utils.ts","../src/getDatetimeJsonLogicOperations.ts","../src/getDatetimeRuleProcessorCEL.ts","../src/getDatetimeRuleProcessorMongoDBQuery.ts","../src/getDatetimeRuleProcessorNL.ts","../src/getDatetimeRuleProcessorSQL.ts"],"sourcesContent":["import type { RuleProcessor } from 'react-querybuilder';\nimport type { IsDateField, IsDateFieldFunction } from './types';\n\nexport const isISOStringDateOnly = (\n date: unknown\n): date is `${number}${number}${number}${number}-${number}${number}-${number}${number}` =>\n typeof date === 'string' && /^\\d{4}-\\d{2}-\\d{2}$/.test(date);\n\nexport const defaultIsDateField: IsDateFieldFunction = (\n ...[rule, opts]: Parameters<RuleProcessor>\n): boolean =>\n rule.operator !== 'contains' &&\n rule.operator !== 'beginsWith' &&\n rule.operator !== 'endsWith' &&\n rule.operator !== 'doesNotContain' &&\n rule.operator !== 'doesNotBeginWith' &&\n rule.operator !== 'doesNotEndWith' &&\n rule.operator !== 'null' &&\n rule.operator !== 'notNull' &&\n /^(?:date|datetime|datetimeoffset|timestamp)\\b/i.test(opts?.fieldData?.datatype as string);\n\nexport const processIsDateField = (\n isDateField: IsDateField,\n ...[rule, opts]: Parameters<RuleProcessor>\n): boolean => {\n if (typeof isDateField === 'boolean') {\n return isDateField;\n }\n\n if (typeof isDateField === 'function') {\n return isDateField(rule, opts);\n }\n\n if (Array.isArray(isDateField)) {\n return isDateField.some(condition =>\n Object.entries(condition).every(([key, value]) => opts?.fieldData?.[key] === value)\n );\n }\n\n if (typeof isDateField === 'object') {\n return Object.entries(isDateField).every(([key, value]) => opts?.fieldData?.[key] === value);\n }\n\n return defaultIsDateField(rule, opts);\n};\n","import type { RQBDateTimeLibraryAPI, RQBJsonLogicDateTimeOperations } from './types';\n\n/**\n * Custom operations for use with JsonLogic objects generated by\n * {@link datetimeRuleProcessorJsonLogic}.\n */\nexport const getDatetimeJsonLogicOperations = ({\n isAfter,\n isBefore,\n isSame,\n}: RQBDateTimeLibraryAPI): RQBJsonLogicDateTimeOperations => ({\n dateAfter: (a, b) => isAfter(a, b),\n dateBefore: (a, b) => isBefore(a, b),\n dateBetween: (a, b, c) =>\n isSame(b, a) ||\n isSame(b, c) ||\n (isAfter(b, a) && isBefore(b, c)) ||\n (isAfter(b, c) && isBefore(b, a)),\n dateNotBetween: (a, b, c) =>\n !isSame(b, a) &&\n !isSame(b, c) &&\n ((isBefore(a, c) && (isBefore(b, a) || isAfter(b, c))) ||\n (isAfter(a, c) && (isBefore(b, c) || isAfter(b, a)))),\n dateIn: (a, b) => b.some(v => isSame(a, v)),\n dateNotIn: (a, b) => b.every(v => !isSame(a, v)),\n dateNotOn: (a, b) => !isSame(a, b),\n dateOn: (a, b) => isSame(a, b),\n dateOnOrAfter: (a, b) => isAfter(a, b) || isSame(a, b),\n dateOnOrBefore: (a, b) => isBefore(a, b) || isSame(a, b),\n});\n","import type { RuleProcessor } from 'react-querybuilder';\nimport { defaultRuleProcessorCEL, lc, toArray } from 'react-querybuilder';\nimport type { RQBDateTimeLibraryAPI } from './types';\nimport { processIsDateField } from './utils';\n\nconst shouldNegate = (op: string) => /^(does)?not/i.test(op);\n\n/**\n * Generates a rule processor with date/time features for use by\n * {@link @react-querybuilder/core!formatQuery formatQuery} with the \"cel\" format.\n */\nexport const getDatetimeRuleProcessorCEL =\n (apiFns: RQBDateTimeLibraryAPI): RuleProcessor =>\n (rule, options) => {\n const opts = options ?? /* istanbul ignore next */ {};\n const { context = {} } = opts;\n\n if (rule.valueSource === 'field' || !processIsDateField(context.isDateField, rule, opts)) {\n return defaultRuleProcessorCEL(rule, opts);\n }\n\n const ts = (d: string | Date) => `timestamp(\"${apiFns.toISOString(d)}\")`;\n\n const operatorTL = lc(rule.operator.replace(/^=$/, '=='));\n\n switch (operatorTL) {\n case '<':\n case '<=':\n case '==':\n case '!=':\n case '>':\n case '>=':\n return `${rule.field} ${operatorTL} ${ts(rule.value)}`;\n }\n\n const valueAsArray: string[] = toArray(rule.value, { retainEmptyStrings: false });\n const valueAsDateArray = valueAsArray\n .map(v => apiFns.toDate(v))\n .filter(dateVal => apiFns.isValid(dateVal));\n\n switch (operatorTL) {\n case 'in':\n case 'notin': {\n if (valueAsDateArray.length === 0) return '';\n const [prefix, suffix] = shouldNegate(operatorTL) ? ['!(', ')'] : ['', ''];\n return `${prefix}${rule.field} in [${valueAsDateArray\n .map(val => ts(val))\n .join(', ')}]${suffix}`;\n }\n\n case 'between':\n case 'notbetween': {\n if (valueAsDateArray.length < 2) return '';\n const [first, second] = valueAsDateArray;\n const [firstDate, secondDate] = apiFns.isBefore(first, second)\n ? [first, second]\n : [second, first];\n return operatorTL === 'between'\n ? `(${rule.field} >= ${ts(firstDate)} && ${rule.field} <= ${ts(secondDate)})`\n : `(${rule.field} < ${ts(firstDate)} || ${rule.field} > ${ts(secondDate)})`;\n }\n }\n\n return defaultRuleProcessorCEL(rule, opts);\n };\n","import type { RuleProcessor } from 'react-querybuilder';\nimport { defaultRuleProcessorMongoDBQuery, mongoOperators, toArray } from 'react-querybuilder';\nimport type { RQBDateTimeLibraryAPI } from './types';\nimport { processIsDateField } from './utils';\n\n/**\n * Generates a rule processor with date/time features for use by\n * {@link @react-querybuilder/core!formatQuery formatQuery} with the \"mongodb_query\" format.\n */\nexport const getDatetimeRuleProcessorMongoDBQuery =\n (apiFns: RQBDateTimeLibraryAPI): RuleProcessor =>\n (rule, options) => {\n const opts = options ?? /* istanbul ignore next */ {};\n const { field, operator, value, valueSource } = rule;\n\n if (valueSource === 'field' || !processIsDateField(opts.context?.isDateField, rule, opts)) {\n return defaultRuleProcessorMongoDBQuery(rule, opts);\n }\n\n if (operator === '=') {\n return { [field]: apiFns.toDate(value) };\n }\n\n switch (operator) {\n case '<':\n case '<=':\n case '!=':\n case '>':\n case '>=':\n return { [field]: { [mongoOperators[operator]]: apiFns.toDate(value) } };\n }\n\n const valueAsArray: string[] = toArray(rule.value, { retainEmptyStrings: false });\n const valueAsDateArray = valueAsArray\n .map(v => apiFns.toDate(v))\n .filter(dateVal => apiFns.isValid(dateVal));\n\n switch (operator) {\n case 'in':\n case 'notIn':\n return { [field]: { [mongoOperators[operator]]: valueAsDateArray } };\n\n case 'between':\n case 'notBetween': {\n if (valueAsDateArray.length < 2) return '';\n const [first, second] = valueAsDateArray;\n const orderedArray = apiFns.isBefore(first, second) ? [first, second] : [second, first];\n return operator === 'between'\n ? { [field]: { $gte: orderedArray[0], $lte: orderedArray[1] } }\n : {\n $or: [{ [field]: { $lt: orderedArray[0] } }, { [field]: { $gt: orderedArray[1] } }],\n };\n }\n }\n\n return defaultRuleProcessorMongoDBQuery(rule, opts);\n };\n","import type { ExportOperatorMap, RuleProcessor, ValueProcessorByRule } from 'react-querybuilder';\nimport {\n defaultOperatorProcessorNL,\n defaultRuleProcessorNL,\n getQuotedFieldName,\n lc,\n normalizeConstituentWordOrder,\n toArray,\n} from 'react-querybuilder';\nimport type { RQBDateTimeLibraryAPI } from './types';\nimport { isISOStringDateOnly, processIsDateField } from './utils';\n\nexport const defaultDateTimeNLOperatorMap: ExportOperatorMap = {\n // '=': 'is',\n // '!=': 'is not',\n '<': 'is before',\n '>': 'is after',\n '<=': 'is on or before',\n '>=': 'is on or after',\n in: ['is one of the dates', 'is the same as a date in'],\n notin: ['is not one of the dates', 'is not the same as any date in'],\n between: ['is between', 'is between the dates in'],\n notbetween: ['is not between', 'is not between the dates in'],\n};\n\n/**\n * Generates a value processor with date/time features for use by\n * {@link @react-querybuilder/core!formatQuery formatQuery} with the \"natural_language\" format.\n */\nexport const datetimeValueProcessorNL: ValueProcessorByRule = (rule, opts) => {\n if (isISOStringDateOnly(opts?.context?.originalValue)) {\n return new Intl.DateTimeFormat(opts?.context?.locales, {\n dateStyle: 'full',\n ...opts?.context?.dateFormat,\n }).format(rule.value);\n }\n return new Intl.DateTimeFormat(opts?.context?.locales, {\n dateStyle: 'full',\n timeStyle: 'long',\n ...opts?.context?.dateTimeFormat,\n }).format(rule.value);\n};\n\n/**\n * Generates a rule processor with date/time features for use by {@link @react-querybuilder/core!formatQuery formatQuery} with\n * the \"natural_language\" format.\n */\nexport const getDatetimeRuleProcessorNL =\n (apiFns: RQBDateTimeLibraryAPI): RuleProcessor =>\n (rule, options) => {\n const opts = options ?? /* istanbul ignore next */ {};\n const operatorLowerCase = lc(rule.operator);\n let finalValue = '';\n\n // istanbul ignore next\n const {\n fieldData,\n quoteFieldNamesWith = ['', ''] as [string, string],\n fieldIdentifierSeparator = '',\n operatorProcessor = defaultOperatorProcessorNL,\n // valueProcessor = datetimeValueProcessorNL,\n wordOrder = 'SVO',\n context = {},\n operatorMap = defaultDateTimeNLOperatorMap,\n } = opts;\n\n if (!processIsDateField(context.isDateField, rule, opts)) {\n return defaultRuleProcessorNL(rule, opts);\n }\n\n if (rule.valueSource === 'field') {\n return defaultRuleProcessorNL(rule, { ...opts, operatorMap: defaultDateTimeNLOperatorMap });\n }\n\n if (\n (operatorLowerCase === 'in' ||\n operatorLowerCase === 'notin' ||\n operatorLowerCase === 'between' ||\n operatorLowerCase === 'notbetween') &&\n !rule.value\n ) {\n return '';\n }\n\n const valueAsArray: string[] = toArray(rule.value, { retainEmptyStrings: false });\n const valueAsDateArray = valueAsArray\n .map((v): [string, Date] => [v, apiFns.toDate(v)])\n .filter(v => apiFns.isValid(v[1]));\n\n switch (operatorLowerCase) {\n case 'in':\n case 'notin':\n {\n if (valueAsDateArray.length === 0) return '';\n finalValue = `(${valueAsDateArray\n .map(value =>\n datetimeValueProcessorNL(\n { field: rule.field, operator: '=', value: value[1] },\n { ...opts, context: { ...context, originalValue: value[0] } }\n )\n )\n .join(', ')})`;\n }\n break;\n\n case 'between':\n case 'notbetween':\n {\n if (valueAsDateArray.length < 2) return '';\n const [first, second] = valueAsDateArray;\n const orderedArray = apiFns.isBefore(first[1], second[1])\n ? [first, second]\n : [second, first];\n finalValue = orderedArray\n .map(([originalValue, value]) =>\n datetimeValueProcessorNL(\n { field: rule.field, operator: '=', value },\n { ...opts, context: { ...context, originalValue } }\n )\n )\n .join(` ${opts.translations?.and ?? 'and'} `);\n }\n break;\n\n default: {\n const [originalValue, value] = valueAsDateArray[0] ?? ['', ''];\n finalValue = originalValue\n ? datetimeValueProcessorNL(\n { field: rule.field, operator: '=', value },\n { ...opts, context: { ...context, originalValue } }\n )\n : '';\n }\n }\n\n const processedField = getQuotedFieldName(fieldData?.label ?? rule.field, {\n quoteFieldNamesWith,\n fieldIdentifierSeparator,\n });\n\n const processedOperator = operatorProcessor(rule, {\n ...opts,\n operatorMap: { ...defaultDateTimeNLOperatorMap, ...operatorMap },\n });\n\n const wordOrderMap = {\n S: processedField,\n V: processedOperator,\n O: finalValue,\n };\n\n return normalizeConstituentWordOrder(wordOrder)\n .map(term => `${wordOrderMap[term]}`)\n .join(' ')\n .trim();\n };\n","import type { RuleProcessor, SQLPreset, ValueProcessorByRule } from 'react-querybuilder';\nimport {\n defaultRuleProcessorSQL,\n defaultValueProcessorByRule,\n getQuotedFieldName,\n lc,\n mapSQLOperator,\n toArray,\n} from 'react-querybuilder';\nimport type { RQBDateTimeLibraryAPI } from './types';\nimport { isISOStringDateOnly, processIsDateField } from './utils';\n\n/**\n * Generates a value processor with date/time features for use by\n * {@link @react-querybuilder/core!formatQuery formatQuery} with the \"sql\" format and \"ansi\" preset.\n */\nexport const getDatetimeValueProcessorANSI =\n ({ toISOStringDateOnly, toISOString }: RQBDateTimeLibraryAPI): ValueProcessorByRule =>\n (rule, opts) => {\n if (isISOStringDateOnly(opts?.context?.originalValue)) {\n return defaultValueProcessorByRule({ ...rule, value: toISOStringDateOnly(rule.value) }, opts);\n }\n return defaultValueProcessorByRule({ ...rule, value: toISOString(rule.value as Date) }, opts);\n };\n\n/**\n * Generates a value processor with date/time features for use by {@link @react-querybuilder/core!formatQuery formatQuery} with\n * the \"sql\" format and \"mssql\" preset.\n */\nexport const getDatetimeValueProcessorMSSQL =\n ({ toISOStringDateOnly, toISOString }: RQBDateTimeLibraryAPI): ValueProcessorByRule =>\n (rule, opts) => {\n const datatype = /^(?:small)?datetime/i.test(opts?.fieldData?.datatype as string)\n ? 'datetimeoffset'\n : 'date';\n const value =\n datatype === 'datetimeoffset' ? toISOString(rule.value) : toISOStringDateOnly(rule.value);\n return defaultValueProcessorByRule(\n { ...rule, value },\n { ...opts, wrapValueWith: [`cast(`, ` as ${datatype})`] }\n );\n };\n\n/**\n * Generates a value processor with date/time features for use by {@link @react-querybuilder/core!formatQuery formatQuery} with\n * the \"sql\" format and \"mysql\" preset.\n */\nexport const getDatetimeValueProcessorMySQL =\n ({ toISOStringDateOnly, toISOString }: RQBDateTimeLibraryAPI): ValueProcessorByRule =>\n (rule, opts) => {\n const datatype = /^(?:datetime|timestamp)/i.test(opts?.fieldData?.datatype as string)\n ? 'datetime'\n : 'date';\n const value =\n datatype === 'datetime' ? toISOString(rule.value) : toISOStringDateOnly(rule.value);\n return defaultValueProcessorByRule(\n { ...rule, value },\n { ...opts, wrapValueWith: [`cast(`, ` as ${datatype})`] }\n );\n };\n\n/**\n * Generates a value processor with date/time features for use by {@link @react-querybuilder/core!formatQuery formatQuery} with\n * the \"sql\" format and \"oracle\" preset.\n */\nexport const getDatetimeValueProcessorOracle =\n ({ toISOStringDateOnly, toISOString }: RQBDateTimeLibraryAPI): ValueProcessorByRule =>\n (rule, opts) => {\n // Oracle date format for _reading_ ISO 8601: 'YYYY-MM-DD\"T\"HH24:MI:SS.ff3\"Z\"'\n const datatype = /^timestamp/i.test(opts?.fieldData?.datatype as string) ? 'timestamp' : 'date';\n const value =\n datatype === 'timestamp'\n ? toISOString(rule.value).replaceAll('T', ' ').replace('Z', ' UTC')\n : toISOStringDateOnly(rule.value);\n return defaultValueProcessorByRule(\n { ...rule, value },\n { ...opts, wrapValueWith: [datatype, ``] }\n );\n };\n\n/**\n * Generates a value processor with date/time features for use by {@link @react-querybuilder/core!formatQuery formatQuery} with\n * the \"sql\" format and \"postgresql\" preset.\n */\nexport const getDatetimeValueProcessorPostgreSQL =\n ({ toISOStringDateOnly, toISOString }: RQBDateTimeLibraryAPI): ValueProcessorByRule =>\n (rule, opts) => {\n const datatype = /^timestamp/i.test(opts?.fieldData?.datatype as string) ? 'timestamp' : 'date';\n const value =\n datatype === 'timestamp' ? toISOString(rule.value) : toISOStringDateOnly(rule.value);\n return defaultValueProcessorByRule(\n { ...rule, value },\n { ...opts, wrapValueWith: [datatype, ``] }\n );\n };\n\nconst presetToValueProcessorMap = {\n ansi: getDatetimeValueProcessorANSI,\n mssql: getDatetimeValueProcessorMSSQL,\n mysql: getDatetimeValueProcessorMySQL,\n oracle: getDatetimeValueProcessorOracle,\n postgresql: getDatetimeValueProcessorPostgreSQL,\n sqlite: getDatetimeValueProcessorANSI,\n} satisfies Record<SQLPreset, (apiFns: RQBDateTimeLibraryAPI) => ValueProcessorByRule>;\n\n/**\n * Generates a rule processor with date/time features for use by {@link @react-querybuilder/core!formatQuery formatQuery} with\n * the \"sql\" format.\n */\nexport const getDatetimeRuleProcessorSQL =\n (apiFns: RQBDateTimeLibraryAPI): RuleProcessor =>\n (rule, options) => {\n const opts = options ?? /* istanbul ignore next */ {};\n const operator = mapSQLOperator(rule.operator);\n const operatorLowerCase = lc(operator);\n // istanbul ignore next\n const {\n quoteFieldNamesWith = ['', ''] as [string, string],\n fieldIdentifierSeparator = '',\n context = {},\n } = opts;\n let finalValue = '';\n\n if (rule.valueSource === 'field' || !processIsDateField(context.isDateField, rule, opts)) {\n return defaultRuleProcessorSQL(rule, opts);\n }\n\n const valueProcessor = presetToValueProcessorMap[opts.preset!](apiFns);\n\n const valueAsArray: string[] = toArray(rule.value, { retainEmptyStrings: false });\n const valueAsDateArray = valueAsArray\n .map((v): [string, Date] => [v, apiFns.toDate(v)])\n .filter(v => apiFns.isValid(v[1]));\n\n switch (operatorLowerCase) {\n case 'in':\n case 'not in':\n {\n if (valueAsDateArray.length === 0) return '';\n finalValue = `(${valueAsDateArray\n .map(value =>\n valueProcessor(\n { field: rule.field, operator: '=', value: value[1] },\n { ...opts, context: { originalValue: value[0] } }\n )\n )\n .join(', ')})`;\n }\n break;\n\n case 'between':\n case 'not between':\n {\n if (valueAsDateArray.length < 2) return '';\n const [first, second] = valueAsDateArray;\n const orderedArray = apiFns.isBefore(first[1], second[1])\n ? [first, second]\n : [second, first];\n finalValue = orderedArray\n .map(([originalValue, value]) =>\n valueProcessor(\n { field: rule.field, operator: '=', value },\n { ...opts, context: { originalValue } }\n )\n )\n .join(' and ');\n }\n break;\n\n default: {\n const [originalValue, value] = valueAsDateArray[0] ?? ['', ''];\n finalValue = valueProcessor(\n { field: rule.field, operator: '=', value },\n { ...opts, context: { originalValue } }\n );\n }\n }\n\n return `${getQuotedFieldName(rule.field, { quoteFieldNamesWith, fieldIdentif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AE,CAAC,CAAC,CACjD,QAAO,MAAK,OAAO,QAAQ,EAAE,GAAG,CAAC;AAEpC,SAAQ,mBAAR;EACE,KAAK;EACL,KAAK;AAED,OAAI,iBAAiB,WAAW,EAAG,QAAO;AAC1C,gBAAa,IAAI,iBACd,KAAI,UACH,eACE;IAAE,OAAO,KAAK;IAAO,UAAU;IAAK,OAAO,MAAM;IAAI,oCAChD,aAAM,SAAS,EAAE,eAAe,MAAM,IAAI,IAChD,CACF,CACA,KAAK,KAAK,CAAC;AAEhB;EAEF,KAAK;EACL,KAAK;GACH;AACE,QAAI,iBAAiB,SAAS,EAAG,QAAO;IACxC,MAAM,CAAC,OAAO,UAAU;AAIxB,kBAHqB,OAAO,SAAS,MAAM,IAAI,OAAO,GAAG,GACrD,CAAC,OAAO,OAAO,GACf,CAAC,QAAQ,MAAM,EAEhB,KAAK,CAAC,eAAe,WACpB,eACE;KAAE,OAAO,KAAK;KAAO,UAAU;KAAK;KAAO,oCACtC,aAAM,SAAS,EAAE,eAAe,IACtC,CACF,CACA,KAAK,QAAQ;;AAElB;EAEF,SAAS;;GACP,MAAM,CAAC,eAAe,+BAAS,iBAAiB,qEAAM,CAAC,IAAI,GAAG;AAC9D,gBAAa,eACX;IAAE,OAAO,KAAK;IAAO,UAAU;IAAK;IAAO,oCACtC,aAAM,SAAS,EAAE,eAAe,IACtC;;;AAIL,QAAO,GAAG,mBAAmB,KAAK,OAAO;EAAE;EAAqB;EAA0B,CAAC,CAAC,GAAG,SAAS,GAAG,aAAa,MAAM"}
@@ -1,4 +1,4 @@
1
- import { _ as RuleProcessor, a as RQBJsonLogicDateAfter, c as RQBJsonLogicDateIn, d as RQBJsonLogicDateNotOn, f as RQBJsonLogicDateOn, g as ExportOperatorMap, h as RQBJsonLogicDateTimeOperations, i as RQBDateTimeLibraryAPI, l as RQBJsonLogicDateNotBetween, m as RQBJsonLogicDateOnOrBefore, n as IsDateFieldFunction, o as RQBJsonLogicDateBefore, p as RQBJsonLogicDateOnOrAfter, r as RQBDateTimeJsonLogic, s as RQBJsonLogicDateBetween, t as IsDateField, u as RQBJsonLogicDateNotIn, v as ValueProcessorByRule } from "./types-BO9Xuapi.mjs";
1
+ import { _ as RuleProcessor, a as RQBJsonLogicDateAfter, c as RQBJsonLogicDateIn, d as RQBJsonLogicDateNotOn, f as RQBJsonLogicDateOn, g as ExportOperatorMap, h as RQBJsonLogicDateTimeOperations, i as RQBDateTimeLibraryAPI, l as RQBJsonLogicDateNotBetween, m as RQBJsonLogicDateOnOrBefore, n as IsDateFieldFunction, o as RQBJsonLogicDateBefore, p as RQBJsonLogicDateOnOrAfter, r as RQBDateTimeJsonLogic, s as RQBJsonLogicDateBetween, t as IsDateField, u as RQBJsonLogicDateNotIn, v as ValueProcessorByRule } from "./types-C-P0L9xh.mjs";
2
2
 
3
3
  //#region src/datetimeRuleProcessorJsonLogic.d.ts
4
4
 
@@ -1,4 +1,4 @@
1
- import { _ as RuleProcessor, h as RQBJsonLogicDateTimeOperations, i as RQBDateTimeLibraryAPI, v as ValueProcessorByRule } from "./types-BO9Xuapi.mjs";
1
+ import { _ as RuleProcessor, h as RQBJsonLogicDateTimeOperations, i as RQBDateTimeLibraryAPI, v as ValueProcessorByRule } from "./types-C-P0L9xh.mjs";
2
2
 
3
3
  //#region src/rqbDateTimeLibraryAPI.date-fns.d.ts
4
4
 
@@ -1,4 +1,4 @@
1
- import { _ as RuleProcessor, h as RQBJsonLogicDateTimeOperations, i as RQBDateTimeLibraryAPI, v as ValueProcessorByRule } from "./types-BO9Xuapi.mjs";
1
+ import { _ as RuleProcessor, h as RQBJsonLogicDateTimeOperations, i as RQBDateTimeLibraryAPI, v as ValueProcessorByRule } from "./types-C-P0L9xh.mjs";
2
2
 
3
3
  //#region src/rqbDateTimeLibraryAPI.dayjs.d.ts
4
4
 
@@ -1,4 +1,4 @@
1
- import { _ as RuleProcessor, h as RQBJsonLogicDateTimeOperations, i as RQBDateTimeLibraryAPI, v as ValueProcessorByRule } from "./types-BO9Xuapi.mjs";
1
+ import { _ as RuleProcessor, h as RQBJsonLogicDateTimeOperations, i as RQBDateTimeLibraryAPI, v as ValueProcessorByRule } from "./types-C-P0L9xh.mjs";
2
2
 
3
3
  //#region src/rqbDateTimeLibraryAPI.jsdate.d.ts
4
4
 
@@ -1,4 +1,4 @@
1
- import { _ as RuleProcessor, a as RQBJsonLogicDateAfter, c as RQBJsonLogicDateIn, d as RQBJsonLogicDateNotOn, f as RQBJsonLogicDateOn, g as ExportOperatorMap, h as RQBJsonLogicDateTimeOperations, i as RQBDateTimeLibraryAPI, l as RQBJsonLogicDateNotBetween, m as RQBJsonLogicDateOnOrBefore, n as IsDateFieldFunction, o as RQBJsonLogicDateBefore, p as RQBJsonLogicDateOnOrAfter, r as RQBDateTimeJsonLogic, s as RQBJsonLogicDateBetween, t as IsDateField, u as RQBJsonLogicDateNotIn, v as ValueProcessorByRule } from "./types-h3_NfrpO.js";
1
+ import { _ as RuleProcessor, a as RQBJsonLogicDateAfter, c as RQBJsonLogicDateIn, d as RQBJsonLogicDateNotOn, f as RQBJsonLogicDateOn, g as ExportOperatorMap, h as RQBJsonLogicDateTimeOperations, i as RQBDateTimeLibraryAPI, l as RQBJsonLogicDateNotBetween, m as RQBJsonLogicDateOnOrBefore, n as IsDateFieldFunction, o as RQBJsonLogicDateBefore, p as RQBJsonLogicDateOnOrAfter, r as RQBDateTimeJsonLogic, s as RQBJsonLogicDateBetween, t as IsDateField, u as RQBJsonLogicDateNotIn, v as ValueProcessorByRule } from "./types-DuaAB95e.js";
2
2
 
3
3
  //#region src/datetimeRuleProcessorJsonLogic.d.ts
4
4
 
@@ -1,4 +1,4 @@
1
- import { _ as RuleProcessor, h as RQBJsonLogicDateTimeOperations, i as RQBDateTimeLibraryAPI, v as ValueProcessorByRule } from "./types-h3_NfrpO.js";
1
+ import { _ as RuleProcessor, h as RQBJsonLogicDateTimeOperations, i as RQBDateTimeLibraryAPI, v as ValueProcessorByRule } from "./types-DuaAB95e.js";
2
2
 
3
3
  //#region src/rqbDateTimeLibraryAPI.date-fns.d.ts
4
4
 
@@ -1,4 +1,4 @@
1
- import { a as getDatetimeValueProcessorOracle, d as getDatetimeRuleProcessorCEL, f as getDatetimeJsonLogicOperations, i as getDatetimeValueProcessorMySQL, l as getDatetimeRuleProcessorNL, n as getDatetimeValueProcessorANSI, o as getDatetimeValueProcessorPostgreSQL, p as isISOStringDateOnly, r as getDatetimeValueProcessorMSSQL, t as getDatetimeRuleProcessorSQL, u as getDatetimeRuleProcessorMongoDBQuery } from "./getDatetimeRuleProcessorSQL-CtUjFtho.js";
1
+ import { a as getDatetimeValueProcessorOracle, d as getDatetimeRuleProcessorCEL, f as getDatetimeJsonLogicOperations, i as getDatetimeValueProcessorMySQL, l as getDatetimeRuleProcessorNL, n as getDatetimeValueProcessorANSI, o as getDatetimeValueProcessorPostgreSQL, p as isISOStringDateOnly, r as getDatetimeValueProcessorMSSQL, t as getDatetimeRuleProcessorSQL, u as getDatetimeRuleProcessorMongoDBQuery } from "./getDatetimeRuleProcessorSQL-Cxyajj0g.js";
2
2
  import { format, isAfter, isBefore, isSameDay, isValid, parseISO, toDate } from "date-fns";
3
3
 
4
4
  //#region src/rqbDateTimeLibraryAPI.date-fns.ts
@@ -1,4 +1,4 @@
1
- import { _ as RuleProcessor, h as RQBJsonLogicDateTimeOperations, i as RQBDateTimeLibraryAPI, v as ValueProcessorByRule } from "./types-h3_NfrpO.js";
1
+ import { _ as RuleProcessor, h as RQBJsonLogicDateTimeOperations, i as RQBDateTimeLibraryAPI, v as ValueProcessorByRule } from "./types-DuaAB95e.js";
2
2
 
3
3
  //#region src/rqbDateTimeLibraryAPI.dayjs.d.ts
4
4
 
@@ -1,4 +1,4 @@
1
- import { a as getDatetimeValueProcessorOracle, d as getDatetimeRuleProcessorCEL, f as getDatetimeJsonLogicOperations, i as getDatetimeValueProcessorMySQL, l as getDatetimeRuleProcessorNL, n as getDatetimeValueProcessorANSI, o as getDatetimeValueProcessorPostgreSQL, p as isISOStringDateOnly, r as getDatetimeValueProcessorMSSQL, t as getDatetimeRuleProcessorSQL, u as getDatetimeRuleProcessorMongoDBQuery } from "./getDatetimeRuleProcessorSQL-CtUjFtho.js";
1
+ import { a as getDatetimeValueProcessorOracle, d as getDatetimeRuleProcessorCEL, f as getDatetimeJsonLogicOperations, i as getDatetimeValueProcessorMySQL, l as getDatetimeRuleProcessorNL, n as getDatetimeValueProcessorANSI, o as getDatetimeValueProcessorPostgreSQL, p as isISOStringDateOnly, r as getDatetimeValueProcessorMSSQL, t as getDatetimeRuleProcessorSQL, u as getDatetimeRuleProcessorMongoDBQuery } from "./getDatetimeRuleProcessorSQL-Cxyajj0g.js";
2
2
  import dayjs from "dayjs";
3
3
 
4
4
  //#region src/rqbDateTimeLibraryAPI.dayjs.ts
@@ -1,4 +1,4 @@
1
- import { a as getDatetimeValueProcessorOracle, c as defaultDateTimeNLOperatorMap, d as getDatetimeRuleProcessorCEL, f as getDatetimeJsonLogicOperations, i as getDatetimeValueProcessorMySQL, l as getDatetimeRuleProcessorNL, m as processIsDateField, n as getDatetimeValueProcessorANSI, o as getDatetimeValueProcessorPostgreSQL, r as getDatetimeValueProcessorMSSQL, s as datetimeValueProcessorNL, t as getDatetimeRuleProcessorSQL, u as getDatetimeRuleProcessorMongoDBQuery } from "./getDatetimeRuleProcessorSQL-CtUjFtho.js";
1
+ import { a as getDatetimeValueProcessorOracle, c as defaultDateTimeNLOperatorMap, d as getDatetimeRuleProcessorCEL, f as getDatetimeJsonLogicOperations, i as getDatetimeValueProcessorMySQL, l as getDatetimeRuleProcessorNL, m as processIsDateField, n as getDatetimeValueProcessorANSI, o as getDatetimeValueProcessorPostgreSQL, r as getDatetimeValueProcessorMSSQL, s as datetimeValueProcessorNL, t as getDatetimeRuleProcessorSQL, u as getDatetimeRuleProcessorMongoDBQuery } from "./getDatetimeRuleProcessorSQL-Cxyajj0g.js";
2
2
  import { defaultRuleProcessorJSONata, defaultRuleProcessorJsonLogic, getQuotedFieldName, nullOrUndefinedOrEmpty, toArray } from "react-querybuilder";
3
3
 
4
4
  //#region src/datetimeRuleProcessorJsonLogic.ts
@@ -1,4 +1,4 @@
1
- import { _ as RuleProcessor, h as RQBJsonLogicDateTimeOperations, i as RQBDateTimeLibraryAPI, v as ValueProcessorByRule } from "./types-h3_NfrpO.js";
1
+ import { _ as RuleProcessor, h as RQBJsonLogicDateTimeOperations, i as RQBDateTimeLibraryAPI, v as ValueProcessorByRule } from "./types-DuaAB95e.js";
2
2
 
3
3
  //#region src/rqbDateTimeLibraryAPI.jsdate.d.ts
4
4
 
@@ -1,4 +1,4 @@
1
- import { a as getDatetimeValueProcessorOracle, d as getDatetimeRuleProcessorCEL, f as getDatetimeJsonLogicOperations, i as getDatetimeValueProcessorMySQL, l as getDatetimeRuleProcessorNL, n as getDatetimeValueProcessorANSI, o as getDatetimeValueProcessorPostgreSQL, p as isISOStringDateOnly, r as getDatetimeValueProcessorMSSQL, t as getDatetimeRuleProcessorSQL, u as getDatetimeRuleProcessorMongoDBQuery } from "./getDatetimeRuleProcessorSQL-CtUjFtho.js";
1
+ import { a as getDatetimeValueProcessorOracle, d as getDatetimeRuleProcessorCEL, f as getDatetimeJsonLogicOperations, i as getDatetimeValueProcessorMySQL, l as getDatetimeRuleProcessorNL, n as getDatetimeValueProcessorANSI, o as getDatetimeValueProcessorPostgreSQL, p as isISOStringDateOnly, r as getDatetimeValueProcessorMSSQL, t as getDatetimeRuleProcessorSQL, u as getDatetimeRuleProcessorMongoDBQuery } from "./getDatetimeRuleProcessorSQL-Cxyajj0g.js";
2
2
 
3
3
  //#region src/rqbDateTimeLibraryAPI.jsdate.ts
4
4
  const invalidDate = /* @__PURE__ */ new Date(NaN);
@@ -1,4 +1,4 @@
1
- import { _ as RuleProcessor, h as RQBJsonLogicDateTimeOperations, i as RQBDateTimeLibraryAPI, v as ValueProcessorByRule } from "./types-h3_NfrpO.js";
1
+ import { _ as RuleProcessor, h as RQBJsonLogicDateTimeOperations, i as RQBDateTimeLibraryAPI, v as ValueProcessorByRule } from "./types-DuaAB95e.js";
2
2
 
3
3
  //#region src/rqbDateTimeLibraryAPI.luxon.d.ts
4
4
 
@@ -1,4 +1,4 @@
1
- import { a as getDatetimeValueProcessorOracle, d as getDatetimeRuleProcessorCEL, f as getDatetimeJsonLogicOperations, i as getDatetimeValueProcessorMySQL, l as getDatetimeRuleProcessorNL, n as getDatetimeValueProcessorANSI, o as getDatetimeValueProcessorPostgreSQL, p as isISOStringDateOnly, r as getDatetimeValueProcessorMSSQL, t as getDatetimeRuleProcessorSQL, u as getDatetimeRuleProcessorMongoDBQuery } from "./getDatetimeRuleProcessorSQL-CtUjFtho.js";
1
+ import { a as getDatetimeValueProcessorOracle, d as getDatetimeRuleProcessorCEL, f as getDatetimeJsonLogicOperations, i as getDatetimeValueProcessorMySQL, l as getDatetimeRuleProcessorNL, n as getDatetimeValueProcessorANSI, o as getDatetimeValueProcessorPostgreSQL, p as isISOStringDateOnly, r as getDatetimeValueProcessorMSSQL, t as getDatetimeRuleProcessorSQL, u as getDatetimeRuleProcessorMongoDBQuery } from "./getDatetimeRuleProcessorSQL-Cxyajj0g.js";
2
2
  import { DateTime } from "luxon";
3
3
 
4
4
  //#region src/rqbDateTimeLibraryAPI.luxon.ts
@@ -1,4 +1,4 @@
1
- import { _ as RuleProcessor, h as RQBJsonLogicDateTimeOperations, i as RQBDateTimeLibraryAPI, v as ValueProcessorByRule } from "./types-BO9Xuapi.mjs";
1
+ import { _ as RuleProcessor, h as RQBJsonLogicDateTimeOperations, i as RQBDateTimeLibraryAPI, v as ValueProcessorByRule } from "./types-C-P0L9xh.mjs";
2
2
 
3
3
  //#region src/rqbDateTimeLibraryAPI.luxon.d.ts
4
4
 
@@ -1,4 +1,4 @@
1
- import { _ as RuleProcessor, a as RQBJsonLogicDateAfter, c as RQBJsonLogicDateIn, d as RQBJsonLogicDateNotOn, f as RQBJsonLogicDateOn, g as ExportOperatorMap, h as RQBJsonLogicDateTimeOperations, i as RQBDateTimeLibraryAPI, l as RQBJsonLogicDateNotBetween, m as RQBJsonLogicDateOnOrBefore, n as IsDateFieldFunction, o as RQBJsonLogicDateBefore, p as RQBJsonLogicDateOnOrAfter, r as RQBDateTimeJsonLogic, s as RQBJsonLogicDateBetween, t as IsDateField, u as RQBJsonLogicDateNotIn, v as ValueProcessorByRule } from "./types-BO9Xuapi.mjs";
1
+ import { _ as RuleProcessor, a as RQBJsonLogicDateAfter, c as RQBJsonLogicDateIn, d as RQBJsonLogicDateNotOn, f as RQBJsonLogicDateOn, g as ExportOperatorMap, h as RQBJsonLogicDateTimeOperations, i as RQBDateTimeLibraryAPI, l as RQBJsonLogicDateNotBetween, m as RQBJsonLogicDateOnOrBefore, n as IsDateFieldFunction, o as RQBJsonLogicDateBefore, p as RQBJsonLogicDateOnOrAfter, r as RQBDateTimeJsonLogic, s as RQBJsonLogicDateBetween, t as IsDateField, u as RQBJsonLogicDateNotIn, v as ValueProcessorByRule } from "./types-C-P0L9xh.mjs";
2
2
 
3
3
  //#region src/datetimeRuleProcessorJsonLogic.d.ts
4
4
 
@@ -1,4 +1,4 @@
1
- import { _ as RuleProcessor, h as RQBJsonLogicDateTimeOperations, i as RQBDateTimeLibraryAPI, v as ValueProcessorByRule } from "./types-BO9Xuapi.mjs";
1
+ import { _ as RuleProcessor, h as RQBJsonLogicDateTimeOperations, i as RQBDateTimeLibraryAPI, v as ValueProcessorByRule } from "./types-C-P0L9xh.mjs";
2
2
 
3
3
  //#region src/rqbDateTimeLibraryAPI.date-fns.d.ts
4
4
 
@@ -1,4 +1,4 @@
1
- import { _ as RuleProcessor, h as RQBJsonLogicDateTimeOperations, i as RQBDateTimeLibraryAPI, v as ValueProcessorByRule } from "./types-BO9Xuapi.mjs";
1
+ import { _ as RuleProcessor, h as RQBJsonLogicDateTimeOperations, i as RQBDateTimeLibraryAPI, v as ValueProcessorByRule } from "./types-C-P0L9xh.mjs";
2
2
 
3
3
  //#region src/rqbDateTimeLibraryAPI.dayjs.d.ts
4
4
 
@@ -1,4 +1,4 @@
1
- import { _ as RuleProcessor, h as RQBJsonLogicDateTimeOperations, i as RQBDateTimeLibraryAPI, v as ValueProcessorByRule } from "./types-BO9Xuapi.mjs";
1
+ import { _ as RuleProcessor, h as RQBJsonLogicDateTimeOperations, i as RQBDateTimeLibraryAPI, v as ValueProcessorByRule } from "./types-C-P0L9xh.mjs";
2
2
 
3
3
  //#region src/rqbDateTimeLibraryAPI.jsdate.d.ts
4
4
 
@@ -1,4 +1,4 @@
1
- import { _ as RuleProcessor, h as RQBJsonLogicDateTimeOperations, i as RQBDateTimeLibraryAPI, v as ValueProcessorByRule } from "./types-BO9Xuapi.mjs";
1
+ import { _ as RuleProcessor, h as RQBJsonLogicDateTimeOperations, i as RQBDateTimeLibraryAPI, v as ValueProcessorByRule } from "./types-C-P0L9xh.mjs";
2
2
 
3
3
  //#region src/rqbDateTimeLibraryAPI.luxon.d.ts
4
4
 
@@ -960,7 +960,7 @@ type FlexibleOption<N extends string = string> = Simplify<WithUnknownIndex<Requi
960
960
  *
961
961
  * @group Option Lists
962
962
  */
963
- type ToFlexibleOption<Opt$1 extends BaseOption | string> = WithUnknownIndex<RequireAtLeastOne<Opt$1 extends string ? FlexibleOption<Opt$1> : Opt$1, "name" | "value">>;
963
+ type ToFlexibleOption<Opt extends BaseOption | string> = WithUnknownIndex<RequireAtLeastOne<Opt extends string ? FlexibleOption<Opt> : Opt, "name" | "value">>;
964
964
  /**
965
965
  * A generic {@link Option} requiring both `name` _and_ `value` properties.
966
966
  * Props that extend {@link OptionList} accept {@link BaseOption}, but
@@ -988,24 +988,24 @@ type BaseFullOption<N extends string = string> = Simplify<SetRequired<BaseOption
988
988
  *
989
989
  * @group Option Lists
990
990
  */
991
- type ToFullOption<Opt$1 extends BaseOption> = Opt$1 extends BaseFullOption ? Opt$1 : Opt$1 extends BaseOption<infer IdentifierType> ? WithUnknownIndex<Opt$1 & FullOption<IdentifierType>> : never;
991
+ type ToFullOption<Opt extends BaseOption> = Opt extends BaseFullOption ? Opt : Opt extends BaseOption<infer IdentifierType> ? WithUnknownIndex<Opt & FullOption<IdentifierType>> : never;
992
992
  /**
993
993
  * A group of {@link Option}s, usually within an {@link OptionList}.
994
994
  *
995
995
  * @group Option Lists
996
996
  */
997
- interface OptionGroup<Opt$1 extends BaseOption = FlexibleOption> {
997
+ interface OptionGroup<Opt extends BaseOption = FlexibleOption> {
998
998
  label: string;
999
- options: WithUnknownIndex<Opt$1>[];
999
+ options: WithUnknownIndex<Opt>[];
1000
1000
  }
1001
1001
  /**
1002
1002
  * A group of {@link BaseOption}s, usually within a {@link FlexibleOptionList}.
1003
1003
  *
1004
1004
  * @group Option Lists
1005
1005
  */
1006
- type FlexibleOptionGroup<Opt$1 extends BaseOption | string = BaseOption> = {
1006
+ type FlexibleOptionGroup<Opt extends BaseOption | string = BaseOption> = {
1007
1007
  label: string;
1008
- options: (Opt$1 extends BaseFullOption ? Opt$1 : ToFlexibleOption<Opt$1>)[];
1008
+ options: (Opt extends BaseFullOption ? Opt : ToFlexibleOption<Opt>)[];
1009
1009
  };
1010
1010
  /**
1011
1011
  * An array of options or option groups, like {@link OptionList} but the option type
@@ -1013,7 +1013,7 @@ type FlexibleOptionGroup<Opt$1 extends BaseOption | string = BaseOption> = {
1013
1013
  *
1014
1014
  * @group Option Lists
1015
1015
  */
1016
- type FlexibleOptionList<Opt$1 extends BaseOption> = ToFlexibleOption<Opt$1>[] | FlexibleOptionGroup<ToFlexibleOption<Opt$1>>[];
1016
+ type FlexibleOptionList<Opt extends BaseOption> = ToFlexibleOption<Opt>[] | FlexibleOptionGroup<ToFlexibleOption<Opt>>[];
1017
1017
  /**
1018
1018
  * An array of options or option groups, like {@link OptionList}, but using
1019
1019
  * {@link FullOption} instead of {@link Option}. This means that every member is
@@ -1021,7 +1021,7 @@ type FlexibleOptionList<Opt$1 extends BaseOption> = ToFlexibleOption<Opt$1>[] |
1021
1021
  *
1022
1022
  * @group Option Lists
1023
1023
  */
1024
- type FullOptionList<Opt$1 extends BaseOption> = Opt$1 extends BaseFullOption ? Opt$1[] | OptionGroup<Opt$1>[] : ToFullOption<Opt$1>[] | OptionGroup<ToFullOption<Opt$1>>[];
1024
+ type FullOptionList<Opt extends BaseOption> = Opt extends BaseFullOption ? Opt[] | OptionGroup<Opt>[] : ToFullOption<Opt>[] | OptionGroup<ToFullOption<Opt>>[];
1025
1025
  //#endregion
1026
1026
  //#region ../core/src/types/ruleGroups.d.ts
1027
1027
  /**
@@ -1172,17 +1172,17 @@ type MatchMode = "all" | "some" | "none" | "atLeast" | "atMost" | "exactly";
1172
1172
  /**
1173
1173
  * Base for all Field types/interfaces.
1174
1174
  */
1175
- interface BaseFullField<FieldName extends string = string, OperatorName$1 extends string = string, ValueName extends string = string, OperatorObj extends FullOption = FullOption<OperatorName$1>, ValueObj extends FullOption = FullOption<ValueName>> extends WithOptionalClassName<BaseFullOption<FieldName>> {
1175
+ interface BaseFullField<FieldName extends string = string, OperatorName extends string = string, ValueName extends string = string, OperatorObj extends FullOption = FullOption<OperatorName>, ValueObj extends FullOption = FullOption<ValueName>> extends WithOptionalClassName<BaseFullOption<FieldName>> {
1176
1176
  id?: string;
1177
- operators?: FlexibleOptionList<OperatorObj> | OperatorName$1[] | FlexibleOption<OperatorName$1>[] | (OperatorName$1 | FlexibleOption<OperatorName$1>)[];
1178
- valueEditorType?: ValueEditorType | ((operator: OperatorName$1) => ValueEditorType);
1179
- valueSources?: ValueSources | ValueSourceFlexibleOptions | ((operator: OperatorName$1) => ValueSources | ValueSourceFlexibleOptions);
1177
+ operators?: FlexibleOptionList<OperatorObj> | OperatorName[] | FlexibleOption<OperatorName>[] | (OperatorName | FlexibleOption<OperatorName>)[];
1178
+ valueEditorType?: ValueEditorType | ((operator: OperatorName) => ValueEditorType);
1179
+ valueSources?: ValueSources | ValueSourceFlexibleOptions | ((operator: OperatorName) => ValueSources | ValueSourceFlexibleOptions);
1180
1180
  inputType?: InputType | null;
1181
1181
  values?: FlexibleOptionList<ValueObj>;
1182
1182
  matchModes?: boolean | MatchMode[] | FlexibleOption<MatchMode>[];
1183
1183
  /** Properties of items in the value. */
1184
1184
  subproperties?: FlexibleOptionList<FullField>;
1185
- defaultOperator?: OperatorName$1;
1185
+ defaultOperator?: OperatorName;
1186
1186
  defaultValue?: any;
1187
1187
  placeholder?: string;
1188
1188
  validator?: RuleValidator;
@@ -1200,7 +1200,7 @@ interface BaseFullField<FieldName extends string = string, OperatorName$1 extend
1200
1200
  *
1201
1201
  * @group Option Lists
1202
1202
  */
1203
- type FullField<FieldName extends string = string, OperatorName$1 extends string = string, ValueName extends string = string, OperatorObj extends FullOption = FullOption<OperatorName$1>, ValueObj extends FullOption = FullOption<ValueName>> = Simplify<FullOption<FieldName> & BaseFullField<FieldName, OperatorName$1, ValueName, OperatorObj, ValueObj>>;
1203
+ type FullField<FieldName extends string = string, OperatorName extends string = string, ValueName extends string = string, OperatorObj extends FullOption = FullOption<OperatorName>, ValueObj extends FullOption = FullOption<ValueName>> = Simplify<FullOption<FieldName> & BaseFullField<FieldName, OperatorName, ValueName, OperatorObj, ValueObj>>;
1204
1204
  /**
1205
1205
  * Allowed values of the {@link FullOperator} property `arity`. A value of `"unary"` or
1206
1206
  * a number less than two will cause the default {@link react-querybuilder!ValueEditor ValueEditor} to render `null`.
@@ -1750,4 +1750,4 @@ type IsDateFieldFunction = (...[rule, opts]: Parameters<RuleProcessor>) => boole
1750
1750
  type IsDateField = IsDateFieldFunction | Record<string, unknown> | Record<string, unknown>[] | boolean | undefined;
1751
1751
  //#endregion
1752
1752
  export { RuleProcessor as _, RQBJsonLogicDateAfter as a, RQBJsonLogicDateIn as c, RQBJsonLogicDateNotOn as d, RQBJsonLogicDateOn as f, ExportOperatorMap as g, RQBJsonLogicDateTimeOperations as h, RQBDateTimeLibraryAPI as i, RQBJsonLogicDateNotBetween as l, RQBJsonLogicDateOnOrBefore as m, IsDateFieldFunction as n, RQBJsonLogicDateBefore as o, RQBJsonLogicDateOnOrAfter as p, RQBDateTimeJsonLogic as r, RQBJsonLogicDateBetween as s, IsDateField as t, RQBJsonLogicDateNotIn as u, ValueProcessorByRule as v };
1753
- //# sourceMappingURL=types-h3_NfrpO.d.ts.map
1753
+ //# sourceMappingURL=types-C-P0L9xh.d.mts.map
@@ -960,7 +960,7 @@ type FlexibleOption<N extends string = string> = Simplify<WithUnknownIndex<Requi
960
960
  *
961
961
  * @group Option Lists
962
962
  */
963
- type ToFlexibleOption<Opt$1 extends BaseOption | string> = WithUnknownIndex<RequireAtLeastOne<Opt$1 extends string ? FlexibleOption<Opt$1> : Opt$1, "name" | "value">>;
963
+ type ToFlexibleOption<Opt extends BaseOption | string> = WithUnknownIndex<RequireAtLeastOne<Opt extends string ? FlexibleOption<Opt> : Opt, "name" | "value">>;
964
964
  /**
965
965
  * A generic {@link Option} requiring both `name` _and_ `value` properties.
966
966
  * Props that extend {@link OptionList} accept {@link BaseOption}, but
@@ -988,24 +988,24 @@ type BaseFullOption<N extends string = string> = Simplify<SetRequired<BaseOption
988
988
  *
989
989
  * @group Option Lists
990
990
  */
991
- type ToFullOption<Opt$1 extends BaseOption> = Opt$1 extends BaseFullOption ? Opt$1 : Opt$1 extends BaseOption<infer IdentifierType> ? WithUnknownIndex<Opt$1 & FullOption<IdentifierType>> : never;
991
+ type ToFullOption<Opt extends BaseOption> = Opt extends BaseFullOption ? Opt : Opt extends BaseOption<infer IdentifierType> ? WithUnknownIndex<Opt & FullOption<IdentifierType>> : never;
992
992
  /**
993
993
  * A group of {@link Option}s, usually within an {@link OptionList}.
994
994
  *
995
995
  * @group Option Lists
996
996
  */
997
- interface OptionGroup<Opt$1 extends BaseOption = FlexibleOption> {
997
+ interface OptionGroup<Opt extends BaseOption = FlexibleOption> {
998
998
  label: string;
999
- options: WithUnknownIndex<Opt$1>[];
999
+ options: WithUnknownIndex<Opt>[];
1000
1000
  }
1001
1001
  /**
1002
1002
  * A group of {@link BaseOption}s, usually within a {@link FlexibleOptionList}.
1003
1003
  *
1004
1004
  * @group Option Lists
1005
1005
  */
1006
- type FlexibleOptionGroup<Opt$1 extends BaseOption | string = BaseOption> = {
1006
+ type FlexibleOptionGroup<Opt extends BaseOption | string = BaseOption> = {
1007
1007
  label: string;
1008
- options: (Opt$1 extends BaseFullOption ? Opt$1 : ToFlexibleOption<Opt$1>)[];
1008
+ options: (Opt extends BaseFullOption ? Opt : ToFlexibleOption<Opt>)[];
1009
1009
  };
1010
1010
  /**
1011
1011
  * An array of options or option groups, like {@link OptionList} but the option type
@@ -1013,7 +1013,7 @@ type FlexibleOptionGroup<Opt$1 extends BaseOption | string = BaseOption> = {
1013
1013
  *
1014
1014
  * @group Option Lists
1015
1015
  */
1016
- type FlexibleOptionList<Opt$1 extends BaseOption> = ToFlexibleOption<Opt$1>[] | FlexibleOptionGroup<ToFlexibleOption<Opt$1>>[];
1016
+ type FlexibleOptionList<Opt extends BaseOption> = ToFlexibleOption<Opt>[] | FlexibleOptionGroup<ToFlexibleOption<Opt>>[];
1017
1017
  /**
1018
1018
  * An array of options or option groups, like {@link OptionList}, but using
1019
1019
  * {@link FullOption} instead of {@link Option}. This means that every member is
@@ -1021,7 +1021,7 @@ type FlexibleOptionList<Opt$1 extends BaseOption> = ToFlexibleOption<Opt$1>[] |
1021
1021
  *
1022
1022
  * @group Option Lists
1023
1023
  */
1024
- type FullOptionList<Opt$1 extends BaseOption> = Opt$1 extends BaseFullOption ? Opt$1[] | OptionGroup<Opt$1>[] : ToFullOption<Opt$1>[] | OptionGroup<ToFullOption<Opt$1>>[];
1024
+ type FullOptionList<Opt extends BaseOption> = Opt extends BaseFullOption ? Opt[] | OptionGroup<Opt>[] : ToFullOption<Opt>[] | OptionGroup<ToFullOption<Opt>>[];
1025
1025
  //#endregion
1026
1026
  //#region ../core/src/types/ruleGroups.d.ts
1027
1027
  /**
@@ -1172,17 +1172,17 @@ type MatchMode = "all" | "some" | "none" | "atLeast" | "atMost" | "exactly";
1172
1172
  /**
1173
1173
  * Base for all Field types/interfaces.
1174
1174
  */
1175
- interface BaseFullField<FieldName extends string = string, OperatorName$1 extends string = string, ValueName extends string = string, OperatorObj extends FullOption = FullOption<OperatorName$1>, ValueObj extends FullOption = FullOption<ValueName>> extends WithOptionalClassName<BaseFullOption<FieldName>> {
1175
+ interface BaseFullField<FieldName extends string = string, OperatorName extends string = string, ValueName extends string = string, OperatorObj extends FullOption = FullOption<OperatorName>, ValueObj extends FullOption = FullOption<ValueName>> extends WithOptionalClassName<BaseFullOption<FieldName>> {
1176
1176
  id?: string;
1177
- operators?: FlexibleOptionList<OperatorObj> | OperatorName$1[] | FlexibleOption<OperatorName$1>[] | (OperatorName$1 | FlexibleOption<OperatorName$1>)[];
1178
- valueEditorType?: ValueEditorType | ((operator: OperatorName$1) => ValueEditorType);
1179
- valueSources?: ValueSources | ValueSourceFlexibleOptions | ((operator: OperatorName$1) => ValueSources | ValueSourceFlexibleOptions);
1177
+ operators?: FlexibleOptionList<OperatorObj> | OperatorName[] | FlexibleOption<OperatorName>[] | (OperatorName | FlexibleOption<OperatorName>)[];
1178
+ valueEditorType?: ValueEditorType | ((operator: OperatorName) => ValueEditorType);
1179
+ valueSources?: ValueSources | ValueSourceFlexibleOptions | ((operator: OperatorName) => ValueSources | ValueSourceFlexibleOptions);
1180
1180
  inputType?: InputType | null;
1181
1181
  values?: FlexibleOptionList<ValueObj>;
1182
1182
  matchModes?: boolean | MatchMode[] | FlexibleOption<MatchMode>[];
1183
1183
  /** Properties of items in the value. */
1184
1184
  subproperties?: FlexibleOptionList<FullField>;
1185
- defaultOperator?: OperatorName$1;
1185
+ defaultOperator?: OperatorName;
1186
1186
  defaultValue?: any;
1187
1187
  placeholder?: string;
1188
1188
  validator?: RuleValidator;
@@ -1200,7 +1200,7 @@ interface BaseFullField<FieldName extends string = string, OperatorName$1 extend
1200
1200
  *
1201
1201
  * @group Option Lists
1202
1202
  */
1203
- type FullField<FieldName extends string = string, OperatorName$1 extends string = string, ValueName extends string = string, OperatorObj extends FullOption = FullOption<OperatorName$1>, ValueObj extends FullOption = FullOption<ValueName>> = Simplify<FullOption<FieldName> & BaseFullField<FieldName, OperatorName$1, ValueName, OperatorObj, ValueObj>>;
1203
+ type FullField<FieldName extends string = string, OperatorName extends string = string, ValueName extends string = string, OperatorObj extends FullOption = FullOption<OperatorName>, ValueObj extends FullOption = FullOption<ValueName>> = Simplify<FullOption<FieldName> & BaseFullField<FieldName, OperatorName, ValueName, OperatorObj, ValueObj>>;
1204
1204
  /**
1205
1205
  * Allowed values of the {@link FullOperator} property `arity`. A value of `"unary"` or
1206
1206
  * a number less than two will cause the default {@link react-querybuilder!ValueEditor ValueEditor} to render `null`.
@@ -1750,4 +1750,4 @@ type IsDateFieldFunction = (...[rule, opts]: Parameters<RuleProcessor>) => boole
1750
1750
  type IsDateField = IsDateFieldFunction | Record<string, unknown> | Record<string, unknown>[] | boolean | undefined;
1751
1751
  //#endregion
1752
1752
  export { RuleProcessor as _, RQBJsonLogicDateAfter as a, RQBJsonLogicDateIn as c, RQBJsonLogicDateNotOn as d, RQBJsonLogicDateOn as f, ExportOperatorMap as g, RQBJsonLogicDateTimeOperations as h, RQBDateTimeLibraryAPI as i, RQBJsonLogicDateNotBetween as l, RQBJsonLogicDateOnOrBefore as m, IsDateFieldFunction as n, RQBJsonLogicDateBefore as o, RQBJsonLogicDateOnOrAfter as p, RQBDateTimeJsonLogic as r, RQBJsonLogicDateBetween as s, IsDateField as t, RQBJsonLogicDateNotIn as u, ValueProcessorByRule as v };
1753
- //# sourceMappingURL=types-BO9Xuapi.d.mts.map
1753
+ //# sourceMappingURL=types-DuaAB95e.d.ts.map
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.13.0",
4
+ "version": "8.14.0",
5
5
  "publishConfig": {
6
6
  "access": "public"
7
7
  },
@@ -93,31 +93,31 @@
93
93
  "@date-fns/tz": "^1.4.1",
94
94
  "@electric-sql/pglite": "^0.3.14",
95
95
  "@testing-library/dom": "^10.4.1",
96
- "@testing-library/react": "^16.3.0",
96
+ "@testing-library/react": "^16.3.1",
97
97
  "@testing-library/user-event": "14.5.2",
98
98
  "@types/luxon": "^3.7.1",
99
99
  "@types/react": "^19.2.7",
100
- "@vitejs/plugin-react": "^5.1.1",
100
+ "@vitejs/plugin-react": "^5.1.2",
101
101
  "date-fns": "^4.1.0",
102
102
  "dayjs": "^1.11.19",
103
103
  "json-logic-js": "^2.0.5",
104
104
  "jsonata": "^2.1.0",
105
105
  "luxon": "^3.7.2",
106
- "mongodb-memory-server-core": "^10.3.0",
107
- "mongoose": "^9.0.0",
108
- "react": "^19.2.0",
109
- "react-dom": "^19.2.0",
110
- "react-querybuilder": "8.13.0",
106
+ "mongodb-memory-server-core": "^11.0.1",
107
+ "mongoose": "^9.1.2",
108
+ "react": "^19.2.3",
109
+ "react-dom": "^19.2.3",
110
+ "react-querybuilder": "8.14.0",
111
111
  "rollup-plugin-visualizer": "^6.0.5",
112
112
  "typescript": "^5.9.3",
113
- "vite": "^7.2.6"
113
+ "vite": "^7.3.1"
114
114
  },
115
115
  "peerDependencies": {
116
116
  "date-fns": "^4.1.0",
117
117
  "dayjs": "^1.11.13",
118
118
  "luxon": "^3.5.0",
119
119
  "react": ">=18",
120
- "react-querybuilder": "8.13.0"
120
+ "react-querybuilder": "8.14.0"
121
121
  },
122
122
  "peerDependenciesMeta": {
123
123
  "date-fns": {
@@ -130,5 +130,5 @@
130
130
  "optional": true
131
131
  }
132
132
  },
133
- "gitHead": "96a494f99af53de9de8c647d1895e9d05f3f74a9"
133
+ "gitHead": "efdb45ff71a9fa11dde3b5ebe0990a48de0dfa7f"
134
134
  }