@react-querybuilder/datetime 8.1.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 (100) hide show
  1. package/LICENSE.md +21 -0
  2. package/README.md +71 -0
  3. package/dist/chunk-6RML23AL.mjs +536 -0
  4. package/dist/chunk-6RML23AL.mjs.map +1 -0
  5. package/dist/chunk-EGQ3B2PY.js +550 -0
  6. package/dist/chunk-EGQ3B2PY.js.map +1 -0
  7. package/dist/chunk-SXNOZEVF.mjs +6 -0
  8. package/dist/chunk-SXNOZEVF.mjs.map +1 -0
  9. package/dist/cjs/date-fns.js +6 -0
  10. package/dist/cjs/dayjs.js +6 -0
  11. package/dist/cjs/index.js +6 -0
  12. package/dist/cjs/jsdate.js +6 -0
  13. package/dist/cjs/luxon.js +6 -0
  14. package/dist/cjs/react-querybuilder_datetime.cjs.development.date-fns.js +603 -0
  15. package/dist/cjs/react-querybuilder_datetime.cjs.development.date-fns.js.map +1 -0
  16. package/dist/cjs/react-querybuilder_datetime.cjs.development.dayjs.js +613 -0
  17. package/dist/cjs/react-querybuilder_datetime.cjs.development.dayjs.js.map +1 -0
  18. package/dist/cjs/react-querybuilder_datetime.cjs.development.js +760 -0
  19. package/dist/cjs/react-querybuilder_datetime.cjs.development.js.map +1 -0
  20. package/dist/cjs/react-querybuilder_datetime.cjs.development.jsdate.js +662 -0
  21. package/dist/cjs/react-querybuilder_datetime.cjs.development.jsdate.js.map +1 -0
  22. package/dist/cjs/react-querybuilder_datetime.cjs.development.luxon.js +607 -0
  23. package/dist/cjs/react-querybuilder_datetime.cjs.development.luxon.js.map +1 -0
  24. package/dist/cjs/react-querybuilder_datetime.cjs.production.date-fns.js +6 -0
  25. package/dist/cjs/react-querybuilder_datetime.cjs.production.date-fns.js.map +1 -0
  26. package/dist/cjs/react-querybuilder_datetime.cjs.production.dayjs.js +6 -0
  27. package/dist/cjs/react-querybuilder_datetime.cjs.production.dayjs.js.map +1 -0
  28. package/dist/cjs/react-querybuilder_datetime.cjs.production.js +7 -0
  29. package/dist/cjs/react-querybuilder_datetime.cjs.production.js.map +1 -0
  30. package/dist/cjs/react-querybuilder_datetime.cjs.production.jsdate.js +7 -0
  31. package/dist/cjs/react-querybuilder_datetime.cjs.production.jsdate.js.map +1 -0
  32. package/dist/cjs/react-querybuilder_datetime.cjs.production.luxon.js +6 -0
  33. package/dist/cjs/react-querybuilder_datetime.cjs.production.luxon.js.map +1 -0
  34. package/dist/react-querybuilder_datetime.date-fns.mjs +58 -0
  35. package/dist/react-querybuilder_datetime.date-fns.mjs.map +1 -0
  36. package/dist/react-querybuilder_datetime.dayjs.mjs +58 -0
  37. package/dist/react-querybuilder_datetime.dayjs.mjs.map +1 -0
  38. package/dist/react-querybuilder_datetime.jsdate.mjs +117 -0
  39. package/dist/react-querybuilder_datetime.jsdate.mjs.map +1 -0
  40. package/dist/react-querybuilder_datetime.legacy-esm.date-fns.js +58 -0
  41. package/dist/react-querybuilder_datetime.legacy-esm.date-fns.js.map +1 -0
  42. package/dist/react-querybuilder_datetime.legacy-esm.dayjs.js +58 -0
  43. package/dist/react-querybuilder_datetime.legacy-esm.dayjs.js.map +1 -0
  44. package/dist/react-querybuilder_datetime.legacy-esm.js +214 -0
  45. package/dist/react-querybuilder_datetime.legacy-esm.js.map +1 -0
  46. package/dist/react-querybuilder_datetime.legacy-esm.jsdate.js +117 -0
  47. package/dist/react-querybuilder_datetime.legacy-esm.jsdate.js.map +1 -0
  48. package/dist/react-querybuilder_datetime.legacy-esm.luxon.js +62 -0
  49. package/dist/react-querybuilder_datetime.legacy-esm.luxon.js.map +1 -0
  50. package/dist/react-querybuilder_datetime.luxon.mjs +62 -0
  51. package/dist/react-querybuilder_datetime.luxon.mjs.map +1 -0
  52. package/dist/react-querybuilder_datetime.mjs +214 -0
  53. package/dist/react-querybuilder_datetime.mjs.map +1 -0
  54. package/dist/react-querybuilder_datetime.production.date-fns.mjs +2 -0
  55. package/dist/react-querybuilder_datetime.production.date-fns.mjs.map +1 -0
  56. package/dist/react-querybuilder_datetime.production.dayjs.mjs +2 -0
  57. package/dist/react-querybuilder_datetime.production.dayjs.mjs.map +1 -0
  58. package/dist/react-querybuilder_datetime.production.jsdate.mjs +3 -0
  59. package/dist/react-querybuilder_datetime.production.jsdate.mjs.map +1 -0
  60. package/dist/react-querybuilder_datetime.production.luxon.mjs +2 -0
  61. package/dist/react-querybuilder_datetime.production.luxon.mjs.map +1 -0
  62. package/dist/react-querybuilder_datetime.production.mjs +3 -0
  63. package/dist/react-querybuilder_datetime.production.mjs.map +1 -0
  64. package/dist/types/QueryBuilderDateTime.d.ts +4 -0
  65. package/dist/types/datetimeRuleProcessorJsonLogic.d.ts +10 -0
  66. package/dist/types/getDatetimeJsonLogicOperations.d.ts +6 -0
  67. package/dist/types/getDatetimeRuleProcessorCEL.d.ts +7 -0
  68. package/dist/types/getDatetimeRuleProcessorJSONata.d.ts +7 -0
  69. package/dist/types/getDatetimeRuleProcessorMongoDBQuery.d.ts +7 -0
  70. package/dist/types/getDatetimeRuleProcessorSQL.d.ts +32 -0
  71. package/dist/types/index.d.ts +7 -0
  72. package/dist/types/index.date-fns.d.ts +44 -0
  73. package/dist/types/index.dayjs.d.ts +44 -0
  74. package/dist/types/index.jsdate.d.ts +44 -0
  75. package/dist/types/index.luxon.d.ts +44 -0
  76. package/dist/types/rqbDateTimeLibraryAPI.date-fns.d.ts +5 -0
  77. package/dist/types/rqbDateTimeLibraryAPI.dayjs.d.ts +5 -0
  78. package/dist/types/rqbDateTimeLibraryAPI.jsdate.d.ts +8 -0
  79. package/dist/types/rqbDateTimeLibraryAPI.luxon.d.ts +5 -0
  80. package/dist/types/types.d.ts +101 -0
  81. package/dist/types/utils.d.ts +5 -0
  82. package/dist/types-esm/QueryBuilderDateTime.d.mts +4 -0
  83. package/dist/types-esm/datetimeRuleProcessorJsonLogic.d.mts +10 -0
  84. package/dist/types-esm/getDatetimeJsonLogicOperations.d.mts +6 -0
  85. package/dist/types-esm/getDatetimeRuleProcessorCEL.d.mts +7 -0
  86. package/dist/types-esm/getDatetimeRuleProcessorJSONata.d.mts +7 -0
  87. package/dist/types-esm/getDatetimeRuleProcessorMongoDBQuery.d.mts +7 -0
  88. package/dist/types-esm/getDatetimeRuleProcessorSQL.d.mts +32 -0
  89. package/dist/types-esm/index.d.mts +7 -0
  90. package/dist/types-esm/index.date-fns.d.mts +44 -0
  91. package/dist/types-esm/index.dayjs.d.mts +44 -0
  92. package/dist/types-esm/index.jsdate.d.mts +44 -0
  93. package/dist/types-esm/index.luxon.d.mts +44 -0
  94. package/dist/types-esm/rqbDateTimeLibraryAPI.date-fns.d.mts +5 -0
  95. package/dist/types-esm/rqbDateTimeLibraryAPI.dayjs.d.mts +5 -0
  96. package/dist/types-esm/rqbDateTimeLibraryAPI.jsdate.d.mts +8 -0
  97. package/dist/types-esm/rqbDateTimeLibraryAPI.luxon.d.mts +5 -0
  98. package/dist/types-esm/types.d.mts +101 -0
  99. package/dist/types-esm/utils.d.mts +5 -0
  100. package/package.json +129 -0
