@react-querybuilder/datetime 8.11.1 → 8.12.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 (70) hide show
  1. package/dist/chunk-DrjzjjTJ.mjs +23 -0
  2. package/dist/chunk-Dv2ph0Ay.js +23 -0
  3. package/dist/cjs/getDatetimeRuleProcessorSQL-B0uQUU_F.js +2 -0
  4. package/dist/cjs/{getDatetimeRuleProcessorSQL-CSxxM8ce.js.map → getDatetimeRuleProcessorSQL-B0uQUU_F.js.map} +1 -1
  5. package/dist/cjs/{getDatetimeRuleProcessorSQL-COEhnVIZ.js → getDatetimeRuleProcessorSQL-Dkg4HEtH.js} +2 -31
  6. package/dist/cjs/{getDatetimeRuleProcessorSQL-COEhnVIZ.js.map → getDatetimeRuleProcessorSQL-Dkg4HEtH.js.map} +1 -1
  7. package/dist/cjs/react-querybuilder_datetime.cjs.development.d.ts +1 -1
  8. package/dist/cjs/react-querybuilder_datetime.cjs.development.date-fns.d.ts +1 -1
  9. package/dist/cjs/react-querybuilder_datetime.cjs.development.date-fns.js +2 -2
  10. package/dist/cjs/react-querybuilder_datetime.cjs.development.dayjs.d.ts +1 -1
  11. package/dist/cjs/react-querybuilder_datetime.cjs.development.dayjs.js +26 -2
  12. package/dist/cjs/react-querybuilder_datetime.cjs.development.dayjs.js.map +1 -1
  13. package/dist/cjs/react-querybuilder_datetime.cjs.development.js +2 -2
  14. package/dist/cjs/react-querybuilder_datetime.cjs.development.jsdate.d.ts +1 -1
  15. package/dist/cjs/react-querybuilder_datetime.cjs.development.jsdate.js +1 -1
  16. package/dist/cjs/react-querybuilder_datetime.cjs.development.luxon.d.ts +1 -1
  17. package/dist/cjs/react-querybuilder_datetime.cjs.development.luxon.js +2 -2
  18. package/dist/cjs/react-querybuilder_datetime.cjs.production.d.ts +1 -1
  19. package/dist/cjs/react-querybuilder_datetime.cjs.production.date-fns.d.ts +1 -1
  20. package/dist/cjs/react-querybuilder_datetime.cjs.production.date-fns.js +1 -1
  21. package/dist/cjs/react-querybuilder_datetime.cjs.production.date-fns.js.map +1 -1
  22. package/dist/cjs/react-querybuilder_datetime.cjs.production.dayjs.d.ts +1 -1
  23. package/dist/cjs/react-querybuilder_datetime.cjs.production.dayjs.js +1 -1
  24. package/dist/cjs/react-querybuilder_datetime.cjs.production.dayjs.js.map +1 -1
  25. package/dist/cjs/react-querybuilder_datetime.cjs.production.js +1 -1
  26. package/dist/cjs/react-querybuilder_datetime.cjs.production.js.map +1 -1
  27. package/dist/cjs/react-querybuilder_datetime.cjs.production.jsdate.d.ts +1 -1
  28. package/dist/cjs/react-querybuilder_datetime.cjs.production.jsdate.js +1 -1
  29. package/dist/cjs/react-querybuilder_datetime.cjs.production.luxon.d.ts +1 -1
  30. package/dist/cjs/react-querybuilder_datetime.cjs.production.luxon.js +1 -1
  31. package/dist/cjs/react-querybuilder_datetime.cjs.production.luxon.js.map +1 -1
  32. package/dist/cjs/{types-A60rB27l.d.ts → types-BF3ibCEu.d.ts} +39 -4
  33. package/dist/{getDatetimeRuleProcessorSQL-CSl2zGza.mjs → getDatetimeRuleProcessorSQL-Cf79Th_c.mjs} +1 -1
  34. package/dist/{getDatetimeRuleProcessorSQL-CSl2zGza.mjs.map → getDatetimeRuleProcessorSQL-Cf79Th_c.mjs.map} +1 -1
  35. package/dist/{getDatetimeRuleProcessorSQL-B8y0RI7t.js → getDatetimeRuleProcessorSQL-DfPnCZiT.js} +6 -6
  36. package/dist/{getDatetimeRuleProcessorSQL-B8y0RI7t.js.map → getDatetimeRuleProcessorSQL-DfPnCZiT.js.map} +1 -1
  37. package/dist/react-querybuilder_datetime.d.mts +1 -1
  38. package/dist/react-querybuilder_datetime.date-fns.d.mts +1 -1
  39. package/dist/react-querybuilder_datetime.date-fns.mjs +1 -1
  40. package/dist/react-querybuilder_datetime.dayjs.d.mts +1 -1
  41. package/dist/react-querybuilder_datetime.dayjs.mjs +1 -1
  42. package/dist/react-querybuilder_datetime.jsdate.d.mts +1 -1
  43. package/dist/react-querybuilder_datetime.jsdate.mjs +1 -1
  44. package/dist/react-querybuilder_datetime.legacy-esm.d.ts +1 -1
  45. package/dist/react-querybuilder_datetime.legacy-esm.date-fns.d.ts +1 -1
  46. package/dist/react-querybuilder_datetime.legacy-esm.date-fns.js +1 -1
  47. package/dist/react-querybuilder_datetime.legacy-esm.dayjs.d.ts +1 -1
  48. package/dist/react-querybuilder_datetime.legacy-esm.dayjs.js +1 -1
  49. package/dist/react-querybuilder_datetime.legacy-esm.js +1 -1
  50. package/dist/react-querybuilder_datetime.legacy-esm.jsdate.d.ts +1 -1
  51. package/dist/react-querybuilder_datetime.legacy-esm.jsdate.js +1 -1
  52. package/dist/react-querybuilder_datetime.legacy-esm.luxon.d.ts +1 -1
  53. package/dist/react-querybuilder_datetime.legacy-esm.luxon.js +1 -1
  54. package/dist/react-querybuilder_datetime.luxon.d.mts +1 -1
  55. package/dist/react-querybuilder_datetime.luxon.mjs +1 -1
  56. package/dist/react-querybuilder_datetime.mjs +1 -1
  57. package/dist/react-querybuilder_datetime.production.d.mts +1 -1
  58. package/dist/react-querybuilder_datetime.production.date-fns.d.mts +1 -1
  59. package/dist/react-querybuilder_datetime.production.date-fns.mjs +1 -1
  60. package/dist/react-querybuilder_datetime.production.dayjs.d.mts +1 -1
  61. package/dist/react-querybuilder_datetime.production.dayjs.mjs +1 -1
  62. package/dist/react-querybuilder_datetime.production.jsdate.d.mts +1 -1
  63. package/dist/react-querybuilder_datetime.production.jsdate.mjs +1 -1
  64. package/dist/react-querybuilder_datetime.production.luxon.d.mts +1 -1
  65. package/dist/react-querybuilder_datetime.production.luxon.mjs +1 -1
  66. package/dist/react-querybuilder_datetime.production.mjs +1 -1
  67. package/dist/{types-BjHLhGXX.d.mts → types-CU16s8jw.d.ts} +60 -24
  68. package/dist/{types-Dq7BlQzI.d.ts → types-DNawVAiI.d.mts} +60 -24
  69. package/package.json +10 -10
  70. package/dist/cjs/getDatetimeRuleProcessorSQL-CSxxM8ce.js +0 -2
