@react-querybuilder/datetime 8.8.3 → 8.9.1

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 (134) hide show
  1. package/dist/cjs/date-fns.d.ts +1 -0
  2. package/dist/cjs/dayjs.d.ts +1 -0
  3. package/dist/cjs/getDatetimeRuleProcessorSQL-D95jgDK6.js +2 -0
  4. package/dist/cjs/getDatetimeRuleProcessorSQL-D95jgDK6.js.map +1 -0
  5. package/dist/cjs/index.d.ts +1 -0
  6. package/dist/cjs/jsdate.d.ts +1 -0
  7. package/dist/cjs/luxon.d.ts +1 -0
  8. package/dist/cjs/react-querybuilder_datetime.cjs.development.d.ts +108 -0
  9. package/dist/cjs/react-querybuilder_datetime.cjs.development.date-fns.d.ts +53 -0
  10. package/dist/cjs/react-querybuilder_datetime.cjs.development.date-fns.js +82 -775
  11. package/dist/cjs/react-querybuilder_datetime.cjs.development.date-fns.js.map +1 -1
  12. package/dist/cjs/react-querybuilder_datetime.cjs.development.dayjs.d.ts +53 -0
  13. package/dist/cjs/react-querybuilder_datetime.cjs.development.dayjs.js +76 -785
  14. package/dist/cjs/react-querybuilder_datetime.cjs.development.dayjs.js.map +1 -1
  15. package/dist/cjs/react-querybuilder_datetime.cjs.development.js +125 -934
  16. package/dist/cjs/react-querybuilder_datetime.cjs.development.js.map +1 -1
  17. package/dist/cjs/react-querybuilder_datetime.cjs.development.jsdate.d.ts +56 -0
  18. package/dist/cjs/react-querybuilder_datetime.cjs.development.jsdate.js +113 -834
  19. package/dist/cjs/react-querybuilder_datetime.cjs.development.jsdate.js.map +1 -1
  20. package/dist/cjs/react-querybuilder_datetime.cjs.development.luxon.d.ts +53 -0
  21. package/dist/cjs/react-querybuilder_datetime.cjs.development.luxon.js +78 -779
  22. package/dist/cjs/react-querybuilder_datetime.cjs.development.luxon.js.map +1 -1
  23. package/dist/cjs/react-querybuilder_datetime.cjs.production.d.ts +108 -0
  24. package/dist/cjs/react-querybuilder_datetime.cjs.production.date-fns.d.ts +53 -0
  25. package/dist/cjs/react-querybuilder_datetime.cjs.production.date-fns.js +1 -6
  26. package/dist/cjs/react-querybuilder_datetime.cjs.production.date-fns.js.map +1 -1
  27. package/dist/cjs/react-querybuilder_datetime.cjs.production.dayjs.d.ts +53 -0
  28. package/dist/cjs/react-querybuilder_datetime.cjs.production.dayjs.js +1 -6
  29. package/dist/cjs/react-querybuilder_datetime.cjs.production.dayjs.js.map +1 -1
  30. package/dist/cjs/react-querybuilder_datetime.cjs.production.js +1 -7
  31. package/dist/cjs/react-querybuilder_datetime.cjs.production.js.map +1 -1
  32. package/dist/cjs/react-querybuilder_datetime.cjs.production.jsdate.d.ts +56 -0
  33. package/dist/cjs/react-querybuilder_datetime.cjs.production.jsdate.js +1 -7
  34. package/dist/cjs/react-querybuilder_datetime.cjs.production.jsdate.js.map +1 -1
  35. package/dist/cjs/react-querybuilder_datetime.cjs.production.luxon.d.ts +53 -0
  36. package/dist/cjs/react-querybuilder_datetime.cjs.production.luxon.js +1 -6
  37. package/dist/cjs/react-querybuilder_datetime.cjs.production.luxon.js.map +1 -1
  38. package/dist/cjs/types-QCQUGVZa.d.ts +1694 -0
  39. package/dist/getDatetimeRuleProcessorSQL-CN80oEFK.js +386 -0
  40. package/dist/getDatetimeRuleProcessorSQL-CN80oEFK.js.map +1 -0
  41. package/dist/getDatetimeRuleProcessorSQL-KYRPP9qd.mjs +367 -0
  42. package/dist/getDatetimeRuleProcessorSQL-KYRPP9qd.mjs.map +1 -0
  43. package/dist/react-querybuilder_datetime.d.mts +108 -0
  44. package/dist/react-querybuilder_datetime.date-fns.d.mts +53 -0
  45. package/dist/react-querybuilder_datetime.date-fns.mjs +72 -57
  46. package/dist/react-querybuilder_datetime.date-fns.mjs.map +1 -1
  47. package/dist/react-querybuilder_datetime.dayjs.d.mts +53 -0
  48. package/dist/react-querybuilder_datetime.dayjs.mjs +66 -57
  49. package/dist/react-querybuilder_datetime.dayjs.mjs.map +1 -1
  50. package/dist/react-querybuilder_datetime.jsdate.d.mts +56 -0
  51. package/dist/react-querybuilder_datetime.jsdate.mjs +102 -114
  52. package/dist/react-querybuilder_datetime.jsdate.mjs.map +1 -1
  53. package/dist/react-querybuilder_datetime.legacy-esm.d.ts +108 -0
  54. package/dist/react-querybuilder_datetime.legacy-esm.date-fns.d.ts +53 -0
  55. package/dist/react-querybuilder_datetime.legacy-esm.date-fns.js +72 -57
  56. package/dist/react-querybuilder_datetime.legacy-esm.date-fns.js.map +1 -1
  57. package/dist/react-querybuilder_datetime.legacy-esm.dayjs.d.ts +53 -0
  58. package/dist/react-querybuilder_datetime.legacy-esm.dayjs.js +66 -57
  59. package/dist/react-querybuilder_datetime.legacy-esm.dayjs.js.map +1 -1
  60. package/dist/react-querybuilder_datetime.legacy-esm.js +113 -215
  61. package/dist/react-querybuilder_datetime.legacy-esm.js.map +1 -1
  62. package/dist/react-querybuilder_datetime.legacy-esm.jsdate.d.ts +56 -0
  63. package/dist/react-querybuilder_datetime.legacy-esm.jsdate.js +102 -114
  64. package/dist/react-querybuilder_datetime.legacy-esm.jsdate.js.map +1 -1
  65. package/dist/react-querybuilder_datetime.legacy-esm.luxon.d.ts +53 -0
  66. package/dist/react-querybuilder_datetime.legacy-esm.luxon.js +68 -61
  67. package/dist/react-querybuilder_datetime.legacy-esm.luxon.js.map +1 -1
  68. package/dist/react-querybuilder_datetime.luxon.d.mts +53 -0
  69. package/dist/react-querybuilder_datetime.luxon.mjs +68 -61
  70. package/dist/react-querybuilder_datetime.luxon.mjs.map +1 -1
  71. package/dist/react-querybuilder_datetime.mjs +112 -215
  72. package/dist/react-querybuilder_datetime.mjs.map +1 -1
  73. package/dist/react-querybuilder_datetime.production.d.mts +108 -0
  74. package/dist/react-querybuilder_datetime.production.date-fns.d.mts +53 -0
  75. package/dist/react-querybuilder_datetime.production.date-fns.mjs +1 -1
  76. package/dist/react-querybuilder_datetime.production.date-fns.mjs.map +1 -1
  77. package/dist/react-querybuilder_datetime.production.dayjs.d.mts +53 -0
  78. package/dist/react-querybuilder_datetime.production.dayjs.mjs +1 -1
  79. package/dist/react-querybuilder_datetime.production.dayjs.mjs.map +1 -1
  80. package/dist/react-querybuilder_datetime.production.jsdate.d.mts +56 -0
  81. package/dist/react-querybuilder_datetime.production.jsdate.mjs +1 -2
  82. package/dist/react-querybuilder_datetime.production.jsdate.mjs.map +1 -1
  83. package/dist/react-querybuilder_datetime.production.luxon.d.mts +53 -0
  84. package/dist/react-querybuilder_datetime.production.luxon.mjs +1 -1
  85. package/dist/react-querybuilder_datetime.production.luxon.mjs.map +1 -1
  86. package/dist/react-querybuilder_datetime.production.mjs +1 -2
  87. package/dist/react-querybuilder_datetime.production.mjs.map +1 -1
  88. package/dist/types-CDEkL2M_.d.mts +1694 -0
  89. package/dist/types-EgfSemtR.d.ts +1694 -0
  90. package/package.json +24 -24
  91. package/dist/chunk-SLTJVKUE.mjs +0 -7
  92. package/dist/chunk-SLTJVKUE.mjs.map +0 -1
  93. package/dist/chunk-ZLH5EH6W.mjs +0 -713
  94. package/dist/chunk-ZLH5EH6W.mjs.map +0 -1
  95. package/dist/chunk-ZS6AX35I.js +0 -738
  96. package/dist/chunk-ZS6AX35I.js.map +0 -1
  97. package/dist/types/QueryBuilderDateTime.d.ts +0 -4
  98. package/dist/types/datetimeRuleProcessorJsonLogic.d.ts +0 -10
  99. package/dist/types/getDatetimeJsonLogicOperations.d.ts +0 -6
  100. package/dist/types/getDatetimeRuleProcessorCEL.d.ts +0 -7
  101. package/dist/types/getDatetimeRuleProcessorJSONata.d.ts +0 -7
  102. package/dist/types/getDatetimeRuleProcessorMongoDBQuery.d.ts +0 -7
  103. package/dist/types/getDatetimeRuleProcessorNL.d.ts +0 -13
  104. package/dist/types/getDatetimeRuleProcessorSQL.d.ts +0 -32
  105. package/dist/types/index.d.ts +0 -8
  106. package/dist/types/index.date-fns.d.ts +0 -48
  107. package/dist/types/index.dayjs.d.ts +0 -48
  108. package/dist/types/index.jsdate.d.ts +0 -48
  109. package/dist/types/index.luxon.d.ts +0 -48
  110. package/dist/types/rqbDateTimeLibraryAPI.date-fns.d.ts +0 -5
  111. package/dist/types/rqbDateTimeLibraryAPI.dayjs.d.ts +0 -5
  112. package/dist/types/rqbDateTimeLibraryAPI.jsdate.d.ts +0 -8
  113. package/dist/types/rqbDateTimeLibraryAPI.luxon.d.ts +0 -5
  114. package/dist/types/types.d.ts +0 -111
  115. package/dist/types/utils.d.ts +0 -5
  116. package/dist/types-esm/QueryBuilderDateTime.d.mts +0 -4
  117. package/dist/types-esm/datetimeRuleProcessorJsonLogic.d.mts +0 -10
  118. package/dist/types-esm/getDatetimeJsonLogicOperations.d.mts +0 -6
  119. package/dist/types-esm/getDatetimeRuleProcessorCEL.d.mts +0 -7
  120. package/dist/types-esm/getDatetimeRuleProcessorJSONata.d.mts +0 -7
  121. package/dist/types-esm/getDatetimeRuleProcessorMongoDBQuery.d.mts +0 -7
  122. package/dist/types-esm/getDatetimeRuleProcessorNL.d.mts +0 -13
  123. package/dist/types-esm/getDatetimeRuleProcessorSQL.d.mts +0 -32
  124. package/dist/types-esm/index.d.mts +0 -8
  125. package/dist/types-esm/index.date-fns.d.mts +0 -48
  126. package/dist/types-esm/index.dayjs.d.mts +0 -48
  127. package/dist/types-esm/index.jsdate.d.mts +0 -48
  128. package/dist/types-esm/index.luxon.d.mts +0 -48
  129. package/dist/types-esm/rqbDateTimeLibraryAPI.date-fns.d.mts +0 -5
  130. package/dist/types-esm/rqbDateTimeLibraryAPI.dayjs.d.mts +0 -5
  131. package/dist/types-esm/rqbDateTimeLibraryAPI.jsdate.d.mts +0 -8
  132. package/dist/types-esm/rqbDateTimeLibraryAPI.luxon.d.mts +0 -5
  133. package/dist/types-esm/types.d.mts +0 -111
  134. package/dist/types-esm/utils.d.mts +0 -5