@@ -0,0 +1,3 @@
1
+ import{b as I,c as ee,d as te,e as re,f as ne,g as oe,h as ae,i as ie,j as ce,k as ue}from"./chunk-SXNOZEVF.mjs";import{defaultRuleProcessorJsonLogic as $,toArray as D}from"react-querybuilder";function h(t){"@babel/helpers - typeof";return h=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},h(t)}function j(t,e,r){return(e=K(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function K(t){var e=Q(t,"string");return h(e)=="symbol"?e:e+""}function Q(t,e){if(h(t)!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e||"default");if(h(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}var A={"!=":"dateNotOn","<":"dateBefore","<=":"dateOnOrBefore","=":"dateOn",">":"dateAfter",">=":"dateOnOrAfter",between:"dateBetween",in:"dateIn",notBetween:"dateNotBetween",notIn:"dateNotIn"},se=function(e,r){var n,o=r??{};if(!I((n=o.context)===null||n===void 0?void 0:n.isDateField,e,o))return $(e,o);var d=e.field,c=e.operator,u=e.value,s=e.valueSource,v=s==="field",m={var:d},a=function(p){return v?{var:"".concat(p)}:p};switch(c){case"<":case"<=":case"=":case"!=":case">":case">=":return j({},A[c],[m,a(u)]);case"in":case"notIn":{var l=D(u).map(function(g){return a(g)});return j({},A[c],[m,l])}case"between":case"notBetween":{var b=D(u).map(function(g){return a(g)});return b.length<2?!1:j({},A[c],[b[0],m,b[1]])}}return $(e,r)};import{defaultRuleProcessorJSONata as L,getQuotedFieldName as Y,nullOrUndefinedOrEmpty as q,toArray as Z}from"react-querybuilder";function F(t,e){return X(t)||G(t,e)||z(t,e)||V()}function V(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
2
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function z(t,e){if(t){if(typeof t=="string")return J(t,e);var r={}.toString.call(t).slice(8,-1);return r==="Object"&&t.constructor&&(r=t.constructor.name),r==="Map"||r==="Set"?Array.from(t):r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?J(t,e):void 0}}function J(t,e){(e==null||e>t.length)&&(e=t.length);for(var r=0,n=Array(e);r<e;r++)n[r]=t[r];return n}function G(t,e){var r=t==null?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(r!=null){var n,o,d,c,u=[],s=!0,v=!1;try{if(d=(r=r.call(t)).next,e===0){if(Object(r)!==r)return;s=!1}else for(;!(s=(n=d.call(r)).done)&&(u.push(n.value),u.length!==e);s=!0);}catch(m){v=!0,o=m}finally{try{if(!s&&r.return!=null&&(c=r.return(),Object(c)!==c))return}finally{if(v)throw o}}return u}}function X(t){if(Array.isArray(t))return t}var E=function(e){return/^(does)?not/i.test(e)},O=function(e,r){return r?"$not(".concat(e,")"):"".concat(e)},pe=function(e){return function(r,n){var o=n??{},d=o.context,c=d===void 0?{}:d,u=o.quoteFieldNamesWith,s=u===void 0?["",""]:u,v=o.fieldIdentifierSeparator,m=v===void 0?"":v,a=r.field,l=r.operator,b=r.value,g=r.valueSource;if(!I(c.isDateField,r,o))return L(r,o);var p=g==="field",i=function(P){return"$toMillis(".concat(Y(P,{quoteFieldNamesWith:s,fieldIdentifierSeparator:m}),")")},S=function(P){return'$toMillis("'.concat(e.toISOString(P),'")')};switch(l){case"<":case"<=":case"=":case"!=":case">":case">=":return"".concat(i(a)," ").concat(l," ").concat(p?i(b):S(b))}var y=Z(r.value,{retainEmptyStrings:!1}),w=y.map(function(f){return e.toDate(f)}).filter(function(f){return e.isValid(f)});switch(l){case"in":case"notIn":return p?y.length===0?"":O("".concat(i(a)," in [").concat(y.map(function(f){return i(f)}).join(", "),"]"),E(l)):w.length===0?"":O("".concat(i(a)," in [").concat(w.map(function(f){return S(f)}).join(", "),"]"),E(l));case"between":case"notBetween":{if(y.length<2||q(y[0])||q(y[1])||!p&&w.length<2)return"";if(p){var T=F(y,2),W=T[0],U=T[1],R="".concat(i(a)," >= ").concat(i(W)," and ").concat(i(a)," <= ").concat(i(U));return l==="between"?"(".concat(R,")"):O(R,!0)}var _=F(w,2),N=_[0],x=_[1],k=e.isBefore(N,x)?[N,x]:[x,N],B=F(k,2),C=B[0],H=B[1],M="".concat(i(a)," >= ").concat(S(C)," and ").concat(i(a)," <= ").concat(S(H));return l==="between"?"(".concat(M,")"):O(M,!0)}}return L(r,o)}};export{se as datetimeRuleProcessorJsonLogic,ee as getDatetimeJsonLogicOperations,te as getDatetimeRuleProcessorCEL,pe as getDatetimeRuleProcessorJSONata,re as getDatetimeRuleProcessorMongoDBQuery,ue as getDatetimeRuleProcessorSQL,ne as getDatetimeValueProcessorANSI,oe as getDatetimeValueProcessorMSSQL,ae as getDatetimeValueProcessorMySQL,ie as getDatetimeValueProcessorOracle,ce as getDatetimeValueProcessorPostgreSQL};
3
+ //# sourceMappingURL=react-querybuilder_datetime.production.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/datetimeRuleProcessorJsonLogic.ts","../src/getDatetimeRuleProcessorJSONata.ts"],"sourcesContent":["function _typeof(o){\"@babel/helpers - typeof\";return _typeof=\"function\"==typeof Symbol&&\"symbol\"==typeof Symbol.iterator?function(o){return typeof o;}:function(o){return o&&\"function\"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?\"symbol\":typeof o;},_typeof(o);}function _defineProperty(e,r,t){return(r=_toPropertyKey(r))in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e;}function _toPropertyKey(t){var i=_toPrimitive(t,\"string\");return\"symbol\"==_typeof(i)?i:i+\"\";}function _toPrimitive(t,r){if(\"object\"!=_typeof(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,r||\"default\");if(\"object\"!=_typeof(i))return i;throw new TypeError(\"@@toPrimitive must return a primitive value.\");}return(\"string\"===r?String:Number)(t);}import{defaultRuleProcessorJsonLogic,toArray}from\"react-querybuilder\";import{processIsDateField}from\"./utils\";var dateOperationMap={\"!=\":\"dateNotOn\",\"<\":\"dateBefore\",\"<=\":\"dateOnOrBefore\",\"=\":\"dateOn\",\">\":\"dateAfter\",\">=\":\"dateOnOrAfter\",between:\"dateBetween\",\"in\":\"dateIn\",notBetween:\"dateNotBetween\",notIn:\"dateNotIn\"};export var datetimeRuleProcessorJsonLogic=function datetimeRuleProcessorJsonLogic(rule,options){var _opts$context;var opts=options!==null&&options!==void 0?options:/* istanbul ignore next */{};if(!processIsDateField((_opts$context=opts.context)===null||_opts$context===void 0?void 0:_opts$context.isDateField,rule,opts)){return defaultRuleProcessorJsonLogic(rule,opts);}var field=rule.field,operator=rule.operator,value=rule.value,valueSource=rule.valueSource;var valueIsField=valueSource===\"field\";var fieldObject={\"var\":field};var maybeFieldRenderer=function maybeFieldRenderer(v){return valueIsField?{\"var\":\"\".concat(v)}:v;};switch(operator){case\"<\":case\"<=\":case\"=\":case\"!=\":case\">\":case\">=\":return _defineProperty({},dateOperationMap[operator],[fieldObject,maybeFieldRenderer(value)]);case\"in\":case\"notIn\":{var valueAsArray=toArray(value).map(function(v){return maybeFieldRenderer(v);});return _defineProperty({},dateOperationMap[operator],[fieldObject,valueAsArray]);}case\"between\":case\"notBetween\":{var _valueAsArray=toArray(value).map(function(v){return maybeFieldRenderer(v);});if(_valueAsArray.length<2)return false;return _defineProperty({},dateOperationMap[operator],[_valueAsArray[0],fieldObject,_valueAsArray[1]]);}}return defaultRuleProcessorJsonLogic(rule,options);};","function _slicedToArray(r,e){return _arrayWithHoles(r)||_iterableToArrayLimit(r,e)||_unsupportedIterableToArray(r,e)||_nonIterableRest();}function _nonIterableRest(){throw new TypeError(\"Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");}function _unsupportedIterableToArray(r,a){if(r){if(\"string\"==typeof r)return _arrayLikeToArray(r,a);var t={}.toString.call(r).slice(8,-1);return\"Object\"===t&&r.constructor&&(t=r.constructor.name),\"Map\"===t||\"Set\"===t?Array.from(r):\"Arguments\"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?_arrayLikeToArray(r,a):void 0;}}function _arrayLikeToArray(r,a){(null==a||a>r.length)&&(a=r.length);for(var e=0,n=Array(a);e<a;e++)n[e]=r[e];return n;}function _iterableToArrayLimit(r,l){var t=null==r?null:\"undefined\"!=typeof Symbol&&r[Symbol.iterator]||r[\"@@iterator\"];if(null!=t){var e,n,i,u,a=[],f=!0,o=!1;try{if(i=(t=t.call(r)).next,0===l){if(Object(t)!==t)return;f=!1;}else for(;!(f=(e=i.call(t)).done)&&(a.push(e.value),a.length!==l);f=!0);}catch(r){o=!0,n=r;}finally{try{if(!f&&null!=t[\"return\"]&&(u=t[\"return\"](),Object(u)!==u))return;}finally{if(o)throw n;}}return a;}}function _arrayWithHoles(r){if(Array.isArray(r))return r;}import{defaultRuleProcessorJSONata,getQuotedFieldName,nullOrUndefinedOrEmpty,toArray}from\"react-querybuilder\";import{processIsDateField}from\"./utils\";var shouldNegate=function shouldNegate(op){return /^(does)?not/i.test(op);};var negate=function negate(clause,negate2){return negate2?\"$not(\".concat(clause,\")\"):\"\".concat(clause);};export var getDatetimeRuleProcessorJSONata=function getDatetimeRuleProcessorJSONata(apiFns){return function(rule,options){var opts=options!==null&&options!==void 0?options:/* istanbul ignore next */{};var _opts$context=opts.context,context=_opts$context===void 0?{}:_opts$context;var _opts$quoteFieldNames=opts.quoteFieldNamesWith,quoteFieldNamesWith=_opts$quoteFieldNames===void 0?[\"\",\"\"]:_opts$quoteFieldNames,_opts$fieldIdentifier=opts.fieldIdentifierSeparator,fieldIdentifierSeparator=_opts$fieldIdentifier===void 0?\"\":_opts$fieldIdentifier;var field=rule.field,operator=rule.operator,value=rule.value,valueSource=rule.valueSource;if(!processIsDateField(context.isDateField,rule,opts)){return defaultRuleProcessorJSONata(rule,opts);}var valueIsField=valueSource===\"field\";var fldToMs=function fldToMs(f){return\"$toMillis(\".concat(getQuotedFieldName(f,{quoteFieldNamesWith:quoteFieldNamesWith,fieldIdentifierSeparator:fieldIdentifierSeparator}),\")\");};var valToMs=function valToMs(v){return\"$toMillis(\\\"\".concat(apiFns.toISOString(v),\"\\\")\");};switch(operator){case\"<\":case\"<=\":case\"=\":case\"!=\":case\">\":case\">=\":return\"\".concat(fldToMs(field),\" \").concat(operator,\" \").concat(valueIsField?fldToMs(value):valToMs(value));}var valueAsArray=toArray(rule.value,{retainEmptyStrings:false});var valueAsDateArray=valueAsArray.map(function(v){return apiFns.toDate(v);}).filter(function(dateVal){return apiFns.isValid(dateVal);});switch(operator){case\"in\":case\"notIn\":{if(valueIsField){if(valueAsArray.length===0)return\"\";return negate(\"\".concat(fldToMs(field),\" in [\").concat(valueAsArray.map(function(val){return fldToMs(val);}).join(\", \"),\"]\"),shouldNegate(operator));}if(valueAsDateArray.length===0)return\"\";return negate(\"\".concat(fldToMs(field),\" in [\").concat(valueAsDateArray.map(function(val){return valToMs(val);}).join(\", \"),\"]\"),shouldNegate(operator));}case\"between\":case\"notBetween\":{if(valueAsArray.length<2||nullOrUndefinedOrEmpty(valueAsArray[0])||nullOrUndefinedOrEmpty(valueAsArray[1])||!valueIsField&&valueAsDateArray.length<2){return\"\";}if(valueIsField){var _valueAsArray=_slicedToArray(valueAsArray,2),firstValue=_valueAsArray[0],secondValue=_valueAsArray[1];var expression2=\"\".concat(fldToMs(field),\" >= \").concat(fldToMs(firstValue),\" and \").concat(fldToMs(field),\" <= \").concat(fldToMs(secondValue));return operator===\"between\"?\"(\".concat(expression2,\")\"):negate(expression2,true);}var _valueAsDateArray=_slicedToArray(valueAsDateArray,2),first=_valueAsDateArray[0],second=_valueAsDateArray[1];var _ref=apiFns.isBefore(first,second)?[first,second]:[second,first],_ref2=_slicedToArray(_ref,2),firstDate=_ref2[0],secondDate=_ref2[1];var expression=\"\".concat(fldToMs(field),\" >= \").concat(valToMs(firstDate),\" and \").concat(fldToMs(field),\" <= \").concat(valToMs(secondDate));return operator===\"between\"?\"(\".concat(expression,\")\"):negate(expression,true);}}return defaultRuleProcessorJSONata(rule,opts);};};"],"mappings":"iHAAgyB,OAAO,iCAAAA,EAA8B,WAAAC,MAAY,qBAAj1B,SAASC,EAAQC,EAAE,CAAC,0BAA0B,OAAOD,EAAoB,OAAO,QAAnB,YAAqC,OAAO,OAAO,UAAxB,SAAiC,SAASC,EAAE,CAAC,OAAO,OAAOA,CAAE,EAAE,SAASA,EAAE,CAAC,OAAOA,GAAe,OAAO,QAAnB,YAA2BA,EAAE,cAAc,QAAQA,IAAI,OAAO,UAAU,SAAS,OAAOA,CAAE,EAAED,EAAQC,CAAC,CAAE,CAAC,SAASC,EAAgBC,EAAEC,EAAEC,EAAE,CAAC,OAAOD,EAAEE,EAAeF,C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,CAAC,EAAMG,EAAKlC,EAAO,SAASgC,EAAMC,CAAM,EAAE,CAACD,EAAMC,CAAM,EAAE,CAACA,EAAOD,CAAK,EAAEG,EAAMzD,EAAewD,EAAK,CAAC,EAAEE,EAAUD,EAAM,CAAC,EAAEE,EAAWF,EAAM,CAAC,EAAMG,EAAW,GAAG,OAAOrB,EAAQP,CAAK,EAAE,MAAM,EAAE,OAAOS,EAAQiB,CAAS,EAAE,OAAO,EAAE,OAAOnB,EAAQP,CAAK,EAAE,MAAM,EAAE,OAAOS,EAAQkB,CAAU,CAAC,EAAE,OAAO1B,IAAW,UAAU,IAAI,OAAO2B,EAAW,GAAG,EAAE1C,EAAO0C,EAAW,EAAI,CAAE,CAAC,CAAC,OAAOvB,EAA4Bd,EAAKE,CAAI,CAAE,CAAE","names":["defaultRuleProcessorJsonLogic","toArray","_typeof","o","_defineProperty","e","r","t","_toPropertyKey","i","_toPrimitive","dateOperationMap","datetimeRuleProcessorJsonLogic","rule","options","_opts$context","opts","processIsDateField","defaultRuleProcessorJsonLogic","field","operator","value","valueSource","valueIsField","fieldObject","maybeFieldRenderer","v","valueAsArray","toArray","_valueAsArray","defaultRuleProcessorJSONata","getQuotedFieldName","nullOrUndefinedOrEmpty","toArray","_slicedToArray","r","_arrayWithHoles","_iterableToArrayLimit","_unsupportedIterableToArray","_nonIterableRest","a","_arrayLikeToArray","t","e","l","n","i","u","f","o","shouldNegate","op","negate","clause","negate2","getDatetimeRuleProcessorJSONata","apiFns","rule","options","opts","_opts$context","context","_opts$quoteFieldNames","quoteFieldNamesWith","_opts$fieldIdentifier","fieldIdentifierSeparator","field","operator","value","valueSource","processIsDateField","defaultRuleProcessorJSONata","valueIsField","fldToMs","getQuotedFieldName","valToMs","v","valueAsArray","toArray","valueAsDateArray","dateVal","val","nullOrUndefinedOrEmpty","_valueAsArray","firstValue","secondValue","expression2","_valueAsDateArray","first","second","_ref","_ref2","firstDate","secondDate","expression"]}
@@ -0,0 +1,4 @@
1
+ import * as React from "react";
2
+ import type { QueryBuilderContextProvider, ValueEditorProps } from "react-querybuilder";
3
+ export declare const DateTimeValueEditor: (props: ValueEditorProps) => React.JSX.Element;
4
+ export declare const QueryBuilderDateTime: QueryBuilderContextProvider;
@@ -0,0 +1,10 @@
1
+ import type { RuleProcessor } from "react-querybuilder";
2
+ /**
3
+ * Date/time rule processor for use by {@link react-querybuilder!index.formatQuery formatQuery}
4
+ * with the "jsonlogic" format.
5
+ *
6
+ * Note: Unlike other date/time rule processors from this library, this function does
7
+ * not require a date/time library API. Instead, the date/time library API is used by
8
+ * {@link getDatetimeJsonLogicOperations} during the evaluation process.
9
+ */
10
+ export declare const datetimeRuleProcessorJsonLogic: RuleProcessor;
@@ -0,0 +1,6 @@
1
+ import type { RQBDateTimeLibraryAPI, RQBJsonLogicDateTimeOperations } from "./types";
2
+ /**
3
+ * Custom operations for use with JsonLogic objects generated by
4
+ * {@link datetimeRuleProcessorJsonLogic}.
5
+ */
6
+ export declare const getDatetimeJsonLogicOperations: ({ isAfter, isBefore, isSame }: RQBDateTimeLibraryAPI) => RQBJsonLogicDateTimeOperations;
@@ -0,0 +1,7 @@
1
+ import type { RuleProcessor } from "react-querybuilder";
2
+ import type { RQBDateTimeLibraryAPI } from "./types";
3
+ /**
4
+ * Generates a rule processor with date/time features for use by
5
+ * {@link react-querybuilder!index.formatQuery formatQuery} with the "cel" format.
6
+ */
7
+ export declare const getDatetimeRuleProcessorCEL: (apiFns: RQBDateTimeLibraryAPI) => RuleProcessor;
@@ -0,0 +1,7 @@
1
+ import type { RuleProcessor } from "react-querybuilder";
2
+ import type { RQBDateTimeLibraryAPI } from "./types";
3
+ /**
4
+ * Generates a rule processor with date/time features for use by
5
+ * {@link react-querybuilder!index.formatQuery formatQuery} with the "jsonata" format.
6
+ */
7
+ export declare const getDatetimeRuleProcessorJSONata: (apiFns: RQBDateTimeLibraryAPI) => RuleProcessor;
@@ -0,0 +1,7 @@
1
+ import type { RuleProcessor } from "react-querybuilder";
2
+ import type { RQBDateTimeLibraryAPI } from "./types";
3
+ /**
4
+ * Generates a rule processor with date/time features for use by
5
+ * {@link react-querybuilder!index.formatQuery formatQuery} with the "mongodb_query" format.
6
+ */
7
+ export declare const getDatetimeRuleProcessorMongoDBQuery: (apiFns: RQBDateTimeLibraryAPI) => RuleProcessor;
@@ -0,0 +1,32 @@
1
+ import type { RuleProcessor, ValueProcessorByRule } from "react-querybuilder";
2
+ import type { RQBDateTimeLibraryAPI } from "./types";
3
+ /**
4
+ * Generates a value processor with date/time features for use by
5
+ * {@link react-querybuilder!index.formatQuery formatQuery} with the "sql" format and "ansi" preset.
6
+ */
7
+ export declare const getDatetimeValueProcessorANSI: ({ toISOStringDateOnly, toISOString }: RQBDateTimeLibraryAPI) => ValueProcessorByRule;
8
+ /**
9
+ * Generates a value processor with date/time features for use by {@link react-querybuilder!index.formatQuery formatQuery} with
10
+ * the "sql" format and "mssql" preset.
11
+ */
12
+ export declare const getDatetimeValueProcessorMSSQL: ({ toISOStringDateOnly, toISOString }: RQBDateTimeLibraryAPI) => ValueProcessorByRule;
13
+ /**
14
+ * Generates a value processor with date/time features for use by {@link react-querybuilder!index.formatQuery formatQuery} with
15
+ * the "sql" format and "mysql" preset.
16
+ */
17
+ export declare const getDatetimeValueProcessorMySQL: ({ toISOStringDateOnly, toISOString }: RQBDateTimeLibraryAPI) => ValueProcessorByRule;
18
+ /**
19
+ * Generates a value processor with date/time features for use by {@link react-querybuilder!index.formatQuery formatQuery} with
20
+ * the "sql" format and "oracle" preset.
21
+ */
22
+ export declare const getDatetimeValueProcessorOracle: ({ toISOStringDateOnly, toISOString }: RQBDateTimeLibraryAPI) => ValueProcessorByRule;
23
+ /**
24
+ * Generates a value processor with date/time features for use by {@link react-querybuilder!index.formatQuery formatQuery} with
25
+ * the "sql" format and "postgresql" preset.
26
+ */
27
+ export declare const getDatetimeValueProcessorPostgreSQL: ({ toISOStringDateOnly, toISOString }: RQBDateTimeLibraryAPI) => ValueProcessorByRule;
28
+ /**
29
+ * Generates a rule processor with date/time features for use by {@link react-querybuilder!index.formatQuery formatQuery} with
30
+ * the "sql" format.
31
+ */
32
+ export declare const getDatetimeRuleProcessorSQL: (apiFns: RQBDateTimeLibraryAPI) => RuleProcessor;
@@ -0,0 +1,7 @@
1
+ export * from "./datetimeRuleProcessorJsonLogic";
2
+ export * from "./getDatetimeJsonLogicOperations";
3
+ export * from "./getDatetimeRuleProcessorCEL";
4
+ export * from "./getDatetimeRuleProcessorJSONata";
5
+ export * from "./getDatetimeRuleProcessorMongoDBQuery";
6
+ export * from "./getDatetimeRuleProcessorSQL";
7
+ export * from "./types";
@@ -0,0 +1,44 @@
1
+ /**
2
+ * Import from `"@react-querybuilder/datetime/date-fns"` for enhanced date/time support using [date-fns](https://date-fns.org/).
3
+ *
4
+ * @module date-fns
5
+ */
6
+ import type { RuleProcessor, ValueProcessorByRule } from "react-querybuilder";
7
+ import type { RQBJsonLogicDateTimeOperations } from "./types";
8
+ /**
9
+ * Custom JsonLogic date/time operations using date-fns
10
+ */
11
+ export declare const jsonLogicDateTimeOperations: RQBJsonLogicDateTimeOperations;
12
+ /**
13
+ * {@link react-querybuilder!index.formatQuery formatQuery} rule processor for "sql" format using date-fns
14
+ */
15
+ export declare const datetimeRuleProcessorSQL: RuleProcessor;
16
+ /**
17
+ * {@link react-querybuilder!index.formatQuery formatQuery} value processor for "sql" format ("ansi" preset) using date-fns
18
+ */
19
+ export declare const datetimeValueProcessorANSI: ValueProcessorByRule;
20
+ /**
21
+ * {@link react-querybuilder!index.formatQuery formatQuery} value processor for "sql" format ("mssql" preset) using date-fns
22
+ */
23
+ export declare const datetimeValueProcessorMSSQL: ValueProcessorByRule;
24
+ /**
25
+ * {@link react-querybuilder!index.formatQuery formatQuery} value processor for "sql" format ("mysql" preset) using date-fns
26
+ */
27
+ export declare const datetimeValueProcessorMySQL: ValueProcessorByRule;
28
+ /**
29
+ * {@link react-querybuilder!index.formatQuery formatQuery} value processor for "sql" format ("oracle" preset) using date-fns
30
+ */
31
+ export declare const datetimeValueProcessorOracle: ValueProcessorByRule;
32
+ /**
33
+ * {@link react-querybuilder!index.formatQuery formatQuery} value processor for "sql" format ("postgresql" preset) using date-fns
34
+ */
35
+ export declare const datetimeValueProcessorPostgreSQL: ValueProcessorByRule;
36
+ /**
37
+ * {@link react-querybuilder!index.formatQuery formatQuery} rule processor for "cel" format using date-fns
38
+ */
39
+ export declare const datetimeRuleProcessorCEL: ValueProcessorByRule;
40
+ /**
41
+ * {@link react-querybuilder!index.formatQuery formatQuery} rule processor for "mongodb_query" format using date-fns
42
+ */
43
+ export declare const datetimeRuleProcessorMongoDBQuery: ValueProcessorByRule;
44
+ export * from "./rqbDateTimeLibraryAPI.date-fns";
@@ -0,0 +1,44 @@
1
+ /**
2
+ * Import from `"@react-querybuilder/datetime/dayjs"` for enhanced date/time support using [Day.js](https://day.js.org/).
3
+ *
4
+ * @module dayjs
5
+ */
6
+ import type { RuleProcessor, ValueProcessorByRule } from "react-querybuilder";
7
+ import type { RQBJsonLogicDateTimeOperations } from "./types";
8
+ /**
9
+ * Custom JsonLogic date/time operations using Day.js
10
+ */
11
+ export declare const jsonLogicDateTimeOperations: RQBJsonLogicDateTimeOperations;
12
+ /**
13
+ * {@link react-querybuilder!index.formatQuery formatQuery} rule processor for "sql" format using Day.js
14
+ */
15
+ export declare const datetimeRuleProcessorSQL: RuleProcessor;
16
+ /**
17
+ * {@link react-querybuilder!index.formatQuery formatQuery} value processor for "sql" format ("ansi" preset) using Day.js
18
+ */
19
+ export declare const datetimeValueProcessorANSI: ValueProcessorByRule;
20
+ /**
21
+ * {@link react-querybuilder!index.formatQuery formatQuery} value processor for "sql" format ("mssql" preset) using Day.js
22
+ */
23
+ export declare const datetimeValueProcessorMSSQL: ValueProcessorByRule;
24
+ /**
25
+ * {@link react-querybuilder!index.formatQuery formatQuery} value processor for "sql" format ("mysql" preset) using Day.js
26
+ */
27
+ export declare const datetimeValueProcessorMySQL: ValueProcessorByRule;
28
+ /**
29
+ * {@link react-querybuilder!index.formatQuery formatQuery} value processor for "sql" format ("oracle" preset) using Day.js
30
+ */
31
+ export declare const datetimeValueProcessorOracle: ValueProcessorByRule;
32
+ /**
33
+ * {@link react-querybuilder!index.formatQuery formatQuery} value processor for "sql" format ("postgresql" preset) using Day.js
34
+ */
35
+ export declare const datetimeValueProcessorPostgreSQL: ValueProcessorByRule;
36
+ /**
37
+ * {@link react-querybuilder!index.formatQuery formatQuery} rule processor for "cel" format using Day.js
38
+ */
39
+ export declare const datetimeRuleProcessorCEL: ValueProcessorByRule;
40
+ /**
41
+ * {@link react-querybuilder!index.formatQuery formatQuery} rule processor for "mongodb_query" format using Day.js
42
+ */
43
+ export declare const datetimeRuleProcessorMongoDBQuery: ValueProcessorByRule;
44
+ export * from "./rqbDateTimeLibraryAPI.dayjs";
@@ -0,0 +1,44 @@
1
+ /**
2
+ * Import from `"@react-querybuilder/datetime/jsdate"` for enhanced date/time support using a custom JavaScript `Date`-based library.
3
+ *
4
+ * @module jsdate
5
+ */
6
+ import type { RuleProcessor, ValueProcessorByRule } from "react-querybuilder";
7
+ import type { RQBJsonLogicDateTimeOperations } from "./types";
8
+ /**
9
+ * Custom JsonLogic date/time operations using JavaScript `Date`.
10
+ */
11
+ export declare const jsonLogicDateTimeOperations: RQBJsonLogicDateTimeOperations;
12
+ /**
13
+ * {@link react-querybuilder!index.formatQuery formatQuery} rule processor for "sql" format using JavaScript `Date`
14
+ */
15
+ export declare const datetimeRuleProcessorSQL: RuleProcessor;
16
+ /**
17
+ * {@link react-querybuilder!index.formatQuery formatQuery} value processor for "sql" format ("ansi" preset) using JavaScript `Date`
18
+ */
19
+ export declare const datetimeValueProcessorANSI: ValueProcessorByRule;
20
+ /**
21
+ * {@link react-querybuilder!index.formatQuery formatQuery} value processor for "sql" format ("mssql" preset) using JavaScript `Date`
22
+ */
23
+ export declare const datetimeValueProcessorMSSQL: ValueProcessorByRule;
24
+ /**
25
+ * {@link react-querybuilder!index.formatQuery formatQuery} value processor for "sql" format ("mysql" preset) using JavaScript `Date`
26
+ */
27
+ export declare const datetimeValueProcessorMySQL: ValueProcessorByRule;
28
+ /**
29
+ * {@link react-querybuilder!index.formatQuery formatQuery} value processor for "sql" format ("oracle" preset) using JavaScript `Date`
30
+ */
31
+ export declare const datetimeValueProcessorOracle: ValueProcessorByRule;
32
+ /**
33
+ * {@link react-querybuilder!index.formatQuery formatQuery} value processor for "sql" format ("postgresql" preset) using JavaScript `Date`
34
+ */
35
+ export declare const datetimeValueProcessorPostgreSQL: ValueProcessorByRule;
36
+ /**
37
+ * {@link react-querybuilder!index.formatQuery formatQuery} rule processor for "cel" format using JavaScript `Date`
38
+ */
39
+ export declare const datetimeRuleProcessorCEL: RuleProcessor;
40
+ /**
41
+ * {@link react-querybuilder!index.formatQuery formatQuery} rule processor for "mongodb_query" format using JavaScript `Date`
42
+ */
43
+ export declare const datetimeRuleProcessorMongoDBQuery: RuleProcessor;
44
+ export * from "./rqbDateTimeLibraryAPI.jsdate";
@@ -0,0 +1,44 @@
1
+ /**
2
+ * Import from `"@react-querybuilder/datetime/luxon"` for enhanced date/time support using [Luxon](https://moment.github.io/luxon/).
3
+ *
4
+ * @module luxon
5
+ */
6
+ import type { RuleProcessor, ValueProcessorByRule } from "react-querybuilder";
7
+ import type { RQBJsonLogicDateTimeOperations } from "./types";
8
+ /**
9
+ * Custom JsonLogic date/time operations using Luxon
10
+ */
11
+ export declare const jsonLogicDateTimeOperations: RQBJsonLogicDateTimeOperations;
12
+ /**
13
+ * {@link react-querybuilder!index.formatQuery formatQuery} rule processor for "sql" format using Luxon
14
+ */
15
+ export declare const datetimeRuleProcessorSQL: RuleProcessor;
16
+ /**
17
+ * {@link react-querybuilder!index.formatQuery formatQuery} value processor for "sql" format ("ansi" preset) using Luxon
18
+ */
19
+ export declare const datetimeValueProcessorANSI: ValueProcessorByRule;
20
+ /**
21
+ * {@link react-querybuilder!index.formatQuery formatQuery} value processor for "sql" format ("mssql" preset) using Luxon
22
+ */
23
+ export declare const datetimeValueProcessorMSSQL: ValueProcessorByRule;
24
+ /**
25
+ * {@link react-querybuilder!index.formatQuery formatQuery} value processor for "sql" format ("mysql" preset) using Luxon
26
+ */
27
+ export declare const datetimeValueProcessorMySQL: ValueProcessorByRule;
28
+ /**
29
+ * {@link react-querybuilder!index.formatQuery formatQuery} value processor for "sql" format ("oracle" preset) using Luxon
30
+ */
31
+ export declare const datetimeValueProcessorOracle: ValueProcessorByRule;
32
+ /**
33
+ * {@link react-querybuilder!index.formatQuery formatQuery} value processor for "sql" format ("postgresql" preset) using Luxon
34
+ */
35
+ export declare const datetimeValueProcessorPostgreSQL: ValueProcessorByRule;
36
+ /**
37
+ * {@link react-querybuilder!index.formatQuery formatQuery} rule processor for "cel" format using Luxon
38
+ */
39
+ export declare const datetimeRuleProcessorCEL: ValueProcessorByRule;
40
+ /**
41
+ * {@link react-querybuilder!index.formatQuery formatQuery} rule processor for "mongodb_query" format using Luxon
42
+ */
43
+ export declare const datetimeRuleProcessorMongoDBQuery: ValueProcessorByRule;
44
+ export * from "./rqbDateTimeLibraryAPI.luxon";
@@ -0,0 +1,5 @@
1
+ import type { RQBDateTimeLibraryAPI } from "./types";
2
+ /**
3
+ * {@link RQBDateTimeLibraryAPI} for date-fns
4
+ */
5
+ export declare const rqbDateTimeLibraryAPI: RQBDateTimeLibraryAPI;
@@ -0,0 +1,5 @@
1
+ import type { RQBDateTimeLibraryAPI } from "./types";
2
+ /**
3
+ * {@link RQBDateTimeLibraryAPI} for Day.js
4
+ */
5
+ export declare const rqbDateTimeLibraryAPI: RQBDateTimeLibraryAPI;
@@ -0,0 +1,8 @@
1
+ import type { RQBDateTimeLibraryAPI } from "./types";
2
+ /**
3
+ * {@link RQBDateTimeLibraryAPI} for JavaScript `Date`
4
+ *
5
+ * @deprecated This API will not be removed, but we recommend using one of the other
6
+ * {@link RQBDateTimeLibraryAPI}s based on a popular library instead.
7
+ */
8
+ export declare const rqbDateTimeLibraryAPI: RQBDateTimeLibraryAPI;
@@ -0,0 +1,5 @@
1
+ import type { RQBDateTimeLibraryAPI } from "./types";
2
+ /**
3
+ * {@link RQBDateTimeLibraryAPI} for Luxon
4
+ */
5
+ export declare const rqbDateTimeLibraryAPI: RQBDateTimeLibraryAPI;
@@ -0,0 +1,101 @@
1
+ import type { RulesLogic } from "json-logic-js";
2
+ import type { RQBJsonLogic, RuleProcessor } from "react-querybuilder";
3
+ export interface RQBJsonLogicDateBetween {
4
+ dateBetween: [RQBJsonLogic, RQBJsonLogic, RQBJsonLogic];
5
+ }
6
+ export interface RQBJsonLogicDateNotBetween {
7
+ dateNotBetween: [RQBJsonLogic, RQBJsonLogic, RQBJsonLogic];
8
+ }
9
+ export interface RQBJsonLogicDateIn {
10
+ dateIn: [RQBJsonLogic, RQBJsonLogic[]];
11
+ }
12
+ export interface RQBJsonLogicDateNotIn {
13
+ dateNotIn: [RQBJsonLogic, RQBJsonLogic[]];
14
+ }
15
+ export interface RQBJsonLogicDateBefore {
16
+ dateBefore: [RQBJsonLogic, RQBJsonLogic, ...RQBJsonLogic[]];
17
+ }
18
+ export interface RQBJsonLogicDateOnOrBefore {
19
+ dateOnOrBefore: [RQBJsonLogic, RQBJsonLogic, ...RQBJsonLogic[]];
20
+ }
21
+ export interface RQBJsonLogicDateOn {
22
+ dateOn: [RQBJsonLogic, RQBJsonLogic, ...RQBJsonLogic[]];
23
+ }
24
+ export interface RQBJsonLogicDateNotOn {
25
+ dateNotOn: [RQBJsonLogic, RQBJsonLogic, ...RQBJsonLogic[]];
26
+ }
27
+ export interface RQBJsonLogicDateAfter {
28
+ dateAfter: [RQBJsonLogic, RQBJsonLogic, ...RQBJsonLogic[]];
29
+ }
30
+ export interface RQBJsonLogicDateOnOrAfter {
31
+ dateOnOrAfter: [RQBJsonLogic, RQBJsonLogic, ...RQBJsonLogic[]];
32
+ }
33
+ /**
34
+ * JsonLogic rule object with additional operators generated by
35
+ * {@link react-querybuilder!index.formatQuery formatQuery} and accepted by
36
+ * {@link react-querybuilder!parseJsonLogic.parseJsonLogic parseJsonLogic}.
37
+ */
38
+ export type RQBDateTimeJsonLogic = RQBJsonLogic | RulesLogic<RQBJsonLogicDateAfter | RQBJsonLogicDateBefore | RQBJsonLogicDateBetween | RQBJsonLogicDateIn | RQBJsonLogicDateNotBetween | RQBJsonLogicDateNotIn | RQBJsonLogicDateNotOn | RQBJsonLogicDateOn | RQBJsonLogicDateOnOrAfter | RQBJsonLogicDateOnOrBefore>;
39
+ type DateOrString = string | Date;
40
+ export interface RQBDateTimeLibraryAPI {
41
+ /**
42
+ * Formats a date as a string.
43
+ */
44
+ format: (d: DateOrString, fmt: string) => string;
45
+ /**
46
+ * Formats a date as an ISO 8601 string, only including
47
+ * the year, month, and day ('YYYY-MM-DD').
48
+ */
49
+ toISOStringDateOnly: (d: DateOrString) => string;
50
+ /**
51
+ * Determines whether the first date is after the second date.
52
+ */
53
+ isAfter: (a: DateOrString, b: DateOrString) => boolean;
54
+ /**
55
+ * Determines whether the first date is before the second date.
56
+ */
57
+ isBefore: (a: DateOrString, b: DateOrString) => boolean;
58
+ /**
59
+ * Determines whether the first date is the same as the second date.
60
+ *
61
+ * If either the first date or the second date is a string in the
62
+ * format 'YYYY-MM-DD', then the dates will only be compared at
63
+ * the date level (no time component). Otherwise, they will be
64
+ * compared to the millisecond.
65
+ */
66
+ isSame: (a: DateOrString, b: DateOrString) => boolean;
67
+ /**
68
+ * Determines whether the date is either a valid `Date` object or an
69
+ * ISO 8601-formatted string representing a valid date.
70
+ */
71
+ isValid: (d: DateOrString) => boolean;
72
+ /**
73
+ * Converts a string to a `Date` object or returns a valid `Date` as is.
74
+ */
75
+ toDate: (d: DateOrString) => Date;
76
+ /**
77
+ * Converts a `Date` or ISO 8601-formatted string into a full ISO 8601 UTC
78
+ * string, in the format 'YYYY-MM-DDTHH:mm:ss.SSSZ' (the "T" and "Z" are
79
+ * static; other parts represent standard time units, increasing in precision
80
+ * from left to right).
81
+ */
82
+ toISOString: (d: DateOrString) => string;
83
+ }
84
+ type FnDateDate = (a: DateOrString, b: DateOrString) => boolean;
85
+ type FnDateArrayOfDates = (a: DateOrString, b: DateOrString[]) => boolean;
86
+ type FnDateDateDate = (a: DateOrString, b: DateOrString, c: DateOrString) => boolean;
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;
98
+ };
99
+ export type IsDateFieldFunction = (...[rule, opts]: Parameters<RuleProcessor>) => boolean;
100
+ export type IsDateField = IsDateFieldFunction | Record<string, unknown> | Record<string, unknown>[] | boolean | undefined;
101
+ export {};
@@ -0,0 +1,5 @@
1
+ import type { RuleProcessor } from "react-querybuilder";
2
+ import type { IsDateField, IsDateFieldFunction } from "./types";
3
+ export declare const isISOStringDateOnly: (date: unknown) => date is `${number}${number}${number}${number}-${number}${number}-${number}${number}`;
4
+ export declare const defaultIsDateField: IsDateFieldFunction;
5
+ export declare const processIsDateField: (isDateField: IsDateField, ...[rule, opts]: Parameters<RuleProcessor>) => boolean;
@@ -0,0 +1,4 @@
1
+ import * as React from "react";
2
+ import type { QueryBuilderContextProvider, ValueEditorProps } from "react-querybuilder";
3
+ export declare const DateTimeValueEditor: (props: ValueEditorProps) => React.JSX.Element;
4
+ export declare const QueryBuilderDateTime: QueryBuilderContextProvider;
@@ -0,0 +1,10 @@
1
+ import type { RuleProcessor } from "react-querybuilder";
2
+ /**
3
+ * Date/time rule processor for use by {@link react-querybuilder!index.formatQuery formatQuery}
4
+ * with the "jsonlogic" format.
5
+ *
6
+ * Note: Unlike other date/time rule processors from this library, this function does
7
+ * not require a date/time library API. Instead, the date/time library API is used by
8
+ * {@link getDatetimeJsonLogicOperations} during the evaluation process.
9
+ */
10
+ export declare const datetimeRuleProcessorJsonLogic: RuleProcessor;
@@ -0,0 +1,6 @@
1
+ import type { RQBDateTimeLibraryAPI, RQBJsonLogicDateTimeOperations } from "./types.mjs";
2
+ /**
3
+ * Custom operations for use with JsonLogic objects generated by
4
+ * {@link datetimeRuleProcessorJsonLogic}.
5
+ */
6
+ export declare const getDatetimeJsonLogicOperations: ({ isAfter, isBefore, isSame }: RQBDateTimeLibraryAPI) => RQBJsonLogicDateTimeOperations;
@@ -0,0 +1,7 @@
1
+ import type { RuleProcessor } from "react-querybuilder";
2
+ import type { RQBDateTimeLibraryAPI } from "./types.mjs";
3
+ /**
4
+ * Generates a rule processor with date/time features for use by
5
+ * {@link react-querybuilder!index.formatQuery formatQuery} with the "cel" format.
6
+ */
7
+ export declare const getDatetimeRuleProcessorCEL: (apiFns: RQBDateTimeLibraryAPI) => RuleProcessor;
@@ -0,0 +1,7 @@
1
+ import type { RuleProcessor } from "react-querybuilder";
2
+ import type { RQBDateTimeLibraryAPI } from "./types.mjs";
3
+ /**
4
+ * Generates a rule processor with date/time features for use by
5
+ * {@link react-querybuilder!index.formatQuery formatQuery} with the "jsonata" format.
6
+ */
7
+ export declare const getDatetimeRuleProcessorJSONata: (apiFns: RQBDateTimeLibraryAPI) => RuleProcessor;
@@ -0,0 +1,7 @@
1
+ import type { RuleProcessor } from "react-querybuilder";
2
+ import type { RQBDateTimeLibraryAPI } from "./types.mjs";
3
+ /**
4
+ * Generates a rule processor with date/time features for use by
5
+ * {@link react-querybuilder!index.formatQuery formatQuery} with the "mongodb_query" format.
6
+ */
7
+ export declare const getDatetimeRuleProcessorMongoDBQuery: (apiFns: RQBDateTimeLibraryAPI) => RuleProcessor;
@@ -0,0 +1,32 @@
1
+ import type { RuleProcessor, ValueProcessorByRule } from "react-querybuilder";
2
+ import type { RQBDateTimeLibraryAPI } from "./types.mjs";
3
+ /**
4
+ * Generates a value processor with date/time features for use by
5
+ * {@link react-querybuilder!index.formatQuery formatQuery} with the "sql" format and "ansi" preset.
6
+ */
7
+ export declare const getDatetimeValueProcessorANSI: ({ toISOStringDateOnly, toISOString }: RQBDateTimeLibraryAPI) => ValueProcessorByRule;
8
+ /**
9
+ * Generates a value processor with date/time features for use by {@link react-querybuilder!index.formatQuery formatQuery} with
10
+ * the "sql" format and "mssql" preset.
11
+ */
12
+ export declare const getDatetimeValueProcessorMSSQL: ({ toISOStringDateOnly, toISOString }: RQBDateTimeLibraryAPI) => ValueProcessorByRule;
13
+ /**
14
+ * Generates a value processor with date/time features for use by {@link react-querybuilder!index.formatQuery formatQuery} with
15
+ * the "sql" format and "mysql" preset.
16
+ */
17
+ export declare const getDatetimeValueProcessorMySQL: ({ toISOStringDateOnly, toISOString }: RQBDateTimeLibraryAPI) => ValueProcessorByRule;
18
+ /**
19
+ * Generates a value processor with date/time features for use by {@link react-querybuilder!index.formatQuery formatQuery} with
20
+ * the "sql" format and "oracle" preset.
21
+ */
22
+ export declare const getDatetimeValueProcessorOracle: ({ toISOStringDateOnly, toISOString }: RQBDateTimeLibraryAPI) => ValueProcessorByRule;
23
+ /**
24
+ * Generates a value processor with date/time features for use by {@link react-querybuilder!index.formatQuery formatQuery} with
25
+ * the "sql" format and "postgresql" preset.
26
+ */
27
+ export declare const getDatetimeValueProcessorPostgreSQL: ({ toISOStringDateOnly, toISOString }: RQBDateTimeLibraryAPI) => ValueProcessorByRule;
28
+ /**
29
+ * Generates a rule processor with date/time features for use by {@link react-querybuilder!index.formatQuery formatQuery} with
30
+ * the "sql" format.
31
+ */
32
+ export declare const getDatetimeRuleProcessorSQL: (apiFns: RQBDateTimeLibraryAPI) => RuleProcessor;
@@ -0,0 +1,7 @@
1
+ export * from "./datetimeRuleProcessorJsonLogic.mjs";
2
+ export * from "./getDatetimeJsonLogicOperations.mjs";
3
+ export * from "./getDatetimeRuleProcessorCEL.mjs";
4
+ export * from "./getDatetimeRuleProcessorJSONata.mjs";
5
+ export * from "./getDatetimeRuleProcessorMongoDBQuery.mjs";
6
+ export * from "./getDatetimeRuleProcessorSQL.mjs";
7
+ export * from "./types.mjs";
@@ -0,0 +1,44 @@
1
+ /**
2
+ * Import from `"@react-querybuilder/datetime/date-fns"` for enhanced date/time support using [date-fns](https://date-fns.org/).
3
+ *
4
+ * @module date-fns
5
+ */
6
+ import type { RuleProcessor, ValueProcessorByRule } from "react-querybuilder";
7
+ import type { RQBJsonLogicDateTimeOperations } from "./types.mjs";
8
+ /**
9
+ * Custom JsonLogic date/time operations using date-fns
10
+ */
11
+ export declare const jsonLogicDateTimeOperations: RQBJsonLogicDateTimeOperations;
12
+ /**
13
+ * {@link react-querybuilder!index.formatQuery formatQuery} rule processor for "sql" format using date-fns
14
+ */
15
+ export declare const datetimeRuleProcessorSQL: RuleProcessor;
16
+ /**
17
+ * {@link react-querybuilder!index.formatQuery formatQuery} value processor for "sql" format ("ansi" preset) using date-fns
18
+ */
19
+ export declare const datetimeValueProcessorANSI: ValueProcessorByRule;
20
+ /**
21
+ * {@link react-querybuilder!index.formatQuery formatQuery} value processor for "sql" format ("mssql" preset) using date-fns
22
+ */
23
+ export declare const datetimeValueProcessorMSSQL: ValueProcessorByRule;
24
+ /**
25
+ * {@link react-querybuilder!index.formatQuery formatQuery} value processor for "sql" format ("mysql" preset) using date-fns
26
+ */
27
+ export declare const datetimeValueProcessorMySQL: ValueProcessorByRule;
28
+ /**
29
+ * {@link react-querybuilder!index.formatQuery formatQuery} value processor for "sql" format ("oracle" preset) using date-fns
30
+ */
31
+ export declare const datetimeValueProcessorOracle: ValueProcessorByRule;
32
+ /**
33
+ * {@link react-querybuilder!index.formatQuery formatQuery} value processor for "sql" format ("postgresql" preset) using date-fns
34
+ */
35
+ export declare const datetimeValueProcessorPostgreSQL: ValueProcessorByRule;
36
+ /**
37
+ * {@link react-querybuilder!index.formatQuery formatQuery} rule processor for "cel" format using date-fns
38
+ */
39
+ export declare const datetimeRuleProcessorCEL: ValueProcessorByRule;
40
+ /**
41
+ * {@link react-querybuilder!index.formatQuery formatQuery} rule processor for "mongodb_query" format using date-fns
42
+ */
43
+ export declare const datetimeRuleProcessorMongoDBQuery: ValueProcessorByRule;
44
+ export * from "./rqbDateTimeLibraryAPI.date-fns.mjs";