@@ -1 +1 @@
1
- {"version":3,"file":"react-querybuilder_datetime.cjs.production.date-fns.js","names":["toDate: typeof dateFnsToDate","rqbDateTimeLibraryAPI: RQBDateTimeLibraryAPI","isISOStringDateOnly","jsonLogicDateTimeOperations: RQBJsonLogicDateTimeOperations","getDatetimeJsonLogicOperations","datetimeRuleProcessorSQL: RuleProcessor","getDatetimeRuleProcessorSQL","datetimeValueProcessorANSI: ValueProcessorByRule","getDatetimeValueProcessorANSI","datetimeValueProcessorMSSQL: ValueProcessorByRule","getDatetimeValueProcessorMSSQL","datetimeValueProcessorMySQL: ValueProcessorByRule","getDatetimeValueProcessorMySQL","datetimeValueProcessorOracle: ValueProcessorByRule","getDatetimeValueProcessorOracle","datetimeValueProcessorPostgreSQL: ValueProcessorByRule","getDatetimeValueProcessorPostgreSQL","datetimeRuleProcessorCEL: ValueProcessorByRule","getDatetimeRuleProcessorCEL","datetimeRuleProcessorMongoDBQuery: ValueProcessorByRule","getDatetimeRuleProcessorMongoDBQuery","datetimeRuleProcessorNL: ValueProcessorByRule","getDatetimeRuleProcessorNL"],"sources":["../../src/rqbDateTimeLibraryAPI.date-fns.ts","../../src/index.date-fns.ts"],"sourcesContent":["import {\n toDate as dateFnsToDate,\n format,\n isAfter,\n isBefore,\n isSameDay,\n isValid,\n parseISO,\n} from 'date-fns';\nimport type { RQBDateTimeLibraryAPI } from './types';\nimport { isISOStringDateOnly } from './utils';\n\nconst toDate: typeof dateFnsToDate = a => (typeof a === 'string' ? parseISO(a) : dateFnsToDate(a));\nconst iso8601DateOnly = 'yyyy-MM-dd';\n\n/**\n * {@link RQBDateTimeLibraryAPI} for date-fns\n */\nexport const rqbDateTimeLibraryAPI: RQBDateTimeLibraryAPI = {\n format: (d, fmt) => format(toDate(d), fmt.replace('YYYY-MM-DD', iso8601DateOnly)),\n isAfter,\n isBefore,\n isSame: (a, b) => {\n const aToDate = toDate(a);\n const bToDate = toDate(b);\n return isISOStringDateOnly(a) || isISOStringDateOnly(b)\n ? isSameDay(aToDate, bToDate)\n : aToDate.getTime() === bToDate.getTime();\n },\n isValid: d => isValid(toDate(d)),\n toDate,\n toISOString: d => {\n const dToDate = toDate(d);\n return isValid(dToDate) ? dToDate.toISOString() : '';\n },\n toISOStringDateOnly: d => {\n const dToDate = toDate(d);\n return isValid(dToDate) ? format(dToDate, iso8601DateOnly) : '';\n },\n};\n","/**\n * Import from `\"@react-querybuilder/datetime/date-fns\"` for enhanced date/time support using [date-fns](https://date-fns.org/).\n *\n * @module date-fns\n */\n\nimport type { RuleProcessor, ValueProcessorByRule } from 'react-querybuilder';\nimport { getDatetimeJsonLogicOperations } from './getDatetimeJsonLogicOperations';\nimport { getDatetimeRuleProcessorCEL } from './getDatetimeRuleProcessorCEL';\nimport { getDatetimeRuleProcessorMongoDBQuery } from './getDatetimeRuleProcessorMongoDBQuery';\nimport { getDatetimeRuleProcessorNL } from './getDatetimeRuleProcessorNL';\nimport {\n getDatetimeRuleProcessorSQL,\n getDatetimeValueProcessorANSI,\n getDatetimeValueProcessorMSSQL,\n getDatetimeValueProcessorMySQL,\n getDatetimeValueProcessorOracle,\n getDatetimeValueProcessorPostgreSQL,\n} from './getDatetimeRuleProcessorSQL';\nimport { rqbDateTimeLibraryAPI } from './rqbDateTimeLibraryAPI.date-fns';\nimport type { RQBJsonLogicDateTimeOperations } from './types';\n\n/**\n * Custom JsonLogic date/time operations using date-fns\n */\nexport const jsonLogicDateTimeOperations: RQBJsonLogicDateTimeOperations =\n getDatetimeJsonLogicOperations(rqbDateTimeLibraryAPI);\n\n/**\n * {@link @react-querybuilder/core!formatQuery formatQuery} rule processor for \"sql\" format using date-fns\n */\nexport const datetimeRuleProcessorSQL: RuleProcessor =\n getDatetimeRuleProcessorSQL(rqbDateTimeLibraryAPI);\n/**\n * {@link @react-querybuilder/core!formatQuery formatQuery} value processor for \"sql\" format (\"ansi\" preset) using date-fns\n */\nexport const datetimeValueProcessorANSI: ValueProcessorByRule =\n getDatetimeValueProcessorANSI(rqbDateTimeLibraryAPI);\n/**\n * {@link @react-querybuilder/core!formatQuery formatQuery} value processor for \"sql\" format (\"mssql\" preset) using date-fns\n */\nexport const datetimeValueProcessorMSSQL: ValueProcessorByRule =\n getDatetimeValueProcessorMSSQL(rqbDateTimeLibraryAPI);\n/**\n * {@link @react-querybuilder/core!formatQuery formatQuery} value processor for \"sql\" format (\"mysql\" preset) using date-fns\n */\nexport const datetimeValueProcessorMySQL: ValueProcessorByRule =\n getDatetimeValueProcessorMySQL(rqbDateTimeLibraryAPI);\n/**\n * {@link @react-querybuilder/core!formatQuery formatQuery} value processor for \"sql\" format (\"oracle\" preset) using date-fns\n */\nexport const datetimeValueProcessorOracle: ValueProcessorByRule =\n getDatetimeValueProcessorOracle(rqbDateTimeLibraryAPI);\n/**\n * {@link @react-querybuilder/core!formatQuery formatQuery} value processor for \"sql\" format (\"postgresql\" preset) using date-fns\n */\nexport const datetimeValueProcessorPostgreSQL: ValueProcessorByRule =\n getDatetimeValueProcessorPostgreSQL(rqbDateTimeLibraryAPI);\n\n/**\n * {@link @react-querybuilder/core!formatQuery formatQuery} rule processor for \"cel\" format using date-fns\n */\nexport const datetimeRuleProcessorCEL: ValueProcessorByRule =\n getDatetimeRuleProcessorCEL(rqbDateTimeLibraryAPI);\n\n/**\n * {@link @react-querybuilder/core!formatQuery formatQuery} rule processor for \"mongodb_query\" format using date-fns\n */\nexport const datetimeRuleProcessorMongoDBQuery: ValueProcessorByRule =\n getDatetimeRuleProcessorMongoDBQuery(rqbDateTimeLibraryAPI);\n\n/**\n * {@link @react-querybuilder/core!formatQuery formatQuery} rule processor for \"natural_language\" format using date-fns\n */\nexport const datetimeRuleProcessorNL: ValueProcessorByRule =\n getDatetimeRuleProcessorNL(rqbDateTimeLibraryAPI);\n\nexport * from './rqbDateTimeLibraryAPI.date-fns';\n"],"mappings":"gGAYA,MAAMA,EAA+B,GAAM,OAAO,GAAM,UAAA,EAAA,EAAA,UAAoB,EAAE,EAAA,EAAA,EAAA,QAAiB,EAAE,CAC3F,EAAkB,aAKXC,EAA+C,CAC1D,QAAS,EAAG,KAAA,EAAA,EAAA,QAAe,EAAO,EAAE,CAAE,EAAI,QAAQ,aAAc,EAAgB,CAAC,CACjF,QAAA,EAAA,QACA,SAAA,EAAA,SACA,QAAS,EAAG,IAAM,CAChB,IAAM,EAAU,EAAO,EAAE,CACnB,EAAU,EAAO,EAAE,CACzB,OAAOC,EAAAA,EAAoB,EAAE,EAAIA,EAAAA,EAAoB,EAAE,EAAA,EAAA,EAAA,WACzC,EAAS,EAAQ,CAC3B,EAAQ,SAAS,GAAK,EAAQ,SAAS,EAE7C,QAAS,IAAA,EAAA,EAAA,SAAa,EAAO,EAAE,CAAC,CAChC,SACA,YAAa,GAAK,CAChB,IAAM,EAAU,EAAO,EAAE,CACzB,OAAA,EAAA,EAAA,SAAe,EAAQ,CAAG,EAAQ,aAAa,CAAG,IAEpD,oBAAqB,GAAK,CACxB,IAAM,EAAU,EAAO,EAAE,CACzB,OAAA,EAAA,EAAA,SAAe,EAAQ,EAAA,EAAA,EAAA,QAAU,EAAS,EAAgB,CAAG,IAEhE,CCdYC,EACXC,EAAAA,EAA+B,EAAsB,CAK1CC,EACXC,EAAAA,EAA4B,EAAsB,CAIvCC,EACXC,EAAAA,EAA8B,EAAsB,CAIzCC,EACXC,EAAAA,EAA+B,EAAsB,CAI1CC,EACXC,EAAAA,EAA+B,EAAsB,CAI1CC,EACXC,EAAAA,EAAgC,EAAsB,CAI3CC,EACXC,EAAAA,EAAoC,EAAsB,CAK/CC,EACXC,EAAAA,EAA4B,EAAsB,CAKvCC,EACXC,EAAAA,EAAqC,EAAsB,CAKhDC,EACXC,EAAAA,EAA2B,EAAsB"}
1
+ {"version":3,"file":"react-querybuilder_datetime.cjs.production.date-fns.js","names":["toDate: typeof dateFnsToDate","rqbDateTimeLibraryAPI: RQBDateTimeLibraryAPI","isISOStringDateOnly","jsonLogicDateTimeOperations: RQBJsonLogicDateTimeOperations","getDatetimeJsonLogicOperations","datetimeRuleProcessorSQL: RuleProcessor","getDatetimeRuleProcessorSQL","datetimeValueProcessorANSI: ValueProcessorByRule","getDatetimeValueProcessorANSI","datetimeValueProcessorMSSQL: ValueProcessorByRule","getDatetimeValueProcessorMSSQL","datetimeValueProcessorMySQL: ValueProcessorByRule","getDatetimeValueProcessorMySQL","datetimeValueProcessorOracle: ValueProcessorByRule","getDatetimeValueProcessorOracle","datetimeValueProcessorPostgreSQL: ValueProcessorByRule","getDatetimeValueProcessorPostgreSQL","datetimeRuleProcessorCEL: ValueProcessorByRule","getDatetimeRuleProcessorCEL","datetimeRuleProcessorMongoDBQuery: ValueProcessorByRule","getDatetimeRuleProcessorMongoDBQuery","datetimeRuleProcessorNL: ValueProcessorByRule","getDatetimeRuleProcessorNL"],"sources":["../../src/rqbDateTimeLibraryAPI.date-fns.ts","../../src/index.date-fns.ts"],"sourcesContent":["import {\n toDate as dateFnsToDate,\n format,\n isAfter,\n isBefore,\n isSameDay,\n isValid,\n parseISO,\n} from 'date-fns';\nimport type { RQBDateTimeLibraryAPI } from './types';\nimport { isISOStringDateOnly } from './utils';\n\nconst toDate: typeof dateFnsToDate = a => (typeof a === 'string' ? parseISO(a) : dateFnsToDate(a));\nconst iso8601DateOnly = 'yyyy-MM-dd';\n\n/**\n * {@link RQBDateTimeLibraryAPI} for date-fns\n */\nexport const rqbDateTimeLibraryAPI: RQBDateTimeLibraryAPI = {\n format: (d, fmt) => format(toDate(d), fmt.replace('YYYY-MM-DD', iso8601DateOnly)),\n isAfter,\n isBefore,\n isSame: (a, b) => {\n const aToDate = toDate(a);\n const bToDate = toDate(b);\n return isISOStringDateOnly(a) || isISOStringDateOnly(b)\n ? isSameDay(aToDate, bToDate)\n : aToDate.getTime() === bToDate.getTime();\n },\n isValid: d => isValid(toDate(d)),\n toDate,\n toISOString: d => {\n const dToDate = toDate(d);\n return isValid(dToDate) ? dToDate.toISOString() : '';\n },\n toISOStringDateOnly: d => {\n const dToDate = toDate(d);\n return isValid(dToDate) ? format(dToDate, iso8601DateOnly) : '';\n },\n};\n","/**\n * Import from `\"@react-querybuilder/datetime/date-fns\"` for enhanced date/time support using [date-fns](https://date-fns.org/).\n *\n * @module date-fns\n */\n\nimport type { RuleProcessor, ValueProcessorByRule } from 'react-querybuilder';\nimport { getDatetimeJsonLogicOperations } from './getDatetimeJsonLogicOperations';\nimport { getDatetimeRuleProcessorCEL } from './getDatetimeRuleProcessorCEL';\nimport { getDatetimeRuleProcessorMongoDBQuery } from './getDatetimeRuleProcessorMongoDBQuery';\nimport { getDatetimeRuleProcessorNL } from './getDatetimeRuleProcessorNL';\nimport {\n getDatetimeRuleProcessorSQL,\n getDatetimeValueProcessorANSI,\n getDatetimeValueProcessorMSSQL,\n getDatetimeValueProcessorMySQL,\n getDatetimeValueProcessorOracle,\n getDatetimeValueProcessorPostgreSQL,\n} from './getDatetimeRuleProcessorSQL';\nimport { rqbDateTimeLibraryAPI } from './rqbDateTimeLibraryAPI.date-fns';\nimport type { RQBJsonLogicDateTimeOperations } from './types';\n\n/**\n * Custom JsonLogic date/time operations using date-fns\n */\nexport const jsonLogicDateTimeOperations: RQBJsonLogicDateTimeOperations =\n getDatetimeJsonLogicOperations(rqbDateTimeLibraryAPI);\n\n/**\n * {@link @react-querybuilder/core!formatQuery formatQuery} rule processor for \"sql\" format using date-fns\n */\nexport const datetimeRuleProcessorSQL: RuleProcessor =\n getDatetimeRuleProcessorSQL(rqbDateTimeLibraryAPI);\n/**\n * {@link @react-querybuilder/core!formatQuery formatQuery} value processor for \"sql\" format (\"ansi\" preset) using date-fns\n */\nexport const datetimeValueProcessorANSI: ValueProcessorByRule =\n getDatetimeValueProcessorANSI(rqbDateTimeLibraryAPI);\n/**\n * {@link @react-querybuilder/core!formatQuery formatQuery} value processor for \"sql\" format (\"mssql\" preset) using date-fns\n */\nexport const datetimeValueProcessorMSSQL: ValueProcessorByRule =\n getDatetimeValueProcessorMSSQL(rqbDateTimeLibraryAPI);\n/**\n * {@link @react-querybuilder/core!formatQuery formatQuery} value processor for \"sql\" format (\"mysql\" preset) using date-fns\n */\nexport const datetimeValueProcessorMySQL: ValueProcessorByRule =\n getDatetimeValueProcessorMySQL(rqbDateTimeLibraryAPI);\n/**\n * {@link @react-querybuilder/core!formatQuery formatQuery} value processor for \"sql\" format (\"oracle\" preset) using date-fns\n */\nexport const datetimeValueProcessorOracle: ValueProcessorByRule =\n getDatetimeValueProcessorOracle(rqbDateTimeLibraryAPI);\n/**\n * {@link @react-querybuilder/core!formatQuery formatQuery} value processor for \"sql\" format (\"postgresql\" preset) using date-fns\n */\nexport const datetimeValueProcessorPostgreSQL: ValueProcessorByRule =\n getDatetimeValueProcessorPostgreSQL(rqbDateTimeLibraryAPI);\n\n/**\n * {@link @react-querybuilder/core!formatQuery formatQuery} rule processor for \"cel\" format using date-fns\n */\nexport const datetimeRuleProcessorCEL: ValueProcessorByRule =\n getDatetimeRuleProcessorCEL(rqbDateTimeLibraryAPI);\n\n/**\n * {@link @react-querybuilder/core!formatQuery formatQuery} rule processor for \"mongodb_query\" format using date-fns\n */\nexport const datetimeRuleProcessorMongoDBQuery: ValueProcessorByRule =\n getDatetimeRuleProcessorMongoDBQuery(rqbDateTimeLibraryAPI);\n\n/**\n * {@link @react-querybuilder/core!formatQuery formatQuery} rule processor for \"natural_language\" format using date-fns\n */\nexport const datetimeRuleProcessorNL: ValueProcessorByRule =\n getDatetimeRuleProcessorNL(rqbDateTimeLibraryAPI);\n\nexport * from './rqbDateTimeLibraryAPI.date-fns';\n"],"mappings":"0JAYA,MAAMA,EAA+B,GAAM,OAAO,GAAM,UAAA,EAAA,EAAA,UAAoB,EAAE,EAAA,EAAA,EAAA,QAAiB,EAAE,CAC3F,EAAkB,aAKXC,EAA+C,CAC1D,QAAS,EAAG,KAAA,EAAA,EAAA,QAAe,EAAO,EAAE,CAAE,EAAI,QAAQ,aAAc,EAAgB,CAAC,CACjF,QAAA,EAAA,QACA,SAAA,EAAA,SACA,QAAS,EAAG,IAAM,CAChB,IAAM,EAAU,EAAO,EAAE,CACnB,EAAU,EAAO,EAAE,CACzB,OAAOC,EAAAA,EAAoB,EAAE,EAAIA,EAAAA,EAAoB,EAAE,EAAA,EAAA,EAAA,WACzC,EAAS,EAAQ,CAC3B,EAAQ,SAAS,GAAK,EAAQ,SAAS,EAE7C,QAAS,IAAA,EAAA,EAAA,SAAa,EAAO,EAAE,CAAC,CAChC,SACA,YAAa,GAAK,CAChB,IAAM,EAAU,EAAO,EAAE,CACzB,OAAA,EAAA,EAAA,SAAe,EAAQ,CAAG,EAAQ,aAAa,CAAG,IAEpD,oBAAqB,GAAK,CACxB,IAAM,EAAU,EAAO,EAAE,CACzB,OAAA,EAAA,EAAA,SAAe,EAAQ,EAAA,EAAA,EAAA,QAAU,EAAS,EAAgB,CAAG,IAEhE,CCdYC,EACXC,EAAAA,EAA+B,EAAsB,CAK1CC,EACXC,EAAAA,EAA4B,EAAsB,CAIvCC,EACXC,EAAAA,EAA8B,EAAsB,CAIzCC,EACXC,EAAAA,EAA+B,EAAsB,CAI1CC,EACXC,EAAAA,EAA+B,EAAsB,CAI1CC,EACXC,EAAAA,EAAgC,EAAsB,CAI3CC,EACXC,EAAAA,EAAoC,EAAsB,CAK/CC,EACXC,EAAAA,EAA4B,EAAsB,CAKvCC,EACXC,EAAAA,EAAqC,EAAsB,CAKhDC,EACXC,EAAAA,EAA2B,EAAsB"}
@@ -1,4 +1,4 @@
1
- import { _ as RuleProcessor, h as RQBJsonLogicDateTimeOperations, i as RQBDateTimeLibraryAPI, v as ValueProcessorByRule } from "./types-A60rB27l.js";
1
+ import { _ as RuleProcessor, h as RQBJsonLogicDateTimeOperations, i as RQBDateTimeLibraryAPI, v as ValueProcessorByRule } from "./types-BF3ibCEu.js";
2
2
 