@@ -1,61 +1,76 @@
1
- import {
2
- getDatetimeJsonLogicOperations,
3
- getDatetimeRuleProcessorCEL,
4
- getDatetimeRuleProcessorMongoDBQuery,
5
- getDatetimeRuleProcessorNL,
6
- getDatetimeRuleProcessorSQL,
7
- getDatetimeValueProcessorANSI,
8
- getDatetimeValueProcessorMSSQL,
9
- getDatetimeValueProcessorMySQL,
10
- getDatetimeValueProcessorOracle,
11
- getDatetimeValueProcessorPostgreSQL,
12
- isISOStringDateOnly
13
- } from "./chunk-ZLH5EH6W.mjs";
1
+ import { getDatetimeJsonLogicOperations, getDatetimeRuleProcessorCEL, getDatetimeRuleProcessorMongoDBQuery, getDatetimeRuleProcessorNL, getDatetimeRuleProcessorSQL, getDatetimeValueProcessorANSI, getDatetimeValueProcessorMSSQL, getDatetimeValueProcessorMySQL, getDatetimeValueProcessorOracle, getDatetimeValueProcessorPostgreSQL, isISOStringDateOnly } from "./getDatetimeRuleProcessorSQL-KYRPP9qd.mjs";
2
+ import { format, isAfter, isBefore, isSameDay, isValid, parseISO, toDate } from "date-fns";
14
3
 