3
3
  //#region src/rqbDateTimeLibraryAPI.dayjs.d.ts
4
4
 
@@ -1,2 +1,2 @@
1
- const e=require(`./getDatetimeRuleProcessorSQL-CSxxM8ce.js`);let t=require(`dayjs`);t=e.h(t);const n={format:(e,n)=>(0,t.default)(e).format(n),isAfter:(e,n)=>(0,t.default)(e).isAfter(n),isBefore:(e,n)=>(0,t.default)(e).isBefore(n),isSame:(n,r)=>(0,t.default)(n).isSame(r,e.p(n)||e.p(r)?`d`:`ms`),isValid:e=>(0,t.default)(e).isValid(),toDate:e=>(0,t.default)(e).toDate(),toISOString:e=>{let n=(0,t.default)(e);return n.isValid()?n.toISOString():``},toISOStringDateOnly:e=>{let n=(0,t.default)(e);return n.isValid()?n.format(`YYYY-MM-DD`):``}},r=e.f(n),i=e.t(n),a=e.n(n),o=e.r(n),s=e.i(n),c=e.a(n),l=e.o(n),u=e.d(n),d=e.u(n),f=e.l(n);exports.datetimeRuleProcessorCEL=u,exports.datetimeRuleProcessorMongoDBQuery=d,exports.datetimeRuleProcessorNL=f,exports.datetimeRuleProcessorSQL=i,exports.datetimeValueProcessorANSI=a,exports.datetimeValueProcessorMSSQL=o,exports.datetimeValueProcessorMySQL=s,exports.datetimeValueProcessorOracle=c,exports.datetimeValueProcessorPostgreSQL=l,exports.jsonLogicDateTimeOperations=r,exports.rqbDateTimeLibraryAPI=n;
1
+ var e=Object.create,t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,r=Object.getOwnPropertyNames,i=Object.getPrototypeOf,a=Object.prototype.hasOwnProperty,o=(e,i,o,s)=>{if(i&&typeof i==`object`||typeof i==`function`)for(var c=r(i),l=0,u=c.length,d;l<u;l++)d=c[l],!a.call(e,d)&&d!==o&&t(e,d,{get:(e=>i[e]).bind(null,d),enumerable:!(s=n(i,d))||s.enumerable});return e},s=(n,r,a)=>(a=n==null?{}:e(i(n)),o(r||!n||!n.__esModule?t(a,`default`,{value:n,enumerable:!0}):a,n));const c=require(`./getDatetimeRuleProcessorSQL-B0uQUU_F.js`);let l=require(`dayjs`);l=s(l);const u={format:(e,t)=>(0,l.default)(e).format(t),isAfter:(e,t)=>(0,l.default)(e).isAfter(t),isBefore:(e,t)=>(0,l.default)(e).isBefore(t),isSame:(e,t)=>(0,l.default)(e).isSame(t,c.p(e)||c.p(t)?`d`:`ms`),isValid:e=>(0,l.default)(e).isValid(),toDate:e=>(0,l.default)(e).toDate(),toISOString:e=>{let t=(0,l.default)(e);return t.isValid()?t.toISOString():``},toISOStringDateOnly:e=>{let t=(0,l.default)(e);return t.isValid()?t.format(`YYYY-MM-DD`):``}},d=c.f(u),f=c.t(u),p=c.n(u),m=c.r(u),h=c.i(u),g=c.a(u),_=c.o(u),v=c.d(u),y=c.u(u),b=c.l(u);exports.datetimeRuleProcessorCEL=v,exports.datetimeRuleProcessorMongoDBQuery=y,exports.datetimeRuleProcessorNL=b,exports.datetimeRuleProcessorSQL=f,exports.datetimeValueProcessorANSI=p,exports.datetimeValueProcessorMSSQL=m,exports.datetimeValueProcessorMySQL=h,exports.datetimeValueProcessorOracle=g,exports.datetimeValueProcessorPostgreSQL=_,exports.jsonLogicDateTimeOperations=d,exports.rqbDateTimeLibraryAPI=u,exports.t=s;
2
2
  //# sourceMappingURL=react-querybuilder_datetime.cjs.production.dayjs.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"react-querybuilder_datetime.cjs.production.dayjs.js","names":["rqbDateTimeLibraryAPI: RQBDateTimeLibraryAPI","isISOStringDateOnly","jsonLogicDateTimeOperations: RQBJsonLogicDateTimeOperations","getDatetimeJsonLogicOperations","datetimeRuleProcessorSQL: RuleProcessor","getDatetimeRuleProcessorSQL","datetimeValueProcessorANSI: ValueProcessorByRule","getDatetimeValueProcessorANSI","datetimeValueProcessorMSSQL: ValueProcessorByRule","getDatetimeValueProcessorMSSQL","datetimeValueProcessorMySQL: ValueProcessorByRule","getDatetimeValueProcessorMySQL","datetimeValueProcessorOracle: ValueProcessorByRule","getDatetimeValueProcessorOracle","datetimeValueProcessorPostgreSQL: ValueProcessorByRule","getDatetimeValueProcessorPostgreSQL","datetimeRuleProcessorCEL: ValueProcessorByRule","getDatetimeRuleProcessorCEL","datetimeRuleProcessorMongoDBQuery: ValueProcessorByRule","getDatetimeRuleProcessorMongoDBQuery","datetimeRuleProcessorNL: ValueProcessorByRule","getDatetimeRuleProcessorNL"],"sources":["../../src/rqbDateTimeLibraryAPI.dayjs.ts","../../src/index.dayjs.ts"],"sourcesContent":["import dayjs from 'dayjs';\nimport type { RQBDateTimeLibraryAPI } from './types';\nimport { isISOStringDateOnly } from './utils';\n\n/**\n * {@link RQBDateTimeLibraryAPI} for Day.js\n */\nexport const rqbDateTimeLibraryAPI: RQBDateTimeLibraryAPI = {\n format: (d, fmt) => dayjs(d).format(fmt),\n isAfter: (a, b) => dayjs(a).isAfter(b),\n isBefore: (a, b) => dayjs(a).isBefore(b),\n isSame: (a, b) =>\n dayjs(a).isSame(b, isISOStringDateOnly(a) || isISOStringDateOnly(b) ? 'd' : 'ms'),\n isValid: d => dayjs(d).isValid(),\n toDate: d => dayjs(d).toDate(),\n toISOString: d => {\n const dToDate = dayjs(d);\n return dToDate.isValid() ? dToDate.toISOString() : '';\n },\n toISOStringDateOnly: d => {\n const dToDate = dayjs(d);\n return dToDate.isValid() ? dToDate.format('YYYY-MM-DD') : '';\n },\n};\n","/**\n * Import from `\"@react-querybuilder/datetime/dayjs\"` for enhanced date/time support using [Day.js](https://day.js.org/).\n *\n * @module dayjs\n */\n\nimport type { RuleProcessor, ValueProcessorByRule } from 'react-querybuilder';\nimport { getDatetimeJsonLogicOperations } from './getDatetimeJsonLogicOperations';\nimport { getDatetimeRuleProcessorCEL } from './getDatetimeRuleProcessorCEL';\nimport { getDatetimeRuleProcessorMongoDBQuery } from './getDatetimeRuleProcessorMongoDBQuery';\nimport { getDatetimeRuleProcessorNL } from './getDatetimeRuleProcessorNL';\nimport {\n getDatetimeRuleProcessorSQL,\n getDatetimeValueProcessorANSI,\n getDatetimeValueProcessorMSSQL,\n getDatetimeValueProcessorMySQL,\n getDatetimeValueProcessorOracle,\n getDatetimeValueProcessorPostgreSQL,\n} from './getDatetimeRuleProcessorSQL';\nimport { rqbDateTimeLibraryAPI } from './rqbDateTimeLibraryAPI.dayjs';\nimport type { RQBJsonLogicDateTimeOperations } from './types';\n\n/**\n * Custom JsonLogic date/time operations using Day.js\n */\nexport const jsonLogicDateTimeOperations: RQBJsonLogicDateTimeOperations =\n getDatetimeJsonLogicOperations(rqbDateTimeLibraryAPI);\n\n/**\n * {@link @react-querybuilder/core!formatQuery formatQuery} rule processor for \"sql\" format using Day.js\n */\nexport const datetimeRuleProcessorSQL: RuleProcessor =\n getDatetimeRuleProcessorSQL(rqbDateTimeLibraryAPI);\n/**\n * {@link @react-querybuilder/core!formatQuery formatQuery} value processor for \"sql\" format (\"ansi\" preset) using Day.js\n */\nexport const datetimeValueProcessorANSI: ValueProcessorByRule =\n getDatetimeValueProcessorANSI(rqbDateTimeLibraryAPI);\n/**\n * {@link @react-querybuilder/core!formatQuery formatQuery} value processor for \"sql\" format (\"mssql\" preset) using Day.js\n */\nexport const datetimeValueProcessorMSSQL: ValueProcessorByRule =\n getDatetimeValueProcessorMSSQL(rqbDateTimeLibraryAPI);\n/**\n * {@link @react-querybuilder/core!formatQuery formatQuery} value processor for \"sql\" format (\"mysql\" preset) using Day.js\n */\nexport const datetimeValueProcessorMySQL: ValueProcessorByRule =\n getDatetimeValueProcessorMySQL(rqbDateTimeLibraryAPI);\n/**\n * {@link @react-querybuilder/core!formatQuery formatQuery} value processor for \"sql\" format (\"oracle\" preset) using Day.js\n */\nexport const datetimeValueProcessorOracle: ValueProcessorByRule =\n getDatetimeValueProcessorOracle(rqbDateTimeLibraryAPI);\n/**\n * {@link @react-querybuilder/core!formatQuery formatQuery} value processor for \"sql\" format (\"postgresql\" preset) using Day.js\n */\nexport const datetimeValueProcessorPostgreSQL: ValueProcessorByRule =\n getDatetimeValueProcessorPostgreSQL(rqbDateTimeLibraryAPI);\n\n/**\n * {@link @react-querybuilder/core!formatQuery formatQuery} rule processor for \"cel\" format using Day.js\n */\nexport const datetimeRuleProcessorCEL: ValueProcessorByRule =\n getDatetimeRuleProcessorCEL(rqbDateTimeLibraryAPI);\n\n/**\n * {@link @react-querybuilder/core!formatQuery formatQuery} rule processor for \"mongodb_query\" format using Day.js\n */\nexport const datetimeRuleProcessorMongoDBQuery: ValueProcessorByRule =\n getDatetimeRuleProcessorMongoDBQuery(rqbDateTimeLibraryAPI);\n\n/**\n * {@link @react-querybuilder/core!formatQuery formatQuery} rule processor for \"natural_language\" format using Day.js\n */\nexport const datetimeRuleProcessorNL: ValueProcessorByRule =\n getDatetimeRuleProcessorNL(rqbDateTimeLibraryAPI);\n\nexport * from './rqbDateTimeLibraryAPI.dayjs';\n"],"mappings":"6FAOA,MAAaA,EAA+C,CAC1D,QAAS,EAAG,KAAA,EAAA,EAAA,SAAc,EAAE,CAAC,OAAO,EAAI,CACxC,SAAU,EAAG,KAAA,EAAA,EAAA,SAAY,EAAE,CAAC,QAAQ,EAAE,CACtC,UAAW,EAAG,KAAA,EAAA,EAAA,SAAY,EAAE,CAAC,SAAS,EAAE,CACxC,QAAS,EAAG,KAAA,EAAA,EAAA,SACJ,EAAE,CAAC,OAAO,EAAGC,EAAAA,EAAoB,EAAE,EAAIA,EAAAA,EAAoB,EAAE,CAAG,IAAM,KAAK,CACnF,QAAS,IAAA,EAAA,EAAA,SAAW,EAAE,CAAC,SAAS,CAChC,OAAQ,IAAA,EAAA,EAAA,SAAW,EAAE,CAAC,QAAQ,CAC9B,YAAa,GAAK,CAChB,IAAM,GAAA,EAAA,EAAA,SAAgB,EAAE,CACxB,OAAO,EAAQ,SAAS,CAAG,EAAQ,aAAa,CAAG,IAErD,oBAAqB,GAAK,CACxB,IAAM,GAAA,EAAA,EAAA,SAAgB,EAAE,CACxB,OAAO,EAAQ,SAAS,CAAG,EAAQ,OAAO,aAAa,CAAG,IAE7D,CCEYC,EACXC,EAAAA,EAA+B,EAAsB,CAK1CC,EACXC,EAAAA,EAA4B,EAAsB,CAIvCC,EACXC,EAAAA,EAA8B,EAAsB,CAIzCC,EACXC,EAAAA,EAA+B,EAAsB,CAI1CC,EACXC,EAAAA,EAA+B,EAAsB,CAI1CC,EACXC,EAAAA,EAAgC,EAAsB,CAI3CC,EACXC,EAAAA,EAAoC,EAAsB,CAK/CC,EACXC,EAAAA,EAA4B,EAAsB,CAKvCC,EACXC,EAAAA,EAAqC,EAAsB,CAKhDC,EACXC,EAAAA,EAA2B,EAAsB"}
1
+ {"version":3,"file":"react-querybuilder_datetime.cjs.production.dayjs.js","names":["rqbDateTimeLibraryAPI: RQBDateTimeLibraryAPI","isISOStringDateOnly","jsonLogicDateTimeOperations: RQBJsonLogicDateTimeOperations","getDatetimeJsonLogicOperations","datetimeRuleProcessorSQL: RuleProcessor","getDatetimeRuleProcessorSQL","datetimeValueProcessorANSI: ValueProcessorByRule","getDatetimeValueProcessorANSI","datetimeValueProcessorMSSQL: ValueProcessorByRule","getDatetimeValueProcessorMSSQL","datetimeValueProcessorMySQL: ValueProcessorByRule","getDatetimeValueProcessorMySQL","datetimeValueProcessorOracle: ValueProcessorByRule","getDatetimeValueProcessorOracle","datetimeValueProcessorPostgreSQL: ValueProcessorByRule","getDatetimeValueProcessorPostgreSQL","datetimeRuleProcessorCEL: ValueProcessorByRule","getDatetimeRuleProcessorCEL","datetimeRuleProcessorMongoDBQuery: ValueProcessorByRule","getDatetimeRuleProcessorMongoDBQuery","datetimeRuleProcessorNL: ValueProcessorByRule","getDatetimeRuleProcessorNL"],"sources":["../../src/rqbDateTimeLibraryAPI.dayjs.ts","../../src/index.dayjs.ts"],"sourcesContent":["import dayjs from 'dayjs';\nimport type { RQBDateTimeLibraryAPI } from './types';\nimport { isISOStringDateOnly } from './utils';\n\n/**\n * {@link RQBDateTimeLibraryAPI} for Day.js\n */\nexport const rqbDateTimeLibraryAPI: RQBDateTimeLibraryAPI = {\n format: (d, fmt) => dayjs(d).format(fmt),\n isAfter: (a, b) => dayjs(a).isAfter(b),\n isBefore: (a, b) => dayjs(a).isBefore(b),\n isSame: (a, b) =>\n dayjs(a).isSame(b, isISOStringDateOnly(a) || isISOStringDateOnly(b) ? 'd' : 'ms'),\n isValid: d => dayjs(d).isValid(),\n toDate: d => dayjs(d).toDate(),\n toISOString: d => {\n const dToDate = dayjs(d);\n return dToDate.isValid() ? dToDate.toISOString() : '';\n },\n toISOStringDateOnly: d => {\n const dToDate = dayjs(d);\n return dToDate.isValid() ? dToDate.format('YYYY-MM-DD') : '';\n },\n};\n","/**\n * Import from `\"@react-querybuilder/datetime/dayjs\"` for enhanced date/time support using [Day.js](https://day.js.org/).\n *\n * @module dayjs\n */\n\nimport type { RuleProcessor, ValueProcessorByRule } from 'react-querybuilder';\nimport { getDatetimeJsonLogicOperations } from './getDatetimeJsonLogicOperations';\nimport { getDatetimeRuleProcessorCEL } from './getDatetimeRuleProcessorCEL';\nimport { getDatetimeRuleProcessorMongoDBQuery } from './getDatetimeRuleProcessorMongoDBQuery';\nimport { getDatetimeRuleProcessorNL } from './getDatetimeRuleProcessorNL';\nimport {\n getDatetimeRuleProcessorSQL,\n getDatetimeValueProcessorANSI,\n getDatetimeValueProcessorMSSQL,\n getDatetimeValueProcessorMySQL,\n getDatetimeValueProcessorOracle,\n getDatetimeValueProcessorPostgreSQL,\n} from './getDatetimeRuleProcessorSQL';\nimport { rqbDateTimeLibraryAPI } from './rqbDateTimeLibraryAPI.dayjs';\nimport type { RQBJsonLogicDateTimeOperations } from './types';\n\n/**\n * Custom JsonLogic date/time operations using Day.js\n */\nexport const jsonLogicDateTimeOperations: RQBJsonLogicDateTimeOperations =\n getDatetimeJsonLogicOperations(rqbDateTimeLibraryAPI);\n\n/**\n * {@link @react-querybuilder/core!formatQuery formatQuery} rule processor for \"sql\" format using Day.js\n */\nexport const datetimeRuleProcessorSQL: RuleProcessor =\n getDatetimeRuleProcessorSQL(rqbDateTimeLibraryAPI);\n/**\n * {@link @react-querybuilder/core!formatQuery formatQuery} value processor for \"sql\" format (\"ansi\" preset) using Day.js\n */\nexport const datetimeValueProcessorANSI: ValueProcessorByRule =\n getDatetimeValueProcessorANSI(rqbDateTimeLibraryAPI);\n/**\n * {@link @react-querybuilder/core!formatQuery formatQuery} value processor for \"sql\" format (\"mssql\" preset) using Day.js\n */\nexport const datetimeValueProcessorMSSQL: ValueProcessorByRule =\n getDatetimeValueProcessorMSSQL(rqbDateTimeLibraryAPI);\n/**\n * {@link @react-querybuilder/core!formatQuery formatQuery} value processor for \"sql\" format (\"mysql\" preset) using Day.js\n */\nexport const datetimeValueProcessorMySQL: ValueProcessorByRule =\n getDatetimeValueProcessorMySQL(rqbDateTimeLibraryAPI);\n/**\n * {@link @react-querybuilder/core!formatQuery formatQuery} value processor for \"sql\" format (\"oracle\" preset) using Day.js\n */\nexport const datetimeValueProcessorOracle: ValueProcessorByRule =\n getDatetimeValueProcessorOracle(rqbDateTimeLibraryAPI);\n/**\n * {@link @react-querybuilder/core!formatQuery formatQuery} value processor for \"sql\" format (\"postgresql\" preset) using Day.js\n */\nexport const datetimeValueProcessorPostgreSQL: ValueProcessorByRule =\n getDatetimeValueProcessorPostgreSQL(rqbDateTimeLibraryAPI);\n\n/**\n * {@link @react-querybuilder/core!formatQuery formatQuery} rule processor for \"cel\" format using Day.js\n */\nexport const datetimeRuleProcessorCEL: ValueProcessorByRule =\n getDatetimeRuleProcessorCEL(rqbDateTimeLibraryAPI);\n\n/**\n * {@link @react-querybuilder/core!formatQuery formatQuery} rule processor for \"mongodb_query\" format using Day.js\n */\nexport const datetimeRuleProcessorMongoDBQuery: ValueProcessorByRule =\n getDatetimeRuleProcessorMongoDBQuery(rqbDateTimeLibraryAPI);\n\n/**\n * {@link @react-querybuilder/core!formatQuery formatQuery} rule processor for \"natural_language\" format using Day.js\n */\nexport const datetimeRuleProcessorNL: ValueProcessorByRule =\n getDatetimeRuleProcessorNL(rqbDateTimeLibraryAPI);\n\nexport * from './rqbDateTimeLibraryAPI.dayjs';\n"],"mappings":"yjBAOA,MAAaA,EAA+C,CAC1D,QAAS,EAAG,KAAA,EAAA,EAAA,SAAc,EAAE,CAAC,OAAO,EAAI,CACxC,SAAU,EAAG,KAAA,EAAA,EAAA,SAAY,EAAE,CAAC,QAAQ,EAAE,CACtC,UAAW,EAAG,KAAA,EAAA,EAAA,SAAY,EAAE,CAAC,SAAS,EAAE,CACxC,QAAS,EAAG,KAAA,EAAA,EAAA,SACJ,EAAE,CAAC,OAAO,EAAGC,EAAAA,EAAoB,EAAE,EAAIA,EAAAA,EAAoB,EAAE,CAAG,IAAM,KAAK,CACnF,QAAS,IAAA,EAAA,EAAA,SAAW,EAAE,CAAC,SAAS,CAChC,OAAQ,IAAA,EAAA,EAAA,SAAW,EAAE,CAAC,QAAQ,CAC9B,YAAa,GAAK,CAChB,IAAM,GAAA,EAAA,EAAA,SAAgB,EAAE,CACxB,OAAO,EAAQ,SAAS,CAAG,EAAQ,aAAa,CAAG,IAErD,oBAAqB,GAAK,CACxB,IAAM,GAAA,EAAA,EAAA,SAAgB,EAAE,CACxB,OAAO,EAAQ,SAAS,CAAG,EAAQ,OAAO,aAAa,CAAG,IAE7D,CCEYC,EACXC,EAAAA,EAA+B,EAAsB,CAK1CC,EACXC,EAAAA,EAA4B,EAAsB,CAIvCC,EACXC,EAAAA,EAA8B,EAAsB,CAIzCC,EACXC,EAAAA,EAA+B,EAAsB,CAI1CC,EACXC,EAAAA,EAA+B,EAAsB,CAI1CC,EACXC,EAAAA,EAAgC,EAAsB,CAI3CC,EACXC,EAAAA,EAAoC,EAAsB,CAK/CC,EACXC,EAAAA,EAA4B,EAAsB,CAKvCC,EACXC,EAAAA,EAAqC,EAAsB,CAKhDC,EACXC,EAAAA,EAA2B,EAAsB"}
@@ -1,2 +1,2 @@
1
- const e=require(`./getDatetimeRuleProcessorSQL-CSxxM8ce.js`);let t=require(`react-querybuilder`);t=e.h(t);const n={"!=":`dateNotOn`,"<":`dateBefore`,"<=":`dateOnOrBefore`,"=":`dateOn`,">":`dateAfter`,">=":`dateOnOrAfter`,between:`dateBetween`,in:`dateIn`,notBetween:`dateNotBetween`,notIn:`dateNotIn`},r=(r,i)=>{let a=i??{};if(!e.m(a.context?.isDateField,r,a))return(0,t.defaultRuleProcessorJsonLogic)(r,a);let{field:o,operator:s,value:c,valueSource:l}=r,u=l===`field`,d={var:o},f=e=>u?{var:`${e}`}:e;switch(s){case`<`:case`<=`:case`=`:case`!=`:case`>`:case`>=`:return{[n[s]]:[d,f(c)]};case`in`:case`notIn`:{let e=(0,t.toArray)(c).map(e=>f(e));return{[n[s]]:[d,e]}}case`between`:case`notBetween`:{let e=(0,t.toArray)(c).map(e=>f(e));return e.length<2?!1:{[n[s]]:[e[0],d,e[1]]}}}return(0,t.defaultRuleProcessorJsonLogic)(r,i)},i=e=>/^(does)?not/i.test(e),a=(e,t)=>t?`$not(${e})`:`${e}`,o=n=>(r,o)=>{let s=o??{},{context:c={}}=s,{quoteFieldNamesWith:l=[``,``],fieldIdentifierSeparator:u=``}=s,{field:d,operator:f,value:p,valueSource:m}=r;if(!e.m(c.isDateField,r,s))return(0,t.defaultRuleProcessorJSONata)(r,s);let h=m===`field`,g=e=>`$toMillis(${(0,t.getQuotedFieldName)(e,{quoteFieldNamesWith:l,fieldIdentifierSeparator:u})})`,_=e=>`$toMillis("${n.toISOString(e)}")`;switch(f){case`<`:case`<=`:case`=`:case`!=`:case`>`:case`>=`:return`${g(d)} ${f} ${h?g(p):_(p)}`}let v=(0,t.toArray)(r.value,{retainEmptyStrings:!1}),y=v.map(e=>n.toDate(e)).filter(e=>n.isValid(e));switch(f){case`in`:case`notIn`:return h?v.length===0?``:a(`${g(d)} in [${v.map(e=>g(e)).join(`, `)}]`,i(f)):y.length===0?``:a(`${g(d)} in [${y.map(e=>_(e)).join(`, `)}]`,i(f));case`between`:case`notBetween`:{if(v.length<2||(0,t.nullOrUndefinedOrEmpty)(v[0])||(0,t.nullOrUndefinedOrEmpty)(v[1])||!h&&y.length<2)return``;if(h){let[e,t]=v,n=`${g(d)} >= ${g(e)} and ${g(d)} <= ${g(t)}`;return f===`between`?`(${n})`:a(n,!0)}let[e,r]=y,[i,o]=n.isBefore(e,r)?[e,r]:[r,e],s=`${g(d)} >= ${_(i)} and ${g(d)} <= ${_(o)}`;return f===`between`?`(${s})`:a(s,!0)}}return(0,t.defaultRuleProcessorJSONata)(r,s)};exports.datetimeRuleProcessorJsonLogic=r,exports.datetimeValueProcessorNL=e.s,exports.defaultDateTimeNLOperatorMap=e.c,exports.getDatetimeJsonLogicOperations=e.f,exports.getDatetimeRuleProcessorCEL=e.d,exports.getDatetimeRuleProcessorJSONata=o,exports.getDatetimeRuleProcessorMongoDBQuery=e.u,exports.getDatetimeRuleProcessorNL=e.l,exports.getDatetimeRuleProcessorSQL=e.t,exports.getDatetimeValueProcessorANSI=e.n,exports.getDatetimeValueProcessorMSSQL=e.r,exports.getDatetimeValueProcessorMySQL=e.i,exports.getDatetimeValueProcessorOracle=e.a,exports.getDatetimeValueProcessorPostgreSQL=e.o;
1
+ const e=require(`./getDatetimeRuleProcessorSQL-B0uQUU_F.js`),t=require(`./react-querybuilder_datetime.cjs.production.dayjs.js`);let n=require(`react-querybuilder`);const r={"!=":`dateNotOn`,"<":`dateBefore`,"<=":`dateOnOrBefore`,"=":`dateOn`,">":`dateAfter`,">=":`dateOnOrAfter`,between:`dateBetween`,in:`dateIn`,notBetween:`dateNotBetween`,notIn:`dateNotIn`},i=(t,i)=>{let a=i??{};if(!e.m(a.context?.isDateField,t,a))return(0,n.defaultRuleProcessorJsonLogic)(t,a);let{field:o,operator:s,value:c,valueSource:l}=t,u=l===`field`,d={var:o},f=e=>u?{var:`${e}`}:e;switch(s){case`<`:case`<=`:case`=`:case`!=`:case`>`:case`>=`:return{[r[s]]:[d,f(c)]};case`in`:case`notIn`:{let e=(0,n.toArray)(c).map(e=>f(e));return{[r[s]]:[d,e]}}case`between`:case`notBetween`:{let e=(0,n.toArray)(c).map(e=>f(e));return e.length<2?!1:{[r[s]]:[e[0],d,e[1]]}}}return(0,n.defaultRuleProcessorJsonLogic)(t,i)},a=e=>/^(does)?not/i.test(e),o=(e,t)=>t?`$not(${e})`:`${e}`,s=t=>(r,i)=>{let s=i??{},{context:c={}}=s,{quoteFieldNamesWith:l=[``,``],fieldIdentifierSeparator:u=``}=s,{field:d,operator:f,value:p,valueSource:m}=r;if(!e.m(c.isDateField,r,s))return(0,n.defaultRuleProcessorJSONata)(r,s);let h=m===`field`,g=e=>`$toMillis(${(0,n.getQuotedFieldName)(e,{quoteFieldNamesWith:l,fieldIdentifierSeparator:u})})`,_=e=>`$toMillis("${t.toISOString(e)}")`;switch(f){case`<`:case`<=`:case`=`:case`!=`:case`>`:case`>=`:return`${g(d)} ${f} ${h?g(p):_(p)}`}let v=(0,n.toArray)(r.value,{retainEmptyStrings:!1}),y=v.map(e=>t.toDate(e)).filter(e=>t.isValid(e));switch(f){case`in`:case`notIn`:return h?v.length===0?``:o(`${g(d)} in [${v.map(e=>g(e)).join(`, `)}]`,a(f)):y.length===0?``:o(`${g(d)} in [${y.map(e=>_(e)).join(`, `)}]`,a(f));case`between`:case`notBetween`:{if(v.length<2||(0,n.nullOrUndefinedOrEmpty)(v[0])||(0,n.nullOrUndefinedOrEmpty)(v[1])||!h&&y.length<2)return``;if(h){let[e,t]=v,n=`${g(d)} >= ${g(e)} and ${g(d)} <= ${g(t)}`;return f===`between`?`(${n})`:o(n,!0)}let[e,r]=y,[i,a]=t.isBefore(e,r)?[e,r]:[r,e],s=`${g(d)} >= ${_(i)} and ${g(d)} <= ${_(a)}`;return f===`between`?`(${s})`:o(s,!0)}}return(0,n.defaultRuleProcessorJSONata)(r,s)};exports.datetimeRuleProcessorJsonLogic=i,exports.datetimeValueProcessorNL=e.s,exports.defaultDateTimeNLOperatorMap=e.c,exports.getDatetimeJsonLogicOperations=e.f,exports.getDatetimeRuleProcessorCEL=e.d,exports.getDatetimeRuleProcessorJSONata=s,exports.getDatetimeRuleProcessorMongoDBQuery=e.u,exports.getDatetimeRuleProcessorNL=e.l,exports.getDatetimeRuleProcessorSQL=e.t,exports.getDatetimeValueProcessorANSI=e.n,exports.getDatetimeValueProcessorMSSQL=e.r,exports.getDatetimeValueProcessorMySQL=e.i,exports.getDatetimeValueProcessorOracle=e.a,exports.getDatetimeValueProcessorPostgreSQL=e.o;
2
2
  //# sourceMappingURL=react-querybuilder_datetime.cjs.production.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"react-querybuilder_datetime.cjs.production.js","names":["datetimeRuleProcessorJsonLogic: RuleProcessor","processIsDateField","fieldObject: JsonLogicVar","negate","processIsDateField","valueAsArray: string[]","expression"],"sources":["../../src/datetimeRuleProcessorJsonLogic.ts","../../src/getDatetimeRuleProcessorJSONata.ts"],"sourcesContent":["import type { DefaultOperatorName, JsonLogicVar, RuleProcessor } from 'react-querybuilder';\nimport { defaultRuleProcessorJsonLogic, toArray } from 'react-querybuilder';\nimport type { RQBDateTimeJsonLogic } from './types';\nimport { processIsDateField } from './utils';\n\nconst dateOperationMap = {\n '!=': 'dateNotOn',\n '<': 'dateBefore',\n '<=': 'dateOnOrBefore',\n '=': 'dateOn',\n '>': 'dateAfter',\n '>=': 'dateOnOrAfter',\n between: 'dateBetween',\n in: 'dateIn',\n notBetween: 'dateNotBetween',\n notIn: 'dateNotIn',\n} as const satisfies Partial<Record<DefaultOperatorName, string>>;\n\n/**\n * Date/time rule processor for use by {@link @react-querybuilder/core!formatQuery formatQuery}\n * with the \"jsonlogic\" format.\n *\n * Note: Unlike other date/time rule processors from this library, this function does\n * not require a date/time library API. Instead, the date/time library API is used by\n * {@link getDatetimeJsonLogicOperations} during the evaluation process.\n */\nexport const datetimeRuleProcessorJsonLogic: RuleProcessor = (\n rule,\n options\n): RQBDateTimeJsonLogic => {\n const opts = options ?? /* istanbul ignore next */ {};\n\n if (!processIsDateField(opts.context?.isDateField, rule, opts)) {\n return defaultRuleProcessorJsonLogic(rule, opts);\n }\n\n const { field, operator, value, valueSource } = rule;\n const valueIsField = valueSource === 'field';\n const fieldObject: JsonLogicVar = { var: field };\n const maybeFieldRenderer = (v: string) => (valueIsField ? { var: `${v}` } : v);\n\n switch (operator) {\n case '<':\n case '<=':\n case '=':\n case '!=':\n case '>':\n case '>=':\n return {\n [dateOperationMap[operator]]: [fieldObject, maybeFieldRenderer(value)],\n } as RQBDateTimeJsonLogic;\n\n case 'in':\n case 'notIn': {\n const valueAsArray = toArray(value).map(v => maybeFieldRenderer(v));\n return { [dateOperationMap[operator]]: [fieldObject, valueAsArray] } as RQBDateTimeJsonLogic;\n }\n\n case 'between':\n case 'notBetween': {\n const valueAsArray = toArray(value).map(v => maybeFieldRenderer(v));\n\n if (valueAsArray.length < 2) return false;\n\n return {\n [dateOperationMap[operator]]: [valueAsArray[0], fieldObject, valueAsArray[1]],\n } as RQBDateTimeJsonLogic;\n }\n }\n\n return defaultRuleProcessorJsonLogic(rule, options);\n};\n","import type { RuleProcessor } from 'react-querybuilder';\nimport {\n defaultRuleProcessorJSONata,\n getQuotedFieldName,\n nullOrUndefinedOrEmpty,\n toArray,\n} from 'react-querybuilder';\nimport type { RQBDateTimeLibraryAPI } from './types';\nimport { processIsDateField } from './utils';\n\nconst shouldNegate = (op: string) => /^(does)?not/i.test(op);\n\nconst negate = (clause: string, negate: boolean) => (negate ? `$not(${clause})` : `${clause}`);\n\n/**\n * Generates a rule processor with date/time features for use by\n * {@link @react-querybuilder/core!formatQuery formatQuery} with the \"jsonata\" format.\n */\nexport const getDatetimeRuleProcessorJSONata =\n (apiFns: RQBDateTimeLibraryAPI): RuleProcessor =>\n (rule, options) => {\n const opts = options ?? /* istanbul ignore next */ {};\n const { context = {} } = opts;\n\n // istanbul ignore next\n const { quoteFieldNamesWith = ['', ''] as [string, string], fieldIdentifierSeparator = '' } =\n opts;\n const { field, operator, value, valueSource } = rule;\n\n if (!processIsDateField(context.isDateField, rule, opts)) {\n return defaultRuleProcessorJSONata(rule, opts);\n }\n\n const valueIsField = valueSource === 'field';\n\n const fldToMs = (f: string) =>\n `$toMillis(${getQuotedFieldName(f, { quoteFieldNamesWith, fieldIdentifierSeparator })})`;\n const valToMs = (v: string | Date) => `$toMillis(\"${apiFns.toISOString(v)}\")`;\n\n switch (operator) {\n case '<':\n case '<=':\n case '=':\n case '!=':\n case '>':\n case '>=':\n return `${fldToMs(field)} ${operator} ${valueIsField ? fldToMs(value) : valToMs(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 if (valueIsField) {\n if (valueAsArray.length === 0) return '';\n return negate(\n `${fldToMs(field)} in [${valueAsArray.map(val => fldToMs(val)).join(', ')}]`,\n shouldNegate(operator)\n );\n }\n if (valueAsDateArray.length === 0) return '';\n return negate(\n `${fldToMs(field)} in [${valueAsDateArray.map(val => valToMs(val)).join(', ')}]`,\n shouldNegate(operator)\n );\n }\n\n case 'between':\n case 'notBetween': {\n if (\n valueAsArray.length < 2 ||\n nullOrUndefinedOrEmpty(valueAsArray[0]) ||\n nullOrUndefinedOrEmpty(valueAsArray[1]) ||\n (!valueIsField && valueAsDateArray.length < 2)\n ) {\n return '';\n }\n\n if (valueIsField) {\n const [firstValue, secondValue] = valueAsArray;\n const expression = `${fldToMs(field)} >= ${fldToMs(firstValue)} and ${fldToMs(field)} <= ${fldToMs(secondValue)}`;\n return operator === 'between' ? `(${expression})` : negate(expression, true);\n }\n\n const [first, second] = valueAsDateArray;\n const [firstDate, secondDate] = apiFns.isBefore(first, second)\n ? [first, second]\n : [second, first];\n const expression = `${fldToMs(field)} >= ${valToMs(firstDate)} and ${fldToMs(field)} <= ${valToMs(secondDate)}`;\n return operator === 'between' ? `(${expression})` : negate(expression, true);\n }\n }\n\n return defaultRuleProcessorJSONata(rule, opts);\n };\n"],"mappings":"0GAKA,MAAM,EAAmB,CACvB,KAAM,YACN,IAAK,aACL,KAAM,iBACN,IAAK,SACL,IAAK,YACL,KAAM,gBACN,QAAS,cACT,GAAI,SACJ,WAAY,iBACZ,MAAO,YACR,CAUYA,GACX,EACA,IACyB,CACzB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AY,GAC/G,OAAO,IAAa,UAAY,IAAIA,EAAW,GAAK,EAAOA,EAAY,GAAK,CAG9E,GAAM,CAAC,EAAO,GAAU,EAClB,CAAC,EAAW,GAAc,EAAO,SAAS,EAAO,EAAO,CAC1D,CAAC,EAAO,EAAO,CACf,CAAC,EAAQ,EAAM,CACb,EAAa,GAAG,EAAQ,EAAM,CAAC,MAAM,EAAQ,EAAU,CAAC,OAAO,EAAQ,EAAM,CAAC,MAAM,EAAQ,EAAW,GAC7G,OAAO,IAAa,UAAY,IAAI,EAAW,GAAK,EAAO,EAAY,GAAK,EAIhF,OAAA,EAAA,EAAA,6BAAmC,EAAM,EAAK"}