15
- // src/rqbDateTimeLibraryAPI.date-fns.ts
16
- import { toDate as dateFnsToDate, format as _format, isAfter, isBefore, isSameDay, isValid as _isValid, parseISO } from "date-fns";
17
- var toDate = function toDate2(a) {
18
- return typeof a === "string" ? parseISO(a) : dateFnsToDate(a);
4
+ //#region src/rqbDateTimeLibraryAPI.date-fns.ts
5
+ const toDate$1 = (a) => typeof a === "string" ? parseISO(a) : toDate(a);
6
+ const iso8601DateOnly = "yyyy-MM-dd";
7
+ /**
8
+ * {@link RQBDateTimeLibraryAPI} for date-fns
9
+ */
10
+ const rqbDateTimeLibraryAPI = {
11
+ format: (d, fmt) => format(toDate$1(d), fmt.replace("YYYY-MM-DD", iso8601DateOnly)),
12
+ isAfter,
13
+ isBefore,
14
+ isSame: (a, b) => {
15
+ const aToDate = toDate$1(a);
16
+ const bToDate = toDate$1(b);
17
+ return isISOStringDateOnly(a) || isISOStringDateOnly(b) ? isSameDay(aToDate, bToDate) : aToDate.getTime() === bToDate.getTime();
18
+ },
19
+ isValid: (d) => isValid(toDate$1(d)),
20
+ toDate: toDate$1,
21
+ toISOString: (d) => {
22
+ const dToDate = toDate$1(d);
23
+ return isValid(dToDate) ? dToDate.toISOString() : "";
24
+ },
25
+ toISOStringDateOnly: (d) => {
26
+ const dToDate = toDate$1(d);
27
+ return isValid(dToDate) ? format(dToDate, iso8601DateOnly) : "";
28
+ }
19
29
  };
20
- var iso8601DateOnly = "yyyy-MM-dd";
21
- var rqbDateTimeLibraryAPI = { format: function format(d, fmt) {
22
- return _format(toDate(d), fmt.replace("YYYY-MM-DD", iso8601DateOnly));
23
- }, isAfter, isBefore, isSame: function isSame(a, b) {
24
- var aToDate = toDate(a);
25
- var bToDate = toDate(b);
26
- return isISOStringDateOnly(a) || isISOStringDateOnly(b) ? isSameDay(aToDate, bToDate) : aToDate.getTime() === bToDate.getTime();
27
- }, isValid: function isValid(d) {
28
- return _isValid(toDate(d));
29
- }, toDate, toISOString: function toISOString(d) {
30
- var dToDate = toDate(d);
31
- return _isValid(dToDate) ? dToDate.toISOString() : "";
32
- }, toISOStringDateOnly: function toISOStringDateOnly(d) {
33
- var dToDate = toDate(d);
34
- return _isValid(dToDate) ? _format(dToDate, iso8601DateOnly) : "";
35
- } };
36
30
 
37
- // src/index.date-fns.ts
38
- var jsonLogicDateTimeOperations = getDatetimeJsonLogicOperations(rqbDateTimeLibraryAPI);
39
- var datetimeRuleProcessorSQL = getDatetimeRuleProcessorSQL(rqbDateTimeLibraryAPI);
40
- var datetimeValueProcessorANSI = getDatetimeValueProcessorANSI(rqbDateTimeLibraryAPI);
41
- var datetimeValueProcessorMSSQL = getDatetimeValueProcessorMSSQL(rqbDateTimeLibraryAPI);
42
- var datetimeValueProcessorMySQL = getDatetimeValueProcessorMySQL(rqbDateTimeLibraryAPI);
43
- var datetimeValueProcessorOracle = getDatetimeValueProcessorOracle(rqbDateTimeLibraryAPI);
44
- var datetimeValueProcessorPostgreSQL = getDatetimeValueProcessorPostgreSQL(rqbDateTimeLibraryAPI);
45
- var datetimeRuleProcessorCEL = getDatetimeRuleProcessorCEL(rqbDateTimeLibraryAPI);
46
- var datetimeRuleProcessorMongoDBQuery = getDatetimeRuleProcessorMongoDBQuery(rqbDateTimeLibraryAPI);
47
- var datetimeRuleProcessorNL = getDatetimeRuleProcessorNL(rqbDateTimeLibraryAPI);
48
- export {
49
- datetimeRuleProcessorCEL,
50
- datetimeRuleProcessorMongoDBQuery,
51
- datetimeRuleProcessorNL,
52
- datetimeRuleProcessorSQL,
53
- datetimeValueProcessorANSI,
54
- datetimeValueProcessorMSSQL,
55
- datetimeValueProcessorMySQL,
56
- datetimeValueProcessorOracle,
57
- datetimeValueProcessorPostgreSQL,
58
- jsonLogicDateTimeOperations,
59
- rqbDateTimeLibraryAPI
60
- };
31
+ //#endregion
32
+ //#region src/index.date-fns.ts
33
+ /**
34
+ * Custom JsonLogic date/time operations using date-fns
35
+ */
36
+ const jsonLogicDateTimeOperations = getDatetimeJsonLogicOperations(rqbDateTimeLibraryAPI);
37
+ /**
38
+ * {@link @react-querybuilder/core!formatQuery formatQuery} rule processor for "sql" format using date-fns
39
+ */
40
+ const datetimeRuleProcessorSQL = getDatetimeRuleProcessorSQL(rqbDateTimeLibraryAPI);
41
+ /**
42
+ * {@link @react-querybuilder/core!formatQuery formatQuery} value processor for "sql" format ("ansi" preset) using date-fns
43
+ */
44
+ const datetimeValueProcessorANSI = getDatetimeValueProcessorANSI(rqbDateTimeLibraryAPI);
45
+ /**
46
+ * {@link @react-querybuilder/core!formatQuery formatQuery} value processor for "sql" format ("mssql" preset) using date-fns
47
+ */
48
+ const datetimeValueProcessorMSSQL = getDatetimeValueProcessorMSSQL(rqbDateTimeLibraryAPI);
49
+ /**
50
+ * {@link @react-querybuilder/core!formatQuery formatQuery} value processor for "sql" format ("mysql" preset) using date-fns
51
+ */
52
+ const datetimeValueProcessorMySQL = getDatetimeValueProcessorMySQL(rqbDateTimeLibraryAPI);
53
+ /**
54
+ * {@link @react-querybuilder/core!formatQuery formatQuery} value processor for "sql" format ("oracle" preset) using date-fns
55
+ */
56
+ const datetimeValueProcessorOracle = getDatetimeValueProcessorOracle(rqbDateTimeLibraryAPI);
57
+ /**
58
+ * {@link @react-querybuilder/core!formatQuery formatQuery} value processor for "sql" format ("postgresql" preset) using date-fns
59
+ */
60
+ const datetimeValueProcessorPostgreSQL = getDatetimeValueProcessorPostgreSQL(rqbDateTimeLibraryAPI);
61
+ /**
62
+ * {@link @react-querybuilder/core!formatQuery formatQuery} rule processor for "cel" format using date-fns
63
+ */
64
+ const datetimeRuleProcessorCEL = getDatetimeRuleProcessorCEL(rqbDateTimeLibraryAPI);
65
+ /**
66
+ * {@link @react-querybuilder/core!formatQuery formatQuery} rule processor for "mongodb_query" format using date-fns
67
+ */
68
+ const datetimeRuleProcessorMongoDBQuery = getDatetimeRuleProcessorMongoDBQuery(rqbDateTimeLibraryAPI);
69
+ /**
70
+ * {@link @react-querybuilder/core!formatQuery formatQuery} rule processor for "natural_language" format using date-fns
71
+ */
72
+ const datetimeRuleProcessorNL = getDatetimeRuleProcessorNL(rqbDateTimeLibraryAPI);
73
+
74
+ //#endregion
75
+ export { datetimeRuleProcessorCEL, datetimeRuleProcessorMongoDBQuery, datetimeRuleProcessorNL, datetimeRuleProcessorSQL, datetimeValueProcessorANSI, datetimeValueProcessorMSSQL, datetimeValueProcessorMySQL, datetimeValueProcessorOracle, datetimeValueProcessorPostgreSQL, jsonLogicDateTimeOperations, rqbDateTimeLibraryAPI };
61
76
  //# sourceMappingURL=react-querybuilder_datetime.date-fns.mjs.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/rqbDateTimeLibraryAPI.date-fns.ts","../src/index.date-fns.ts"],"sourcesContent":["import{toDate as dateFnsToDate,format as _format,isAfter,isBefore,isSameDay,isValid as _isValid,parseISO}from\"date-fns\";import{isISOStringDateOnly}from\"./utils\";var toDate=function toDate(a){return typeof a===\"string\"?parseISO(a):dateFnsToDate(a);};var iso8601DateOnly=\"yyyy-MM-dd\";export var rqbDateTimeLibraryAPI={format:function format(d,fmt){return _format(toDate(d),fmt.replace(\"YYYY-MM-DD\",iso8601DateOnly));},isAfter:isAfter,isBefore:isBefore,isSame:function isSame(a,b){var aToDate=toDate(a);var bToDate=toDate(b);return isISOStringDateOnly(a)||isISOStringDateOnly(b)?isSameDay(aToDate,bToDate):aToDate.getTime()===bToDate.getTime();},isValid:function isValid(d){return _isValid(toDate(d));},toDate:toDate,toISOString:function toISOString(d){var dToDate=toDate(d);return _isValid(dToDate)?dToDate.toISOString():\"\";},toISOStringDateOnly:function toISOStringDateOnly(d){var dToDate=toDate(d);return _isValid(dToDate)?_format(dToDate,iso8601DateOnly):\"\";}};","import{getDatetimeJsonLogicOperations}from\"./getDatetimeJsonLogicOperations\";import{getDatetimeRuleProcessorCEL}from\"./getDatetimeRuleProcessorCEL\";import{getDatetimeRuleProcessorMongoDBQuery}from\"./getDatetimeRuleProcessorMongoDBQuery\";import{getDatetimeRuleProcessorNL}from\"./getDatetimeRuleProcessorNL\";import{getDatetimeRuleProcessorSQL,getDatetimeValueProcessorANSI,getDatetimeValueProcessorMSSQL,getDatetimeValueProcessorMySQL,getDatetimeValueProcessorOracle,getDatetimeValueProcessorPostgreSQL}from\"./getDatetimeRuleProcessorSQL\";import{rqbDateTimeLibraryAPI}from\"./rqbDateTimeLibraryAPI.date-fns\";export var jsonLogicDateTimeOperations=getDatetimeJsonLogicOperations(rqbDateTimeLibraryAPI);export var datetimeRuleProcessorSQL=getDatetimeRuleProcessorSQL(rqbDateTimeLibraryAPI);export var datetimeValueProcessorANSI=getDatetimeValueProcessorANSI(rqbDateTimeLibraryAPI);export var datetimeValueProcessorMSSQL=getDatetimeValueProcessorMSSQL(rqbDateTimeLibraryAPI);export var datetimeValueProcessorMySQL=getDatetimeValueProcessorMySQL(rqbDateTimeLibraryAPI);export var datetimeValueProcessorOracle=getDatetimeValueProcessorOracle(rqbDateTimeLibraryAPI);export var datetimeValueProcessorPostgreSQL=getDatetimeValueProcessorPostgreSQL(rqbDateTimeLibraryAPI);export var datetimeRuleProcessorCEL=getDatetimeRuleProcessorCEL(rqbDateTimeLibraryAPI);export var datetimeRuleProcessorMongoDBQuery=getDatetimeRuleProcessorMongoDBQuery(rqbDateTimeLibraryAPI);export var datetimeRuleProcessorNL=getDatetimeRuleProcessorNL(rqbDateTimeLibraryAPI);export*from\"./rqbDateTimeLibraryAPI.date-fns\";"],"mappings":";;;;;;;;;;;;;;;AAAA,SAAO,UAAU,eAAc,UAAU,SAAQ,SAAQ,UAAS,WAAU,WAAW,UAAS,gBAAa;AAAoD,IAAI,SAAO,SAASA,QAAO,GAAE;AAAC,SAAO,OAAO,MAAI,WAAS,SAAS,CAAC,IAAE,cAAc,CAAC;AAAE;AAAE,IAAI,kBAAgB;AAAoB,IAAI,wBAAsB,EAAC,QAAO,SAAS,OAAO,GAAE,KAAI;AAAC,SAAO,QAAQ,OAAO,CAAC,GAAE,IAAI,QAAQ,cAAa,eAAe,CAAC;AAAE,GAAE,SAAgB,UAAkB,QAAO,SAAS,OAAO,GAAE,GAAE;AAAC,MAAI,UAAQ,OAAO,CAAC;AAAE,MAAI,UAAQ,OAAO,CAAC;AAAE,SAAO,oBAAoB,CAAC,KAAG,oBAAoB,CAAC,IAAE,UAAU,SAAQ,OAAO,IAAE,QAAQ,QAAQ,MAAI,QAAQ,QAAQ;AAAE,GAAE,SAAQ,SAAS,QAAQ,GAAE;AAAC,SAAO,SAAS,OAAO,CAAC,CAAC;AAAE,GAAE,QAAc,aAAY,SAAS,YAAY,GAAE;AAAC,MAAI,UAAQ,OAAO,CAAC;AAAE,SAAO,SAAS,OAAO,IAAE,QAAQ,YAAY,IAAE;AAAG,GAAE,qBAAoB,SAAS,oBAAoB,GAAE;AAAC,MAAI,UAAQ,OAAO,CAAC;AAAE,SAAO,SAAS,OAAO,IAAE,QAAQ,SAAQ,eAAe,IAAE;AAAG,EAAC;;;ACA5V,IAAI,8BAA4B,+BAA+B,qBAAqB;AAAS,IAAI,2BAAyB,4BAA4B,qBAAqB;AAAS,IAAI,6BAA2B,8BAA8B,qBAAqB;AAAS,IAAI,8BAA4B,+BAA+B,qBAAqB;AAAS,IAAI,8BAA4B,+BAA+B,qBAAqB;AAAS,IAAI,+BAA6B,gCAAgC,qBAAqB;AAAS,IAAI,mCAAiC,oCAAoC,qBAAqB;AAAS,IAAI,2BAAyB,4BAA4B,qBAAqB;AAAS,IAAI,oCAAkC,qCAAqC,qBAAqB;AAAS,IAAI,0BAAwB,2BAA2B,qBAAqB;","names":["toDate"]}
1
+ {"version":3,"file":"react-querybuilder_datetime.date-fns.mjs","names":["toDate: typeof dateFnsToDate","dateFnsToDate","rqbDateTimeLibraryAPI: RQBDateTimeLibraryAPI","toDate","jsonLogicDateTimeOperations: RQBJsonLogicDateTimeOperations","datetimeRuleProcessorSQL: RuleProcessor","datetimeValueProcessorANSI: ValueProcessorByRule","datetimeValueProcessorMSSQL: ValueProcessorByRule","datetimeValueProcessorMySQL: ValueProcessorByRule","datetimeValueProcessorOracle: ValueProcessorByRule","datetimeValueProcessorPostgreSQL: ValueProcessorByRule","datetimeRuleProcessorCEL: ValueProcessorByRule","datetimeRuleProcessorMongoDBQuery: ValueProcessorByRule","datetimeRuleProcessorNL: ValueProcessorByRule"],"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":";;;;AAYA,MAAMA,YAA+B,MAAM,OAAO,MAAM,WAAW,SAAS,EAAE,GAAGC,OAAc,EAAE;AACjG,MAAM,kBAAkB;;;;AAKxB,MAAaC,wBAA+C;CAC1D,SAAS,GAAG,QAAQ,OAAOC,SAAO,EAAE,EAAE,IAAI,QAAQ,cAAc,gBAAgB,CAAC;CACjF;CACA;CACA,SAAS,GAAG,MAAM;EAChB,MAAM,UAAUA,SAAO,EAAE;EACzB,MAAM,UAAUA,SAAO,EAAE;AACzB,SAAO,oBAAoB,EAAE,IAAI,oBAAoB,EAAE,GACnD,UAAU,SAAS,QAAQ,GAC3B,QAAQ,SAAS,KAAK,QAAQ,SAAS;;CAE7C,UAAS,MAAK,QAAQA,SAAO,EAAE,CAAC;CAChC;CACA,cAAa,MAAK;EAChB,MAAM,UAAUA,SAAO,EAAE;AACzB,SAAO,QAAQ,QAAQ,GAAG,QAAQ,aAAa,GAAG;;CAEpD,sBAAqB,MAAK;EACxB,MAAM,UAAUA,SAAO,EAAE;AACzB,SAAO,QAAQ,QAAQ,GAAG,OAAO,SAAS,gBAAgB,GAAG;;CAEhE;;;;;;;ACdD,MAAaC,8BACX,+BAA+B,sBAAsB;;;;AAKvD,MAAaC,2BACX,4BAA4B,sBAAsB;;;;AAIpD,MAAaC,6BACX,8BAA8B,sBAAsB;;;;AAItD,MAAaC,8BACX,+BAA+B,sBAAsB;;;;AAIvD,MAAaC,8BACX,+BAA+B,sBAAsB;;;;AAIvD,MAAaC,+BACX,gCAAgC,sBAAsB;;;;AAIxD,MAAaC,mCACX,oCAAoC,sBAAsB;;;;AAK5D,MAAaC,2BACX,4BAA4B,sBAAsB;;;;AAKpD,MAAaC,oCACX,qCAAqC,sBAAsB;;;;AAK7D,MAAaC,0BACX,2BAA2B,sBAAsB"}
@@ -0,0 +1,53 @@
1
+ import { RQBDateTimeLibraryAPI, RQBJsonLogicDateTimeOperations, RuleProcessor, ValueProcessorByRule } from "./types-CDEkL2M_.mjs";
2
+
3
+ //#region src/rqbDateTimeLibraryAPI.dayjs.d.ts
4
+
5
+ /**
6
+ * {@link RQBDateTimeLibraryAPI} for Day.js
7
+ */
8
+ declare const rqbDateTimeLibraryAPI: RQBDateTimeLibraryAPI;
9
+ //#endregion
10
+ //#region src/index.dayjs.d.ts
11
+ /**
12
+ * Custom JsonLogic date/time operations using Day.js
13
+ */
14
+ declare const jsonLogicDateTimeOperations: RQBJsonLogicDateTimeOperations;
15
+ /**
16
+ * {@link @react-querybuilder/core!formatQuery formatQuery} rule processor for "sql" format using Day.js
17
+ */
18
+ declare const datetimeRuleProcessorSQL: RuleProcessor;
19
+ /**
20
+ * {@link @react-querybuilder/core!formatQuery formatQuery} value processor for "sql" format ("ansi" preset) using Day.js
21
+ */
22
+ declare const datetimeValueProcessorANSI: ValueProcessorByRule;
23
+ /**
24
+ * {@link @react-querybuilder/core!formatQuery formatQuery} value processor for "sql" format ("mssql" preset) using Day.js
25
+ */
26
+ declare const datetimeValueProcessorMSSQL: ValueProcessorByRule;
27
+ /**
28
+ * {@link @react-querybuilder/core!formatQuery formatQuery} value processor for "sql" format ("mysql" preset) using Day.js
29
+ */
30
+ declare const datetimeValueProcessorMySQL: ValueProcessorByRule;
31
+ /**
32
+ * {@link @react-querybuilder/core!formatQuery formatQuery} value processor for "sql" format ("oracle" preset) using Day.js
33
+ */
34
+ declare const datetimeValueProcessorOracle: ValueProcessorByRule;
35
+ /**
36
+ * {@link @react-querybuilder/core!formatQuery formatQuery} value processor for "sql" format ("postgresql" preset) using Day.js
37
+ */
38
+ declare const datetimeValueProcessorPostgreSQL: ValueProcessorByRule;
39
+ /**
40
+ * {@link @react-querybuilder/core!formatQuery formatQuery} rule processor for "cel" format using Day.js
41
+ */
42
+ declare const datetimeRuleProcessorCEL: ValueProcessorByRule;
43
+ /**
44
+ * {@link @react-querybuilder/core!formatQuery formatQuery} rule processor for "mongodb_query" format using Day.js
45
+ */
46
+ declare const datetimeRuleProcessorMongoDBQuery: ValueProcessorByRule;
47
+ /**
48
+ * {@link @react-querybuilder/core!formatQuery formatQuery} rule processor for "natural_language" format using Day.js
49
+ */
50
+ declare const datetimeRuleProcessorNL: ValueProcessorByRule;
51
+ //#endregion
52
+ export { datetimeRuleProcessorCEL, datetimeRuleProcessorMongoDBQuery, datetimeRuleProcessorNL, datetimeRuleProcessorSQL, datetimeValueProcessorANSI, datetimeValueProcessorMSSQL, datetimeValueProcessorMySQL, datetimeValueProcessorOracle, datetimeValueProcessorPostgreSQL, jsonLogicDateTimeOperations, rqbDateTimeLibraryAPI };
53
+ //# sourceMappingURL=react-querybuilder_datetime.dayjs.d.mts.map
@@ -1,61 +1,70 @@
1
- import {
2
- getDatetimeJsonLogicOperations,
3
- getDatetimeRuleProcessorCEL,
4
- getDatetimeRuleProcessorMongoDBQuery,
5
- getDatetimeRuleProcessorNL,
6
- getDatetimeRuleProcessorSQL,
7
- getDatetimeValueProcessorANSI,
8
- getDatetimeValueProcessorMSSQL,
9
- getDatetimeValueProcessorMySQL,
10
- getDatetimeValueProcessorOracle,
11
- getDatetimeValueProcessorPostgreSQL,
12
- isISOStringDateOnly
13
- } from "./chunk-ZLH5EH6W.mjs";
14
-
15
- // src/rqbDateTimeLibraryAPI.dayjs.ts
1
+ import { getDatetimeJsonLogicOperations, getDatetimeRuleProcessorCEL, getDatetimeRuleProcessorMongoDBQuery, getDatetimeRuleProcessorNL, getDatetimeRuleProcessorSQL, getDatetimeValueProcessorANSI, getDatetimeValueProcessorMSSQL, getDatetimeValueProcessorMySQL, getDatetimeValueProcessorOracle, getDatetimeValueProcessorPostgreSQL, isISOStringDateOnly } from "./getDatetimeRuleProcessorSQL-KYRPP9qd.mjs";
16
2
  import dayjs from "dayjs";
17
- var rqbDateTimeLibraryAPI = { format: function format(d, fmt) {
18
- return dayjs(d).format(fmt);
19
- }, isAfter: function isAfter(a, b) {
20
- return dayjs(a).isAfter(b);
21
- }, isBefore: function isBefore(a, b) {
22
- return dayjs(a).isBefore(b);
23
- }, isSame: function isSame(a, b) {
24
- return dayjs(a).isSame(b, isISOStringDateOnly(a) || isISOStringDateOnly(b) ? "d" : "ms");
25
- }, isValid: function isValid(d) {
26
- return dayjs(d).isValid();
27
- }, toDate: function toDate(d) {
28
- return dayjs(d).toDate();
29
- }, toISOString: function toISOString(d) {
30
- var dToDate = dayjs(d);
31
- return dToDate.isValid() ? dToDate.toISOString() : "";
32
- }, toISOStringDateOnly: function toISOStringDateOnly(d) {
33
- var dToDate = dayjs(d);
34
- return dToDate.isValid() ? dToDate.format("YYYY-MM-DD") : "";
35
- } };
36
3
 
37
- // src/index.dayjs.ts
38
- var jsonLogicDateTimeOperations = getDatetimeJsonLogicOperations(rqbDateTimeLibraryAPI);
39
- var datetimeRuleProcessorSQL = getDatetimeRuleProcessorSQL(rqbDateTimeLibraryAPI);
40
- var datetimeValueProcessorANSI = getDatetimeValueProcessorANSI(rqbDateTimeLibraryAPI);
41
- var datetimeValueProcessorMSSQL = getDatetimeValueProcessorMSSQL(rqbDateTimeLibraryAPI);
42
- var datetimeValueProcessorMySQL = getDatetimeValueProcessorMySQL(rqbDateTimeLibraryAPI);
43
- var datetimeValueProcessorOracle = getDatetimeValueProcessorOracle(rqbDateTimeLibraryAPI);
44
- var datetimeValueProcessorPostgreSQL = getDatetimeValueProcessorPostgreSQL(rqbDateTimeLibraryAPI);
45
- var datetimeRuleProcessorCEL = getDatetimeRuleProcessorCEL(rqbDateTimeLibraryAPI);
46
- var datetimeRuleProcessorMongoDBQuery = getDatetimeRuleProcessorMongoDBQuery(rqbDateTimeLibraryAPI);
47
- var datetimeRuleProcessorNL = getDatetimeRuleProcessorNL(rqbDateTimeLibraryAPI);
48
- export {
49
- datetimeRuleProcessorCEL,
50
- datetimeRuleProcessorMongoDBQuery,
51
- datetimeRuleProcessorNL,
52
- datetimeRuleProcessorSQL,
53
- datetimeValueProcessorANSI,
54
- datetimeValueProcessorMSSQL,
55
- datetimeValueProcessorMySQL,
56
- datetimeValueProcessorOracle,
57
- datetimeValueProcessorPostgreSQL,
58
- jsonLogicDateTimeOperations,
59
- rqbDateTimeLibraryAPI
4
+ //#region src/rqbDateTimeLibraryAPI.dayjs.ts
5
+ /**
6
+ * {@link RQBDateTimeLibraryAPI} for Day.js
7
+ */
8
+ const rqbDateTimeLibraryAPI = {
9
+ format: (d, fmt) => dayjs(d).format(fmt),
10
+ isAfter: (a, b) => dayjs(a).isAfter(b),
11
+ isBefore: (a, b) => dayjs(a).isBefore(b),
12
+ isSame: (a, b) => dayjs(a).isSame(b, isISOStringDateOnly(a) || isISOStringDateOnly(b) ? "d" : "ms"),
13
+ isValid: (d) => dayjs(d).isValid(),
14
+ toDate: (d) => dayjs(d).toDate(),
15
+ toISOString: (d) => {
16
+ const dToDate = dayjs(d);
17
+ return dToDate.isValid() ? dToDate.toISOString() : "";
18
+ },
19
+ toISOStringDateOnly: (d) => {
20
+ const dToDate = dayjs(d);
21
+ return dToDate.isValid() ? dToDate.format("YYYY-MM-DD") : "";
22
+ }
60
23
  };
24
+
25
+ //#endregion
26
+ //#region src/index.dayjs.ts
27
+ /**
28
+ * Custom JsonLogic date/time operations using Day.js
29
+ */
30
+ const jsonLogicDateTimeOperations = getDatetimeJsonLogicOperations(rqbDateTimeLibraryAPI);
31
+ /**
32
+ * {@link @react-querybuilder/core!formatQuery formatQuery} rule processor for "sql" format using Day.js
33
+ */
34
+ const datetimeRuleProcessorSQL = getDatetimeRuleProcessorSQL(rqbDateTimeLibraryAPI);
35
+ /**
36
+ * {@link @react-querybuilder/core!formatQuery formatQuery} value processor for "sql" format ("ansi" preset) using Day.js
37
+ */
38
+ const datetimeValueProcessorANSI = getDatetimeValueProcessorANSI(rqbDateTimeLibraryAPI);
39
+ /**
40
+ * {@link @react-querybuilder/core!formatQuery formatQuery} value processor for "sql" format ("mssql" preset) using Day.js
41
+ */
42
+ const datetimeValueProcessorMSSQL = getDatetimeValueProcessorMSSQL(rqbDateTimeLibraryAPI);
43
+ /**
44
+ * {@link @react-querybuilder/core!formatQuery formatQuery} value processor for "sql" format ("mysql" preset) using Day.js
45
+ */
46
+ const datetimeValueProcessorMySQL = getDatetimeValueProcessorMySQL(rqbDateTimeLibraryAPI);
47
+ /**
48
+ * {@link @react-querybuilder/core!formatQuery formatQuery} value processor for "sql" format ("oracle" preset) using Day.js
49
+ */
50
+ const datetimeValueProcessorOracle = getDatetimeValueProcessorOracle(rqbDateTimeLibraryAPI);
51
+ /**
52
+ * {@link @react-querybuilder/core!formatQuery formatQuery} value processor for "sql" format ("postgresql" preset) using Day.js
53
+ */
54
+ const datetimeValueProcessorPostgreSQL = getDatetimeValueProcessorPostgreSQL(rqbDateTimeLibraryAPI);
55
+ /**
56
+ * {@link @react-querybuilder/core!formatQuery formatQuery} rule processor for "cel" format using Day.js
57
+ */
58
+ const datetimeRuleProcessorCEL = getDatetimeRuleProcessorCEL(rqbDateTimeLibraryAPI);
59
+ /**
60
+ * {@link @react-querybuilder/core!formatQuery formatQuery} rule processor for "mongodb_query" format using Day.js
61
+ */
62
+ const datetimeRuleProcessorMongoDBQuery = getDatetimeRuleProcessorMongoDBQuery(rqbDateTimeLibraryAPI);
63
+ /**
64
+ * {@link @react-querybuilder/core!formatQuery formatQuery} rule processor for "natural_language" format using Day.js
65
+ */
66
+ const datetimeRuleProcessorNL = getDatetimeRuleProcessorNL(rqbDateTimeLibraryAPI);
67
+
68
+ //#endregion
69
+ export { datetimeRuleProcessorCEL, datetimeRuleProcessorMongoDBQuery, datetimeRuleProcessorNL, datetimeRuleProcessorSQL, datetimeValueProcessorANSI, datetimeValueProcessorMSSQL, datetimeValueProcessorMySQL, datetimeValueProcessorOracle, datetimeValueProcessorPostgreSQL, jsonLogicDateTimeOperations, rqbDateTimeLibraryAPI };
61
70
  //# sourceMappingURL=react-querybuilder_datetime.dayjs.mjs.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/rqbDateTimeLibraryAPI.dayjs.ts","../src/index.dayjs.ts"],"sourcesContent":["import dayjs from\"dayjs\";import{isISOStringDateOnly}from\"./utils\";export var rqbDateTimeLibraryAPI={format:function format(d,fmt){return dayjs(d).format(fmt);},isAfter:function isAfter(a,b){return dayjs(a).isAfter(b);},isBefore:function isBefore(a,b){return dayjs(a).isBefore(b);},isSame:function isSame(a,b){return dayjs(a).isSame(b,isISOStringDateOnly(a)||isISOStringDateOnly(b)?\"d\":\"ms\");},isValid:function isValid(d){return dayjs(d).isValid();},toDate:function toDate(d){return dayjs(d).toDate();},toISOString:function toISOString(d){var dToDate=dayjs(d);return dToDate.isValid()?dToDate.toISOString():\"\";},toISOStringDateOnly:function toISOStringDateOnly(d){var dToDate=dayjs(d);return dToDate.isValid()?dToDate.format(\"YYYY-MM-DD\"):\"\";}};","import{getDatetimeJsonLogicOperations}from\"./getDatetimeJsonLogicOperations\";import{getDatetimeRuleProcessorCEL}from\"./getDatetimeRuleProcessorCEL\";import{getDatetimeRuleProcessorMongoDBQuery}from\"./getDatetimeRuleProcessorMongoDBQuery\";import{getDatetimeRuleProcessorNL}from\"./getDatetimeRuleProcessorNL\";import{getDatetimeRuleProcessorSQL,getDatetimeValueProcessorANSI,getDatetimeValueProcessorMSSQL,getDatetimeValueProcessorMySQL,getDatetimeValueProcessorOracle,getDatetimeValueProcessorPostgreSQL}from\"./getDatetimeRuleProcessorSQL\";import{rqbDateTimeLibraryAPI}from\"./rqbDateTimeLibraryAPI.dayjs\";export var jsonLogicDateTimeOperations=getDatetimeJsonLogicOperations(rqbDateTimeLibraryAPI);export var datetimeRuleProcessorSQL=getDatetimeRuleProcessorSQL(rqbDateTimeLibraryAPI);export var datetimeValueProcessorANSI=getDatetimeValueProcessorANSI(rqbDateTimeLibraryAPI);export var datetimeValueProcessorMSSQL=getDatetimeValueProcessorMSSQL(rqbDateTimeLibraryAPI);export var datetimeValueProcessorMySQL=getDatetimeValueProcessorMySQL(rqbDateTimeLibraryAPI);export var datetimeValueProcessorOracle=getDatetimeValueProcessorOracle(rqbDateTimeLibraryAPI);export var datetimeValueProcessorPostgreSQL=getDatetimeValueProcessorPostgreSQL(rqbDateTimeLibraryAPI);export var datetimeRuleProcessorCEL=getDatetimeRuleProcessorCEL(rqbDateTimeLibraryAPI);export var datetimeRuleProcessorMongoDBQuery=getDatetimeRuleProcessorMongoDBQuery(rqbDateTimeLibraryAPI);export var datetimeRuleProcessorNL=getDatetimeRuleProcessorNL(rqbDateTimeLibraryAPI);export*from\"./rqbDateTimeLibraryAPI.dayjs\";"],"mappings":";;;;;;;;;;;;;;;AAAA,OAAO,WAAU;AAAwD,IAAI,wBAAsB,EAAC,QAAO,SAAS,OAAO,GAAE,KAAI;AAAC,SAAO,MAAM,CAAC,EAAE,OAAO,GAAG;AAAE,GAAE,SAAQ,SAAS,QAAQ,GAAE,GAAE;AAAC,SAAO,MAAM,CAAC,EAAE,QAAQ,CAAC;AAAE,GAAE,UAAS,SAAS,SAAS,GAAE,GAAE;AAAC,SAAO,MAAM,CAAC,EAAE,SAAS,CAAC;AAAE,GAAE,QAAO,SAAS,OAAO,GAAE,GAAE;AAAC,SAAO,MAAM,CAAC,EAAE,OAAO,GAAE,oBAAoB,CAAC,KAAG,oBAAoB,CAAC,IAAE,MAAI,IAAI;AAAE,GAAE,SAAQ,SAAS,QAAQ,GAAE;AAAC,SAAO,MAAM,CAAC,EAAE,QAAQ;AAAE,GAAE,QAAO,SAAS,OAAO,GAAE;AAAC,SAAO,MAAM,CAAC,EAAE,OAAO;AAAE,GAAE,aAAY,SAAS,YAAY,GAAE;AAAC,MAAI,UAAQ,MAAM,CAAC;AAAE,SAAO,QAAQ,QAAQ,IAAE,QAAQ,YAAY,IAAE;AAAG,GAAE,qBAAoB,SAAS,oBAAoB,GAAE;AAAC,MAAI,UAAQ,MAAM,CAAC;AAAE,SAAO,QAAQ,QAAQ,IAAE,QAAQ,OAAO,YAAY,IAAE;AAAG,EAAC;;;ACArI,IAAI,8BAA4B,+BAA+B,qBAAqB;AAAS,IAAI,2BAAyB,4BAA4B,qBAAqB;AAAS,IAAI,6BAA2B,8BAA8B,qBAAqB;AAAS,IAAI,8BAA4B,+BAA+B,qBAAqB;AAAS,IAAI,8BAA4B,+BAA+B,qBAAqB;AAAS,IAAI,+BAA6B,gCAAgC,qBAAqB;AAAS,IAAI,mCAAiC,oCAAoC,qBAAqB;AAAS,IAAI,2BAAyB,4BAA4B,qBAAqB;AAAS,IAAI,oCAAkC,qCAAqC,qBAAqB;AAAS,IAAI,0BAAwB,2BAA2B,qBAAqB;","names":[]}
1
+ {"version":3,"file":"react-querybuilder_datetime.dayjs.mjs","names":["rqbDateTimeLibraryAPI: RQBDateTimeLibraryAPI","jsonLogicDateTimeOperations: RQBJsonLogicDateTimeOperations","datetimeRuleProcessorSQL: RuleProcessor","datetimeValueProcessorANSI: ValueProcessorByRule","datetimeValueProcessorMSSQL: ValueProcessorByRule","datetimeValueProcessorMySQL: ValueProcessorByRule","datetimeValueProcessorOracle: ValueProcessorByRule","datetimeValueProcessorPostgreSQL: ValueProcessorByRule","datetimeRuleProcessorCEL: ValueProcessorByRule","datetimeRuleProcessorMongoDBQuery: ValueProcessorByRule","datetimeRuleProcessorNL: ValueProcessorByRule"],"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":";;;;;;;AAOA,MAAaA,wBAA+C;CAC1D,SAAS,GAAG,QAAQ,MAAM,EAAE,CAAC,OAAO,IAAI;CACxC,UAAU,GAAG,MAAM,MAAM,EAAE,CAAC,QAAQ,EAAE;CACtC,WAAW,GAAG,MAAM,MAAM,EAAE,CAAC,SAAS,EAAE;CACxC,SAAS,GAAG,MACV,MAAM,EAAE,CAAC,OAAO,GAAG,oBAAoB,EAAE,IAAI,oBAAoB,EAAE,GAAG,MAAM,KAAK;CACnF,UAAS,MAAK,MAAM,EAAE,CAAC,SAAS;CAChC,SAAQ,MAAK,MAAM,EAAE,CAAC,QAAQ;CAC9B,cAAa,MAAK;EAChB,MAAM,UAAU,MAAM,EAAE;AACxB,SAAO,QAAQ,SAAS,GAAG,QAAQ,aAAa,GAAG;;CAErD,sBAAqB,MAAK;EACxB,MAAM,UAAU,MAAM,EAAE;AACxB,SAAO,QAAQ,SAAS,GAAG,QAAQ,OAAO,aAAa,GAAG;;CAE7D;;;;;;;ACED,MAAaC,8BACX,+BAA+B,sBAAsB;;;;AAKvD,MAAaC,2BACX,4BAA4B,sBAAsB;;;;AAIpD,MAAaC,6BACX,8BAA8B,sBAAsB;;;;AAItD,MAAaC,8BACX,+BAA+B,sBAAsB;;;;AAIvD,MAAaC,8BACX,+BAA+B,sBAAsB;;;;AAIvD,MAAaC,+BACX,gCAAgC,sBAAsB;;;;AAIxD,MAAaC,mCACX,oCAAoC,sBAAsB;;;;AAK5D,MAAaC,2BACX,4BAA4B,sBAAsB;;;;AAKpD,MAAaC,oCACX,qCAAqC,sBAAsB;;;;AAK7D,MAAaC,0BACX,2BAA2B,sBAAsB"}
@@ -0,0 +1,56 @@
1
+ import { RQBDateTimeLibraryAPI, RQBJsonLogicDateTimeOperations, RuleProcessor, ValueProcessorByRule } from "./types-CDEkL2M_.mjs";
2
+
3
+ //#region src/rqbDateTimeLibraryAPI.jsdate.d.ts
4
+
5
+ /**
6
+ * {@link RQBDateTimeLibraryAPI} for JavaScript `Date`
7
+ *
8
+ * @deprecated This API will not be removed, but we recommend using one of the other
9
+ * {@link RQBDateTimeLibraryAPI}s based on a popular library instead.
10
+ */
11
+ declare const rqbDateTimeLibraryAPI: RQBDateTimeLibraryAPI;
12
+ //#endregion
13
+ //#region src/index.jsdate.d.ts
14
+ /**
15
+ * Custom JsonLogic date/time operations using JavaScript `Date`.
16
+ */
17
+ declare const jsonLogicDateTimeOperations: RQBJsonLogicDateTimeOperations;
18
+ /**
19
+ * {@link @react-querybuilder/core!formatQuery formatQuery} rule processor for "sql" format using JavaScript `Date`
20
+ */
21
+ declare const datetimeRuleProcessorSQL: RuleProcessor;
22
+ /**
23
+ * {@link @react-querybuilder/core!formatQuery formatQuery} value processor for "sql" format ("ansi" preset) using JavaScript `Date`
24
+ */
25
+ declare const datetimeValueProcessorANSI: ValueProcessorByRule;
26
+ /**
27
+ * {@link @react-querybuilder/core!formatQuery formatQuery} value processor for "sql" format ("mssql" preset) using JavaScript `Date`
28
+ */
29
+ declare const datetimeValueProcessorMSSQL: ValueProcessorByRule;
30
+ /**
31
+ * {@link @react-querybuilder/core!formatQuery formatQuery} value processor for "sql" format ("mysql" preset) using JavaScript `Date`
32
+ */
33
+ declare const datetimeValueProcessorMySQL: ValueProcessorByRule;
34
+ /**
35
+ * {@link @react-querybuilder/core!formatQuery formatQuery} value processor for "sql" format ("oracle" preset) using JavaScript `Date`
36
+ */
37
+ declare const datetimeValueProcessorOracle: ValueProcessorByRule;
38
+ /**
39
+ * {@link @react-querybuilder/core!formatQuery formatQuery} value processor for "sql" format ("postgresql" preset) using JavaScript `Date`
40
+ */
41
+ declare const datetimeValueProcessorPostgreSQL: ValueProcessorByRule;
42
+ /**
43
+ * {@link @react-querybuilder/core!formatQuery formatQuery} rule processor for "cel" format using JavaScript `Date`
44
+ */
45
+ declare const datetimeRuleProcessorCEL: RuleProcessor;
46
+ /**
47
+ * {@link @react-querybuilder/core!formatQuery formatQuery} rule processor for "mongodb_query" format using JavaScript `Date`
48
+ */
49
+ declare const datetimeRuleProcessorMongoDBQuery: RuleProcessor;
50
+ /**
51
+ * {@link @react-querybuilder/core!formatQuery formatQuery} rule processor for "natural_language" format using JavaScript `Date`
52
+ */
53
+ declare const datetimeRuleProcessorNL: ValueProcessorByRule;
54
+ //#endregion
55
+ export { datetimeRuleProcessorCEL, datetimeRuleProcessorMongoDBQuery, datetimeRuleProcessorNL, datetimeRuleProcessorSQL, datetimeValueProcessorANSI, datetimeValueProcessorMSSQL, datetimeValueProcessorMySQL, datetimeValueProcessorOracle, datetimeValueProcessorPostgreSQL, jsonLogicDateTimeOperations, rqbDateTimeLibraryAPI };
56
+ //# sourceMappingURL=react-querybuilder_datetime.jsdate.d.mts.map