1
+ {"version":3,"file":"react-querybuilder_datetime.cjs.production.js","names":["datetimeRuleProcessorJsonLogic: RuleProcessor","processIsDateField","fieldObject: JsonLogicVar","negate","processIsDateField","valueAsArray: string[]","expression"],"sources":["../../src/datetimeRuleProcessorJsonLogic.ts","../../src/getDatetimeRuleProcessorJSONata.ts"],"sourcesContent":["import type { DefaultOperatorName, JsonLogicVar, RuleProcessor } from 'react-querybuilder';\nimport { defaultRuleProcessorJsonLogic, toArray } from 'react-querybuilder';\nimport type { RQBDateTimeJsonLogic } from './types';\nimport { processIsDateField } from './utils';\n\nconst dateOperationMap = {\n '!=': 'dateNotOn',\n '<': 'dateBefore',\n '<=': 'dateOnOrBefore',\n '=': 'dateOn',\n '>': 'dateAfter',\n '>=': 'dateOnOrAfter',\n between: 'dateBetween',\n in: 'dateIn',\n notBetween: 'dateNotBetween',\n notIn: 'dateNotIn',\n} as const satisfies Partial<Record<DefaultOperatorName, string>>;\n\n/**\n * Date/time rule processor for use by {@link @react-querybuilder/core!formatQuery formatQuery}\n * with the \"jsonlogic\" format.\n *\n * Note: Unlike other date/time rule processors from this library, this function does\n * not require a date/time library API. Instead, the date/time library API is used by\n * {@link getDatetimeJsonLogicOperations} during the evaluation process.\n */\nexport const datetimeRuleProcessorJsonLogic: RuleProcessor = (\n rule,\n options\n): RQBDateTimeJsonLogic => {\n const opts = options ?? /* istanbul ignore next */ {};\n\n if (!processIsDateField(opts.context?.isDateField, rule, opts)) {\n return defaultRuleProcessorJsonLogic(rule, opts);\n }\n\n const { field, operator, value, valueSource } = rule;\n const valueIsField = valueSource === 'field';\n const fieldObject: JsonLogicVar = { var: field };\n const maybeFieldRenderer = (v: string) => (valueIsField ? { var: `${v}` } : v);\n\n switch (operator) {\n case '<':\n case '<=':\n case '=':\n case '!=':\n case '>':\n case '>=':\n return {\n [dateOperationMap[operator]]: [fieldObject, maybeFieldRenderer(value)],\n } as RQBDateTimeJsonLogic;\n\n case 'in':\n case 'notIn': {\n const valueAsArray = toArray(value).map(v => maybeFieldRenderer(v));\n return { [dateOperationMap[operator]]: [fieldObject, valueAsArray] } as RQBDateTimeJsonLogic;\n }\n\n case 'between':\n case 'notBetween': {\n const valueAsArray = toArray(value).map(v => maybeFieldRenderer(v));\n\n if (valueAsArray.length < 2) return false;\n\n return {\n [dateOperationMap[operator]]: [valueAsArray[0], fieldObject, valueAsArray[1]],\n } as RQBDateTimeJsonLogic;\n }\n }\n\n return defaultRuleProcessorJsonLogic(rule, options);\n};\n","import type { RuleProcessor } from 'react-querybuilder';\nimport {\n defaultRuleProcessorJSONata,\n getQuotedFieldName,\n nullOrUndefinedOrEmpty,\n toArray,\n} from 'react-querybuilder';\nimport type { RQBDateTimeLibraryAPI } from './types';\nimport { processIsDateField } from './utils';\n\nconst shouldNegate = (op: string) => /^(does)?not/i.test(op);\n\nconst negate = (clause: string, negate: boolean) => (negate ? `$not(${clause})` : `${clause}`);\n\n/**\n * Generates a rule processor with date/time features for use by\n * {@link @react-querybuilder/core!formatQuery formatQuery} with the \"jsonata\" format.\n */\nexport const getDatetimeRuleProcessorJSONata =\n (apiFns: RQBDateTimeLibraryAPI): RuleProcessor =>\n (rule, options) => {\n const opts = options ?? /* istanbul ignore next */ {};\n const { context = {} } = opts;\n\n // istanbul ignore next\n const { quoteFieldNamesWith = ['', ''] as [string, string], fieldIdentifierSeparator = '' } =\n opts;\n const { field, operator, value, valueSource } = rule;\n\n if (!processIsDateField(context.isDateField, rule, opts)) {\n return defaultRuleProcessorJSONata(rule, opts);\n }\n\n const valueIsField = valueSource === 'field';\n\n const fldToMs = (f: string) =>\n `$toMillis(${getQuotedFieldName(f, { quoteFieldNamesWith, fieldIdentifierSeparator })})`;\n const valToMs = (v: string | Date) => `$toMillis(\"${apiFns.toISOString(v)}\")`;\n\n switch (operator) {\n case '<':\n case '<=':\n case '=':\n case '!=':\n case '>':\n case '>=':\n return `${fldToMs(field)} ${operator} ${valueIsField ? fldToMs(value) : valToMs(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 if (valueIsField) {\n if (valueAsArray.length === 0) return '';\n return negate(\n `${fldToMs(field)} in [${valueAsArray.map(val => fldToMs(val)).join(', ')}]`,\n shouldNegate(operator)\n );\n }\n if (valueAsDateArray.length === 0) return '';\n return negate(\n `${fldToMs(field)} in [${valueAsDateArray.map(val => valToMs(val)).join(', ')}]`,\n shouldNegate(operator)\n );\n }\n\n case 'between':\n case 'notBetween': {\n if (\n valueAsArray.length < 2 ||\n nullOrUndefinedOrEmpty(valueAsArray[0]) ||\n nullOrUndefinedOrEmpty(valueAsArray[1]) ||\n (!valueIsField && valueAsDateArray.length < 2)\n ) {\n return '';\n }\n\n if (valueIsField) {\n const [firstValue, secondValue] = valueAsArray;\n const expression = `${fldToMs(field)} >= ${fldToMs(firstValue)} and ${fldToMs(field)} <= ${fldToMs(secondValue)}`;\n return operator === 'between' ? `(${expression})` : negate(expression, true);\n }\n\n const [first, second] = valueAsDateArray;\n const [firstDate, secondDate] = apiFns.isBefore(first, second)\n ? [first, second]\n : [second, first];\n const expression = `${fldToMs(field)} >= ${valToMs(firstDate)} and ${fldToMs(field)} <= ${valToMs(secondDate)}`;\n return operator === 'between' ? `(${expression})` : negate(expression, true);\n }\n }\n\n return defaultRuleProcessorJSONata(rule, opts);\n };\n"],"mappings":"oKAKA,MAAM,EAAmB,CACvB,KAAM,YACN,IAAK,aACL,KAAM,iBACN,IAAK,SACL,IAAK,YACL,KAAM,gBACN,QAAS,cACT,GAAI,SACJ,WAAY,iBACZ,MAAO,YACR,CAUYA,GACX,EACA,IACyB,CACzB,IAAM,EAAO,GAAsC,EAAE,CAErD,GAAI,CAACC,EAAAA,EAAmB,EAAK,SAAS,YAAa,EAAM,EAAK,CAC5D,OAAA,EAAA,EAAA,+BAAqC,EAAM,EAAK,CAGlD,GAAM,CAAE,QAAO,WAAU,QAAO,eAAgB,EAC1C,EAAe,IAAgB,QAC/BC,EAA4B,CAAE,IAAK,EAAO,CAC1C,EAAsB,GAAe,EAAe,CAAE,IAAK,GAAG,IAAK,CAAG,EAE5E,OAAQ,EAAR,CACE,IAAK,IACL,IAAK,KACL,IAAK,IACL,IAAK,KACL,IAAK,IACL,IAAK,KACH,MAAO,EACJ,EAAiB,IAAY,CAAC,EAAa,EAAmB,EAAM,CAAC,CACvE,CAEH,IAAK,KACL,IAAK,QAAS,CACZ,IAAM,GAAA,EAAA,EAAA,SAAuB,EAAM,CAAC,IAAI,GAAK,EAAmB,EAAE,CAAC,CACnE,MAAO,EAAG,EAAiB,IAAY,CAAC,EAAa,EAAa,CAAE,CAGtE,IAAK,UACL,IAAK,aAAc,CACjB,IAAM,GAAA,EAAA,EAAA,SAAuB,EAAM,CAAC,IAAI,GAAK,EAAmB,EAAE,CAAC,CAInE,OAFI,EAAa,OAAS,EAAU,GAE7B,EACJ,EAAiB,IAAY,CAAC,EAAa,GAAI,EAAa,EAAa,GAAG,CAC9E,EAIL,OAAA,EAAA,EAAA,+BAAqC,EAAM,EAAQ,EC5D/C,EAAgB,GAAe,eAAe,KAAK,EAAG,CAEtD,GAAU,EAAgB,IAAqBC,EAAS,QAAQ,EAAO,GAAK,GAA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AA,EAAA,EAAA,wBACC,EAAa,GAAG,GAAA,EAAA,EAAA,wBAChB,EAAa,GAAG,EACtC,CAAC,GAAgB,EAAiB,OAAS,EAE5C,MAAO,GAGT,GAAI,EAAc,CAChB,GAAM,CAAC,EAAY,GAAe,EAC5BC,EAAa,GAAG,EAAQ,EAAM,CAAC,MAAM,EAAQ,EAAW,CAAC,OAAO,EAAQ,EAAM,CAAC,MAAM,EAAQ,EAAY,GAC/G,OAAO,IAAa,UAAY,IAAIA,EAAW,GAAK,EAAOA,EAAY,GAAK,CAG9E,GAAM,CAAC,EAAO,GAAU,EAClB,CAAC,EAAW,GAAc,EAAO,SAAS,EAAO,EAAO,CAC1D,CAAC,EAAO,EAAO,CACf,CAAC,EAAQ,EAAM,CACb,EAAa,GAAG,EAAQ,EAAM,CAAC,MAAM,EAAQ,EAAU,CAAC,OAAO,EAAQ,EAAM,CAAC,MAAM,EAAQ,EAAW,GAC7G,OAAO,IAAa,UAAY,IAAI,EAAW,GAAK,EAAO,EAAY,GAAK,EAIhF,OAAA,EAAA,EAAA,6BAAmC,EAAM,EAAK"}
@@ -1,4 +1,4 @@
1
- import { _ as RuleProcessor, h as RQBJsonLogicDateTimeOperations, i as RQBDateTimeLibraryAPI, v as ValueProcessorByRule } from "./types-A60rB27l.js";
1
+ import { _ as RuleProcessor, h as RQBJsonLogicDateTimeOperations, i as RQBDateTimeLibraryAPI, v as ValueProcessorByRule } from "./types-BF3ibCEu.js";
2
2
 
3
3
  //#region src/rqbDateTimeLibraryAPI.jsdate.d.ts
4
4
 
@@ -1,2 +1,2 @@
1
- const e=require(`./getDatetimeRuleProcessorSQL-CSxxM8ce.js`),t=new Date(NaN),n=/^(\d{4})-(\d{2})-(\d{2})([T ](\d{2}):(\d{2}):(\d{2})(\.(\d{1,3}))?)?/,r=e=>{if(e instanceof Date)return e;let r=n.exec(e);if(!r)return t;let[i,a,o,s,c,l,u,d,f,p]=r,[m,h,g,_,v,y,b]=[a,o,s,l,u,d,p??`0`].filter(Boolean).map(Number),x=h-1;return l?new Date(Date.UTC(m,x,g,_,v,y,b)):new Date(m,x,g)},i=e=>{let t=r(e);return t instanceof Date&&!Number.isNaN(t.getTime())},a=e=>{let t=r(e);return i(t)?t.toISOString().slice(0,10):``},o={format:e=>r(e).toISOString(),isAfter:(e,t)=>{let n=r(e).getTime(),i=r(t).getTime();return!Number.isNaN(n)&&!Number.isNaN(i)&&n>i},isBefore:(e,t)=>{let n=r(e).getTime(),i=r(t).getTime();return!Number.isNaN(n)&&!Number.isNaN(i)&&n<i},isSame:(t,n)=>{let i=r(t),o=r(n);return e.p(t)||e.p(n)?a(t)===a(n):i.getTime()===o.getTime()},isValid:i,toDate:r,toISOString:e=>{let t=r(e);return i(t)?t.toISOString():``},toISOStringDateOnly:a},s=e.f(o),c=e.t(o),l=e.n(o),u=e.r(o),d=e.i(o),f=e.a(o),p=e.o(o),m=e.d(o),h=e.u(o),g=e.l(o);exports.datetimeRuleProcessorCEL=m,exports.datetimeRuleProcessorMongoDBQuery=h,exports.datetimeRuleProcessorNL=g,exports.datetimeRuleProcessorSQL=c,exports.datetimeValueProcessorANSI=l,exports.datetimeValueProcessorMSSQL=u,exports.datetimeValueProcessorMySQL=d,exports.datetimeValueProcessorOracle=f,exports.datetimeValueProcessorPostgreSQL=p,exports.jsonLogicDateTimeOperations=s,exports.rqbDateTimeLibraryAPI=o;
1
+ const e=require(`./getDatetimeRuleProcessorSQL-B0uQUU_F.js`),t=new Date(NaN),n=/^(\d{4})-(\d{2})-(\d{2})([T ](\d{2}):(\d{2}):(\d{2})(\.(\d{1,3}))?)?/,r=e=>{if(e instanceof Date)return e;let r=n.exec(e);if(!r)return t;let[i,a,o,s,c,l,u,d,f,p]=r,[m,h,g,_,v,y,b]=[a,o,s,l,u,d,p??`0`].filter(Boolean).map(Number),x=h-1;return l?new Date(Date.UTC(m,x,g,_,v,y,b)):new Date(m,x,g)},i=e=>{let t=r(e);return t instanceof Date&&!Number.isNaN(t.getTime())},a=e=>{let t=r(e);return i(t)?t.toISOString().slice(0,10):``},o={format:e=>r(e).toISOString(),isAfter:(e,t)=>{let n=r(e).getTime(),i=r(t).getTime();return!Number.isNaN(n)&&!Number.isNaN(i)&&n>i},isBefore:(e,t)=>{let n=r(e).getTime(),i=r(t).getTime();return!Number.isNaN(n)&&!Number.isNaN(i)&&n<i},isSame:(t,n)=>{let i=r(t),o=r(n);return e.p(t)||e.p(n)?a(t)===a(n):i.getTime()===o.getTime()},isValid:i,toDate:r,toISOString:e=>{let t=r(e);return i(t)?t.toISOString():``},toISOStringDateOnly:a},s=e.f(o),c=e.t(o),l=e.n(o),u=e.r(o),d=e.i(o),f=e.a(o),p=e.o(o),m=e.d(o),h=e.u(o),g=e.l(o);exports.datetimeRuleProcessorCEL=m,exports.datetimeRuleProcessorMongoDBQuery=h,exports.datetimeRuleProcessorNL=g,exports.datetimeRuleProcessorSQL=c,exports.datetimeValueProcessorANSI=l,exports.datetimeValueProcessorMSSQL=u,exports.datetimeValueProcessorMySQL=d,exports.datetimeValueProcessorOracle=f,exports.datetimeValueProcessorPostgreSQL=p,exports.jsonLogicDateTimeOperations=s,exports.rqbDateTimeLibraryAPI=o;
2
2
  //# sourceMappingURL=react-querybuilder_datetime.cjs.production.jsdate.js.map
@@ -1,4 +1,4 @@
1
- import { _ as RuleProcessor, h as RQBJsonLogicDateTimeOperations, i as RQBDateTimeLibraryAPI, v as ValueProcessorByRule } from "./types-A60rB27l.js";
1
+ import { _ as RuleProcessor, h as RQBJsonLogicDateTimeOperations, i as RQBDateTimeLibraryAPI, v as ValueProcessorByRule } from "./types-BF3ibCEu.js";
2
2
 
3
3
  //#region src/rqbDateTimeLibraryAPI.luxon.d.ts
4
4
 
@@ -1,2 +1,2 @@
1
- const e=require(`./getDatetimeRuleProcessorSQL-CSxxM8ce.js`);let t=require(`luxon`);t=e.h(t);const n=e=>typeof e==`string`?t.DateTime.fromISO(e):t.DateTime.fromJSDate(e),r=`yyyy-MM-dd`,i={format:(e,t)=>n(e).toFormat(t.replace(`YYYY-MM-DD`,r)),isAfter:(e,t)=>n(e)>n(t),isBefore:(e,t)=>n(e)<n(t),isSame:(t,r)=>e.p(t)||e.p(r)?n(t).hasSame(n(r),`day`):+n(t)==+n(r),isValid:e=>n(e).isValid,toDate:e=>n(e).toJSDate(),toISOString:e=>{let t=n(e);return t.isValid?t.toJSDate().toISOString():``},toISOStringDateOnly:e=>{let t=n(e);return t.isValid?t.toFormat(r):``}},a=e.f(i),o=e.t(i),s=e.n(i),c=e.r(i),l=e.i(i),u=e.a(i),d=e.o(i),f=e.d(i),p=e.u(i),m=e.l(i);exports.datetimeRuleProcessorCEL=f,exports.datetimeRuleProcessorMongoDBQuery=p,exports.datetimeRuleProcessorNL=m,exports.datetimeRuleProcessorSQL=o,exports.datetimeValueProcessorANSI=s,exports.datetimeValueProcessorMSSQL=c,exports.datetimeValueProcessorMySQL=l,exports.datetimeValueProcessorOracle=u,exports.datetimeValueProcessorPostgreSQL=d,exports.jsonLogicDateTimeOperations=a,exports.rqbDateTimeLibraryAPI=i;
1
+ const e=require(`./getDatetimeRuleProcessorSQL-B0uQUU_F.js`),t=require(`./react-querybuilder_datetime.cjs.production.dayjs.js`);let n=require(`luxon`);const r=e=>typeof e==`string`?n.DateTime.fromISO(e):n.DateTime.fromJSDate(e),i=`yyyy-MM-dd`,a={format:(e,t)=>r(e).toFormat(t.replace(`YYYY-MM-DD`,i)),isAfter:(e,t)=>r(e)>r(t),isBefore:(e,t)=>r(e)<r(t),isSame:(t,n)=>e.p(t)||e.p(n)?r(t).hasSame(r(n),`day`):+r(t)==+r(n),isValid:e=>r(e).isValid,toDate:e=>r(e).toJSDate(),toISOString:e=>{let t=r(e);return t.isValid?t.toJSDate().toISOString():``},toISOStringDateOnly:e=>{let t=r(e);return t.isValid?t.toFormat(i):``}},o=e.f(a),s=e.t(a),c=e.n(a),l=e.r(a),u=e.i(a),d=e.a(a),f=e.o(a),p=e.d(a),m=e.u(a),h=e.l(a);exports.datetimeRuleProcessorCEL=p,exports.datetimeRuleProcessorMongoDBQuery=m,exports.datetimeRuleProcessorNL=h,exports.datetimeRuleProcessorSQL=s,exports.datetimeValueProcessorANSI=c,exports.datetimeValueProcessorMSSQL=l,exports.datetimeValueProcessorMySQL=u,exports.datetimeValueProcessorOracle=d,exports.datetimeValueProcessorPostgreSQL=f,exports.jsonLogicDateTimeOperations=o,exports.rqbDateTimeLibraryAPI=a;
2
2
  //# sourceMappingURL=react-querybuilder_datetime.cjs.production.luxon.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"react-querybuilder_datetime.cjs.production.luxon.js","names":["DateTime","rqbDateTimeLibraryAPI: RQBDateTimeLibraryAPI","isISOStringDateOnly","jsonLogicDateTimeOperations: RQBJsonLogicDateTimeOperations","getDatetimeJsonLogicOperations","datetimeRuleProcessorSQL: RuleProcessor","getDatetimeRuleProcessorSQL","datetimeValueProcessorANSI: ValueProcessorByRule","getDatetimeValueProcessorANSI","datetimeValueProcessorMSSQL: ValueProcessorByRule","getDatetimeValueProcessorMSSQL","datetimeValueProcessorMySQL: ValueProcessorByRule","getDatetimeValueProcessorMySQL","datetimeValueProcessorOracle: ValueProcessorByRule","getDatetimeValueProcessorOracle","datetimeValueProcessorPostgreSQL: ValueProcessorByRule","getDatetimeValueProcessorPostgreSQL","datetimeRuleProcessorCEL: ValueProcessorByRule","getDatetimeRuleProcessorCEL","datetimeRuleProcessorMongoDBQuery: ValueProcessorByRule","getDatetimeRuleProcessorMongoDBQuery","datetimeRuleProcessorNL: ValueProcessorByRule","getDatetimeRuleProcessorNL"],"sources":["../../src/rqbDateTimeLibraryAPI.luxon.ts","../../src/index.luxon.ts"],"sourcesContent":["import { DateTime } from 'luxon';\nimport type { RQBDateTimeLibraryAPI } from './types';\nimport { isISOStringDateOnly } from './utils';\n\nconst toDateTime = (a: string | Date) =>\n typeof a === 'string' ? DateTime.fromISO(a) : DateTime.fromJSDate(a);\nconst iso8601DateOnly = 'yyyy-MM-dd';\n\n/**\n * {@link RQBDateTimeLibraryAPI} for Luxon\n */\nexport const rqbDateTimeLibraryAPI: RQBDateTimeLibraryAPI = {\n format: (d, fmt) => toDateTime(d).toFormat(fmt.replace('YYYY-MM-DD', iso8601DateOnly)),\n isAfter: (a, b) => toDateTime(a) > toDateTime(b),\n isBefore: (a, b) => toDateTime(a) < toDateTime(b),\n isSame: (a, b) =>\n isISOStringDateOnly(a) || isISOStringDateOnly(b)\n ? toDateTime(a).hasSame(toDateTime(b), 'day')\n : +toDateTime(a) === +toDateTime(b),\n isValid: d => toDateTime(d).isValid,\n toDate: d => toDateTime(d).toJSDate(),\n toISOString: d => {\n const dToDate = toDateTime(d);\n return dToDate.isValid ? dToDate.toJSDate().toISOString() : '';\n },\n toISOStringDateOnly: d => {\n const dToDate = toDateTime(d);\n return dToDate.isValid ? dToDate.toFormat(iso8601DateOnly) : '';\n },\n};\n","/**\n * Import from `\"@react-querybuilder/datetime/luxon\"` for enhanced date/time support using [Luxon](https://moment.github.io/luxon/).\n *\n * @module luxon\n */\n\nimport type { RuleProcessor, ValueProcessorByRule } from 'react-querybuilder';\nimport { getDatetimeJsonLogicOperations } from './getDatetimeJsonLogicOperations';\nimport { getDatetimeRuleProcessorCEL } from './getDatetimeRuleProcessorCEL';\nimport { getDatetimeRuleProcessorMongoDBQuery } from './getDatetimeRuleProcessorMongoDBQuery';\nimport { getDatetimeRuleProcessorNL } from './getDatetimeRuleProcessorNL';\nimport {\n getDatetimeRuleProcessorSQL,\n getDatetimeValueProcessorANSI,\n getDatetimeValueProcessorMSSQL,\n getDatetimeValueProcessorMySQL,\n getDatetimeValueProcessorOracle,\n getDatetimeValueProcessorPostgreSQL,\n} from './getDatetimeRuleProcessorSQL';\nimport { rqbDateTimeLibraryAPI } from './rqbDateTimeLibraryAPI.luxon';\nimport type { RQBJsonLogicDateTimeOperations } from './types';\n\n/**\n * Custom JsonLogic date/time operations using Luxon\n */\nexport const jsonLogicDateTimeOperations: RQBJsonLogicDateTimeOperations =\n getDatetimeJsonLogicOperations(rqbDateTimeLibraryAPI);\n\n/**\n * {@link @react-querybuilder/core!formatQuery formatQuery} rule processor for \"sql\" format using Luxon\n */\nexport const datetimeRuleProcessorSQL: RuleProcessor =\n getDatetimeRuleProcessorSQL(rqbDateTimeLibraryAPI);\n/**\n * {@link @react-querybuilder/core!formatQuery formatQuery} value processor for \"sql\" format (\"ansi\" preset) using Luxon\n */\nexport const datetimeValueProcessorANSI: ValueProcessorByRule =\n getDatetimeValueProcessorANSI(rqbDateTimeLibraryAPI);\n/**\n * {@link @react-querybuilder/core!formatQuery formatQuery} value processor for \"sql\" format (\"mssql\" preset) using Luxon\n */\nexport const datetimeValueProcessorMSSQL: ValueProcessorByRule =\n getDatetimeValueProcessorMSSQL(rqbDateTimeLibraryAPI);\n/**\n * {@link @react-querybuilder/core!formatQuery formatQuery} value processor for \"sql\" format (\"mysql\" preset) using Luxon\n */\nexport const datetimeValueProcessorMySQL: ValueProcessorByRule =\n getDatetimeValueProcessorMySQL(rqbDateTimeLibraryAPI);\n/**\n * {@link @react-querybuilder/core!formatQuery formatQuery} value processor for \"sql\" format (\"oracle\" preset) using Luxon\n */\nexport const datetimeValueProcessorOracle: ValueProcessorByRule =\n getDatetimeValueProcessorOracle(rqbDateTimeLibraryAPI);\n/**\n * {@link @react-querybuilder/core!formatQuery formatQuery} value processor for \"sql\" format (\"postgresql\" preset) using Luxon\n */\nexport const datetimeValueProcessorPostgreSQL: ValueProcessorByRule =\n getDatetimeValueProcessorPostgreSQL(rqbDateTimeLibraryAPI);\n\n/**\n * {@link @react-querybuilder/core!formatQuery formatQuery} rule processor for \"cel\" format using Luxon\n */\nexport const datetimeRuleProcessorCEL: ValueProcessorByRule =\n getDatetimeRuleProcessorCEL(rqbDateTimeLibraryAPI);\n\n/**\n * {@link @react-querybuilder/core!formatQuery formatQuery} rule processor for \"mongodb_query\" format using Luxon\n */\nexport const datetimeRuleProcessorMongoDBQuery: ValueProcessorByRule =\n getDatetimeRuleProcessorMongoDBQuery(rqbDateTimeLibraryAPI);\n\n/**\n * {@link @react-querybuilder/core!formatQuery formatQuery} rule processor for \"natural_language\" format using Luxon\n */\nexport const datetimeRuleProcessorNL: ValueProcessorByRule =\n getDatetimeRuleProcessorNL(rqbDateTimeLibraryAPI);\n\nexport * from './rqbDateTimeLibraryAPI.luxon';\n"],"mappings":"6FAIA,MAAM,EAAc,GAClB,OAAO,GAAM,SAAWA,EAAAA,SAAS,QAAQ,EAAE,CAAGA,EAAAA,SAAS,WAAW,EAAE,CAChE,EAAkB,aAKXC,EAA+C,CAC1D,QAAS,EAAG,IAAQ,EAAW,EAAE,CAAC,SAAS,EAAI,QAAQ,aAAc,EAAgB,CAAC,CACtF,SAAU,EAAG,IAAM,EAAW,EAAE,CAAG,EAAW,EAAE,CAChD,UAAW,EAAG,IAAM,EAAW,EAAE,CAAG,EAAW,EAAE,CACjD,QAAS,EAAG,IACVC,EAAAA,EAAoB,EAAE,EAAIA,EAAAA,EAAoB,EAAE,CAC5C,EAAW,EAAE,CAAC,QAAQ,EAAW,EAAE,CAAE,MAAM,CAC3C,CAAC,EAAW,EAAE,EAAK,CAAC,EAAW,EAAE,CACvC,QAAS,GAAK,EAAW,EAAE,CAAC,QAC5B,OAAQ,GAAK,EAAW,EAAE,CAAC,UAAU,CACrC,YAAa,GAAK,CAChB,IAAM,EAAU,EAAW,EAAE,CAC7B,OAAO,EAAQ,QAAU,EAAQ,UAAU,CAAC,aAAa,CAAG,IAE9D,oBAAqB,GAAK,CACxB,IAAM,EAAU,EAAW,EAAE,CAC7B,OAAO,EAAQ,QAAU,EAAQ,SAAS,EAAgB,CAAG,IAEhE,CCJYC,EACXC,EAAAA,EAA+B,EAAsB,CAK1CC,EACXC,EAAAA,EAA4B,EAAsB,CAIvCC,EACXC,EAAAA,EAA8B,EAAsB,CAIzCC,EACXC,EAAAA,EAA+B,EAAsB,CAI1CC,EACXC,EAAAA,EAA+B,EAAsB,CAI1CC,EACXC,EAAAA,EAAgC,EAAsB,CAI3CC,EACXC,EAAAA,EAAoC,EAAsB,CAK/CC,EACXC,EAAAA,EAA4B,EAAsB,CAKvCC,EACXC,EAAAA,EAAqC,EAAsB,CAKhDC,EACXC,EAAAA,EAA2B,EAAsB"}
1
+ {"version":3,"file":"react-querybuilder_datetime.cjs.production.luxon.js","names":["DateTime","rqbDateTimeLibraryAPI: RQBDateTimeLibraryAPI","isISOStringDateOnly","jsonLogicDateTimeOperations: RQBJsonLogicDateTimeOperations","getDatetimeJsonLogicOperations","datetimeRuleProcessorSQL: RuleProcessor","getDatetimeRuleProcessorSQL","datetimeValueProcessorANSI: ValueProcessorByRule","getDatetimeValueProcessorANSI","datetimeValueProcessorMSSQL: ValueProcessorByRule","getDatetimeValueProcessorMSSQL","datetimeValueProcessorMySQL: ValueProcessorByRule","getDatetimeValueProcessorMySQL","datetimeValueProcessorOracle: ValueProcessorByRule","getDatetimeValueProcessorOracle","datetimeValueProcessorPostgreSQL: ValueProcessorByRule","getDatetimeValueProcessorPostgreSQL","datetimeRuleProcessorCEL: ValueProcessorByRule","getDatetimeRuleProcessorCEL","datetimeRuleProcessorMongoDBQuery: ValueProcessorByRule","getDatetimeRuleProcessorMongoDBQuery","datetimeRuleProcessorNL: ValueProcessorByRule","getDatetimeRuleProcessorNL"],"sources":["../../src/rqbDateTimeLibraryAPI.luxon.ts","../../src/index.luxon.ts"],"sourcesContent":["import { DateTime } from 'luxon';\nimport type { RQBDateTimeLibraryAPI } from './types';\nimport { isISOStringDateOnly } from './utils';\n\nconst toDateTime = (a: string | Date) =>\n typeof a === 'string' ? DateTime.fromISO(a) : DateTime.fromJSDate(a);\nconst iso8601DateOnly = 'yyyy-MM-dd';\n\n/**\n * {@link RQBDateTimeLibraryAPI} for Luxon\n */\nexport const rqbDateTimeLibraryAPI: RQBDateTimeLibraryAPI = {\n format: (d, fmt) => toDateTime(d).toFormat(fmt.replace('YYYY-MM-DD', iso8601DateOnly)),\n isAfter: (a, b) => toDateTime(a) > toDateTime(b),\n isBefore: (a, b) => toDateTime(a) < toDateTime(b),\n isSame: (a, b) =>\n isISOStringDateOnly(a) || isISOStringDateOnly(b)\n ? toDateTime(a).hasSame(toDateTime(b), 'day')\n : +toDateTime(a) === +toDateTime(b),\n isValid: d => toDateTime(d).isValid,\n toDate: d => toDateTime(d).toJSDate(),\n toISOString: d => {\n const dToDate = toDateTime(d);\n return dToDate.isValid ? dToDate.toJSDate().toISOString() : '';\n },\n toISOStringDateOnly: d => {\n const dToDate = toDateTime(d);\n return dToDate.isValid ? dToDate.toFormat(iso8601DateOnly) : '';\n },\n};\n","/**\n * Import from `\"@react-querybuilder/datetime/luxon\"` for enhanced date/time support using [Luxon](https://moment.github.io/luxon/).\n *\n * @module luxon\n */\n\nimport type { RuleProcessor, ValueProcessorByRule } from 'react-querybuilder';\nimport { getDatetimeJsonLogicOperations } from './getDatetimeJsonLogicOperations';\nimport { getDatetimeRuleProcessorCEL } from './getDatetimeRuleProcessorCEL';\nimport { getDatetimeRuleProcessorMongoDBQuery } from './getDatetimeRuleProcessorMongoDBQuery';\nimport { getDatetimeRuleProcessorNL } from './getDatetimeRuleProcessorNL';\nimport {\n getDatetimeRuleProcessorSQL,\n getDatetimeValueProcessorANSI,\n getDatetimeValueProcessorMSSQL,\n getDatetimeValueProcessorMySQL,\n getDatetimeValueProcessorOracle,\n getDatetimeValueProcessorPostgreSQL,\n} from './getDatetimeRuleProcessorSQL';\nimport { rqbDateTimeLibraryAPI } from './rqbDateTimeLibraryAPI.luxon';\nimport type { RQBJsonLogicDateTimeOperations } from './types';\n\n/**\n * Custom JsonLogic date/time operations using Luxon\n */\nexport const jsonLogicDateTimeOperations: RQBJsonLogicDateTimeOperations =\n getDatetimeJsonLogicOperations(rqbDateTimeLibraryAPI);\n\n/**\n * {@link @react-querybuilder/core!formatQuery formatQuery} rule processor for \"sql\" format using Luxon\n */\nexport const datetimeRuleProcessorSQL: RuleProcessor =\n getDatetimeRuleProcessorSQL(rqbDateTimeLibraryAPI);\n/**\n * {@link @react-querybuilder/core!formatQuery formatQuery} value processor for \"sql\" format (\"ansi\" preset) using Luxon\n */\nexport const datetimeValueProcessorANSI: ValueProcessorByRule =\n getDatetimeValueProcessorANSI(rqbDateTimeLibraryAPI);\n/**\n * {@link @react-querybuilder/core!formatQuery formatQuery} value processor for \"sql\" format (\"mssql\" preset) using Luxon\n */\nexport const datetimeValueProcessorMSSQL: ValueProcessorByRule =\n getDatetimeValueProcessorMSSQL(rqbDateTimeLibraryAPI);\n/**\n * {@link @react-querybuilder/core!formatQuery formatQuery} value processor for \"sql\" format (\"mysql\" preset) using Luxon\n */\nexport const datetimeValueProcessorMySQL: ValueProcessorByRule =\n getDatetimeValueProcessorMySQL(rqbDateTimeLibraryAPI);\n/**\n * {@link @react-querybuilder/core!formatQuery formatQuery} value processor for \"sql\" format (\"oracle\" preset) using Luxon\n */\nexport const datetimeValueProcessorOracle: ValueProcessorByRule =\n getDatetimeValueProcessorOracle(rqbDateTimeLibraryAPI);\n/**\n * {@link @react-querybuilder/core!formatQuery formatQuery} value processor for \"sql\" format (\"postgresql\" preset) using Luxon\n */\nexport const datetimeValueProcessorPostgreSQL: ValueProcessorByRule =\n getDatetimeValueProcessorPostgreSQL(rqbDateTimeLibraryAPI);\n\n/**\n * {@link @react-querybuilder/core!formatQuery formatQuery} rule processor for \"cel\" format using Luxon\n */\nexport const datetimeRuleProcessorCEL: ValueProcessorByRule =\n getDatetimeRuleProcessorCEL(rqbDateTimeLibraryAPI);\n\n/**\n * {@link @react-querybuilder/core!formatQuery formatQuery} rule processor for \"mongodb_query\" format using Luxon\n */\nexport const datetimeRuleProcessorMongoDBQuery: ValueProcessorByRule =\n getDatetimeRuleProcessorMongoDBQuery(rqbDateTimeLibraryAPI);\n\n/**\n * {@link @react-querybuilder/core!formatQuery formatQuery} rule processor for \"natural_language\" format using Luxon\n */\nexport const datetimeRuleProcessorNL: ValueProcessorByRule =\n getDatetimeRuleProcessorNL(rqbDateTimeLibraryAPI);\n\nexport * from './rqbDateTimeL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al'>;
344
344
  //=> 'not equal'
345
345
  ```
346
346
 
347
+ Note: Sometimes using the `If` type can make an implementation non–tail-recursive, which can impact performance. In such cases, it’s better to use a conditional directly. Refer to the following example:
348
+
349
+ @example
350
+ ```
351
+ import type {If, IsEqual, StringRepeat} from 'type-fest';
352
+
353
+ type HundredZeroes = StringRepeat<'0', 100>;
354
+
355
+ // The following implementation is not tail recursive
356
+ type Includes<S extends string, Char extends string> =
357
+ S extends `${infer First}${infer Rest}`
358
+ ? If<IsEqual<First, Char>,
359
+ 'found',
360
+ Includes<Rest, Char>>
361
+ : 'not found';
362
+
363
+ // Hence, instantiations with long strings will fail
364
+ // @ts-expect-error
365
+ type Fails = Includes<HundredZeroes, '1'>;
366
+ // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
367
+ // Error: Type instantiation is excessively deep and possibly infinite.
368
+
369
+ // However, if we use a simple conditional instead of `If`, the implementation becomes tail-recursive
370
+ type IncludesWithoutIf<S extends string, Char extends string> =
371
+ S extends `${infer First}${infer Rest}`
372
+ ? IsEqual<First, Char> extends true
373
+ ? 'found'
374
+ : IncludesWithoutIf<Rest, Char>
375
+ : 'not found';
376
+
377
+ // Now, instantiations with long strings will work
378
+ type Works = IncludesWithoutIf<HundredZeroes, '1'>;
379
+ //=> 'not found'
380
+ ```
381
+
347
382
  @category Type Guard
348
383
  @category Utilities
349
384
  */
@@ -438,7 +473,7 @@ fn(someInterface as Simplify<SomeInterface>); // Good: transform an `interface`
438
473
  ```
439
474
 
440
475
  @link https://github.com/microsoft/TypeScript/issues/15300
441
- @see SimplifyDeep
476
+ @see {@link SimplifyDeep}
442
477
  @category Object
443
478
  */
444
479
  type Simplify<T> = { [KeyType in keyof T]: T[KeyType] } & {};
@@ -562,7 +597,7 @@ type ExampleWithoutIndexSignatures = OmitIndexSignature<Example>;
562
597
  // => { foo: 'bar'; qux?: 'baz' | undefined; }
563
598
  ```
564
599
 
565
- @see PickIndexSignature
600
+ @see {@link PickIndexSignature}
566
601
  @category Object
567
602
  */
568
603
  type OmitIndexSignature<ObjectType> = { [KeyType in keyof ObjectType as {} extends Record<KeyType, unknown> ? never : KeyType]: ObjectType[KeyType] };
@@ -610,7 +645,7 @@ type ExampleIndexSignature = PickIndexSignature<Example>;
610
645
  // }
611
646
  ```
612
647
 
613
- @see OmitIndexSignature
648
+ @see {@link OmitIndexSignature}
614
649
  @category Object
615
650
  */
616
651
  type PickIndexSignature<ObjectType> = { [KeyType in keyof ObjectType as {} extends Record<KeyType, unknown> ? KeyType : never]: ObjectType[KeyType] };
@@ -1713,4 +1748,4 @@ type IsDateFieldFunction = (...[rule, opts]: Parameters<RuleProcessor>) => boole
1713
1748
  type IsDateField = IsDateFieldFunction | Record<string, unknown> | Record<string, unknown>[] | boolean | undefined;
1714
1749
  //#endregion
1715
1750
  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 };
1716
- //# sourceMappingURL=types-A60rB27l.d.ts.map
1751
+ //# sourceMappingURL=types-BF3ibCEu.d.ts.map
@@ -362,4 +362,4 @@ const getDatetimeRuleProcessorSQL = (apiFns) => (rule, options) => {
362
362
 
363
363
  //#endregion
364
364
  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 };
365
- //# sourceMappingURL=getDatetimeRuleProcessorSQL-CSl2zGza.mjs.map
365
+ //# sourceMappingURL=getDatetimeRuleProcessorSQL-Cf79Th_c.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"getDatetimeRuleProcessorSQL-CSl2zGza.mjs","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,KAAK,aAAa,cAClB,KAAK,aAAa,gBAClB,KAAK,aAAa,cAClB,KAAK,aAAa,oBAClB,KAAK,aAAa,sBAClB,KAAK,aAAa,oBAClB,KAAK,aAAa,UAClB,KAAK,aAAa,aAClB,iDAAiD,KAAK,MAAM,WAAW,SAAmB;AAE5F,MAAa,sBACX,aACA,GAAG,CAAC,MAAM,UACE;AACZ,KAAI,OAAO,gBAAgB,UACzB,QAAO;AAGT,KAAI,OAAO,gBAAgB,WACzB,QAAO,YAAY,MAAM,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IAAE,GAAG;IAAM,SAAS,EAAE,eAAe,MAAM,IAAI;IAAE,CAClD,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,EAC3C;KAAE,GAAG;KAAM,SAAS,EAAE,eAAe;KAAE,CACxC,CACF,CACA,KAAK,QAAQ;;AAElB;EAEF,SAAS;GACP,MAAM,CAAC,eAAe,SAAS,iBAAiB,MAAM,CAAC,IAAI,GAAG;AAC9D,gBAAa,eACX;IAAE,OAAO,KAAK;IAAO,UAAU;IAAK;IAAO,EAC3C;IAAE,GAAG;IAAM,SAAS,EAAE,eAAe;IAAE,CACxC;;;AAIL,QAAO,GAAG,mBAAmB,KAAK,OAAO;EAAE;EAAqB;EAA0B,CAAC,CAAC,GAAG,SAAS,GAAG,aAAa,MAAM"}
1
+ {"version":3,"file":"getDatetimeRuleProcessorSQL-Cf79Th_c.mjs","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 } }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EAA0B,CAAC,CAAC,GAAG,SAAS,GAAG,aAAa,MAAM"}
@@ -117,7 +117,7 @@ const getDatetimeRuleProcessorMongoDBQuery = (apiFns) => (rule, options) => {
117
117
  };
118
118
 
119
119
  //#endregion
120
- //#region \0@oxc-project+runtime@0.95.0/helpers/typeof.js
120
+ //#region \0@oxc-project+runtime@0.96.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.95.0/helpers/toPrimitive.js
131
+ //#region \0@oxc-project+runtime@0.96.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.95.0/helpers/toPropertyKey.js
144
+ //#region \0@oxc-project+runtime@0.96.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.95.0/helpers/defineProperty.js
151
+ //#region \0@oxc-project+runtime@0.96.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.95.0/helpers/objectSpread2.js
162
+ //#region \0@oxc-project+runtime@0.96.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-B8y0RI7t.js.map
384
+ //# sourceMappingURL=getDatetimeRuleProcessorSQL-DfPnCZiT.js.map