@fibery/expression-utils 9.7.2 → 10.0.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 (53) hide show
  1. package/lib/_virtual/_rolldown/runtime.js +13 -0
  2. package/lib/index.d.ts +191 -585
  3. package/lib/index.js +15 -50
  4. package/lib/src/context-variables.d.ts +27 -22
  5. package/lib/src/context-variables.js +106 -138
  6. package/lib/src/errors.d.ts +5 -2
  7. package/lib/src/errors.js +14 -14
  8. package/lib/src/field-expression-visitor-type-aware.d.ts +18 -16
  9. package/lib/src/field-expression-visitor-type-aware.js +116 -131
  10. package/lib/src/filter-expression/index.d.ts +12 -9
  11. package/lib/src/filter-expression/index.js +34 -47
  12. package/lib/src/filter-expression/operator-utils.d.ts +14 -11
  13. package/lib/src/filter-expression/operator-utils.js +191 -185
  14. package/lib/src/filter-expression/operators.d.ts +111 -106
  15. package/lib/src/filter-expression/operators.js +1130 -846
  16. package/lib/src/filter-expression/pattern-match-placeholders.d.ts +63 -61
  17. package/lib/src/filter-expression/pattern-match-placeholders.js +107 -138
  18. package/lib/src/filter-expression/pattern-match.d.ts +17 -15
  19. package/lib/src/filter-expression/pattern-match.js +118 -130
  20. package/lib/src/filter-expression/pattern-to-expression.d.ts +13 -11
  21. package/lib/src/filter-expression/pattern-to-expression.js +42 -45
  22. package/lib/src/filter-expression/types.d.ts +29 -26
  23. package/lib/src/filter-expression/types.js +0 -3
  24. package/lib/src/params-placeholders.d.ts +55 -51
  25. package/lib/src/params-placeholders.js +199 -192
  26. package/lib/src/tsfixme.d.ts +4 -1
  27. package/lib/src/tsfixme.js +0 -3
  28. package/lib/src/types.d.ts +47 -45
  29. package/lib/src/types.js +0 -3
  30. package/lib/src/utils.d.ts +53 -48
  31. package/lib/src/utils.js +276 -338
  32. package/lib/src/visitors.d.ts +43 -37
  33. package/lib/src/visitors.js +306 -365
  34. package/lib/test-data/schema-mock.d.ts +68 -751
  35. package/lib/test-data/schema-mock.js +175 -139
  36. package/package.json +17 -10
  37. package/lib/index.js.map +0 -1
  38. package/lib/src/context-variables.js.map +0 -1
  39. package/lib/src/errors.js.map +0 -1
  40. package/lib/src/field-expression-visitor-type-aware.js.map +0 -1
  41. package/lib/src/filter-expression/index.js.map +0 -1
  42. package/lib/src/filter-expression/operator-utils.js.map +0 -1
  43. package/lib/src/filter-expression/operators.js.map +0 -1
  44. package/lib/src/filter-expression/pattern-match-placeholders.js.map +0 -1
  45. package/lib/src/filter-expression/pattern-match.js.map +0 -1
  46. package/lib/src/filter-expression/pattern-to-expression.js.map +0 -1
  47. package/lib/src/filter-expression/types.js.map +0 -1
  48. package/lib/src/params-placeholders.js.map +0 -1
  49. package/lib/src/tsfixme.js.map +0 -1
  50. package/lib/src/types.js.map +0 -1
  51. package/lib/src/utils.js.map +0 -1
  52. package/lib/src/visitors.js.map +0 -1
  53. package/lib/test-data/schema-mock.js.map +0 -1
@@ -1,200 +1,206 @@
1
- "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
- Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.getWithinOperatorCustomMatchFn = exports.getWithinOperatorCustomConvertFn = exports.getCompareOperatorForDateTime = exports.isNoValue = exports.NO_VALUE = exports.isDateTime = void 0;
7
- const findKey_1 = __importDefault(require("lodash/findKey"));
8
- const isEqual_1 = __importDefault(require("lodash/isEqual"));
9
- const isString_1 = __importDefault(require("lodash/isString"));
10
- const params_placeholders_1 = require("../params-placeholders");
11
- const pattern_match_1 = require("./pattern-match");
12
- const pattern_match_placeholders_1 = require("./pattern-match-placeholders");
13
- const isoDateTimeSample = "2018-05-30T07:57:45.190Z";
14
- const isoDateSample = "2018-05-30";
15
- // we're considering date as date-time here because of field-convert
16
- // from date to date-time, it changes field type but not touches constants in query-params
17
- // so to keep filters and color-coding working we treat date as date-time here
18
- // and later moment.js parses date string as date-time
19
- const isDateTime = (dateString) => dateString.length === isoDateTimeSample.length || dateString.length === isoDateSample.length;
20
- exports.isDateTime = isDateTime;
21
- exports.NO_VALUE = undefined;
1
+ import { doPatternMatch } from "./pattern-match.js";
2
+ import { dateToDateTimeIntervalLookup, monthAgoDateParamPlaceholder, monthAgoStartDateTimeParamPlaceholder, monthFromNowDateParamPlaceholder, monthFromNowEndDateTimeParamPlaceholder, paramsPlaceholdersLookup, parseRelativeDatePlaceholder, toRelativeDatePlaceholder, todayDateParamPlaceholder, todayEndDateTimeParamPlaceholder, weekAgoDateParamPlaceholder, weekAgoStartDateTimeParamPlaceholder, weekFromNowDateParamPlaceholder, weekFromNowEndDateTimeParamPlaceholder, yearAgoDateParamPlaceholder, yearAgoStartDateTimeParamPlaceholder, yearFromNowDateParamPlaceholder, yearFromNowEndDateTimeParamPlaceholder } from "../params-placeholders.js";
3
+ import { dateTimeOrDateTimeRangeExpressionPlaceholder, getParamPlaceholder } from "./pattern-match-placeholders.js";
4
+ import { isRecord } from "@fibery/helpers/src/_";
5
+ import isString from "lodash/isString.js";
6
+ import findKey from "lodash/findKey.js";
7
+ import isEqual from "lodash/isEqual.js";
8
+ //#region src/filter-expression/operator-utils.ts
9
+ const isDateTime = (dateString) => dateString.length === 24 || dateString.length === 10;
10
+ const NO_VALUE = void 0;
22
11
  const isNoValue = (value) => {
23
- if (typeof value === "object" && value !== null && "withinRangeStart" in value && "withinRangeEnd" in value) {
24
- return value.withinRangeStart === exports.NO_VALUE && value.withinRangeEnd === exports.NO_VALUE;
25
- }
26
- return value === exports.NO_VALUE;
12
+ if (isRecord(value) && "withinRangeStart" in value && "withinRangeEnd" in value) return value.withinRangeStart === void 0 && value.withinRangeEnd === void 0;
13
+ return value === void 0;
27
14
  };
28
- exports.isNoValue = isNoValue;
29
15
  const getCompareOperatorForDateTime = (id, title, operator, compareByStartInterval, isNegative) => ({
30
- id,
31
- title,
32
- customMatch: (where, params, typeObject) => {
33
- const { matchSuccess, matches: [fieldMatch, paramMatch], } = (0, pattern_match_1.doPatternMatch)(where, params, [
34
- operator,
35
- pattern_match_placeholders_1.dateTimeOrDateTimeRangeExpressionPlaceholder,
36
- (0, pattern_match_placeholders_1.getParamPlaceholder)((x) => {
37
- return (((0, isString_1.default)(x) && Boolean(params_placeholders_1.paramsPlaceholdersLookup[x])) ||
38
- ((0, isString_1.default)(x) && (0, exports.isDateTime)(x)) ||
39
- Boolean((0, params_placeholders_1.parseRelativeDatePlaceholder)(x)) ||
40
- (0, exports.isNoValue)(x));
41
- }),
42
- ], typeObject);
43
- if (matchSuccess) {
44
- const paramValue = paramMatch.value;
45
- const relativeDateInfo = (0, params_placeholders_1.parseRelativeDatePlaceholder)(paramValue);
46
- if (relativeDateInfo && relativeDateInfo.isStartOfInterval === compareByStartInterval) {
47
- const value = (0, params_placeholders_1.toRelativeDatePlaceholder)({ ...relativeDateInfo, isStartOfInterval: undefined });
48
- return {
49
- matchSuccess,
50
- expression: fieldMatch.value,
51
- value,
52
- };
53
- }
54
- else if (params_placeholders_1.paramsPlaceholdersLookup[paramValue]) {
55
- const value = (0, findKey_1.default)(params_placeholders_1.dateToDateTimeIntervalLookup, (val) => compareByStartInterval ? val.start === paramValue : val.end === paramValue);
56
- return {
57
- matchSuccess,
58
- expression: fieldMatch.value,
59
- value,
60
- };
61
- }
62
- else {
63
- return {
64
- matchSuccess,
65
- expression: fieldMatch.value,
66
- value: paramValue,
67
- };
68
- }
69
- }
70
- return { matchSuccess: false };
71
- },
72
- customConvertToWhereExpression: (expression, value, getNextParamName) => {
73
- const dateTimePlaceholders = params_placeholders_1.dateToDateTimeIntervalLookup[value];
74
- let relativeDateInfo = null;
75
- if (dateTimePlaceholders) {
76
- const { start, end } = dateTimePlaceholders;
77
- const intervalParamName = compareByStartInterval ? start : end;
78
- return {
79
- expression: [operator, expression, intervalParamName],
80
- params: { [intervalParamName]: intervalParamName },
81
- };
82
- }
83
- else if ((relativeDateInfo = (0, params_placeholders_1.parseRelativeDatePlaceholder)(value))) {
84
- const paramName = (0, params_placeholders_1.toRelativeDatePlaceholder)({
85
- ...relativeDateInfo,
86
- isStartOfInterval: compareByStartInterval,
87
- unitForStart: "day",
88
- });
89
- return {
90
- expression: [operator, expression, paramName],
91
- params: { [paramName]: paramName },
92
- };
93
- }
94
- else {
95
- const dateParamName = getNextParamName();
96
- return {
97
- expression: [operator, expression, dateParamName],
98
- params: { [dateParamName]: value },
99
- };
100
- }
101
- },
102
- type: ":operator-type/binary",
103
- isNegative,
16
+ id,
17
+ title,
18
+ customMatch: (where, params, typeObject) => {
19
+ const { matchSuccess, matches: [fieldMatch, paramMatch] } = doPatternMatch(where, params, [
20
+ operator,
21
+ dateTimeOrDateTimeRangeExpressionPlaceholder,
22
+ getParamPlaceholder((x) => {
23
+ return isString(x) && Boolean(paramsPlaceholdersLookup[x]) || isString(x) && isDateTime(x) || Boolean(parseRelativeDatePlaceholder(x)) || isNoValue(x);
24
+ })
25
+ ], typeObject);
26
+ if (matchSuccess) {
27
+ const paramValue = paramMatch.value;
28
+ const relativeDateInfo = parseRelativeDatePlaceholder(paramValue);
29
+ if (relativeDateInfo && relativeDateInfo.isStartOfInterval === compareByStartInterval) {
30
+ const value = toRelativeDatePlaceholder({
31
+ ...relativeDateInfo,
32
+ isStartOfInterval: void 0
33
+ });
34
+ return {
35
+ matchSuccess,
36
+ expression: fieldMatch.value,
37
+ value
38
+ };
39
+ } else if (paramsPlaceholdersLookup[paramValue]) {
40
+ const value = findKey(dateToDateTimeIntervalLookup, (val) => compareByStartInterval ? val.start === paramValue : val.end === paramValue);
41
+ return {
42
+ matchSuccess,
43
+ expression: fieldMatch.value,
44
+ value
45
+ };
46
+ } else return {
47
+ matchSuccess,
48
+ expression: fieldMatch.value,
49
+ value: paramValue
50
+ };
51
+ }
52
+ return { matchSuccess: false };
53
+ },
54
+ customConvertToWhereExpression: (expression, value, getNextParamName) => {
55
+ const dateTimePlaceholders = dateToDateTimeIntervalLookup[value];
56
+ let relativeDateInfo = null;
57
+ if (dateTimePlaceholders) {
58
+ const { start, end } = dateTimePlaceholders;
59
+ const intervalParamName = compareByStartInterval ? start : end;
60
+ return {
61
+ expression: [
62
+ operator,
63
+ expression,
64
+ intervalParamName
65
+ ],
66
+ params: { [intervalParamName]: intervalParamName }
67
+ };
68
+ } else if (relativeDateInfo = parseRelativeDatePlaceholder(value)) {
69
+ const paramName = toRelativeDatePlaceholder({
70
+ ...relativeDateInfo,
71
+ isStartOfInterval: compareByStartInterval,
72
+ unitForStart: "day"
73
+ });
74
+ return {
75
+ expression: [
76
+ operator,
77
+ expression,
78
+ paramName
79
+ ],
80
+ params: { [paramName]: paramName }
81
+ };
82
+ } else {
83
+ const dateParamName = getNextParamName();
84
+ return {
85
+ expression: [
86
+ operator,
87
+ expression,
88
+ dateParamName
89
+ ],
90
+ params: { [dateParamName]: value }
91
+ };
92
+ }
93
+ },
94
+ type: ":operator-type/binary",
95
+ isNegative
104
96
  });
105
- exports.getCompareOperatorForDateTime = getCompareOperatorForDateTime;
106
- const getWithinRangeParam = ({ withinRangeValue, getNextParamName, }) => {
107
- // check that it's a relative date.
108
- const withinRangeDateInfo = (0, params_placeholders_1.parseRelativeDatePlaceholder)(withinRangeValue);
109
- if (withinRangeDateInfo) {
110
- return { key: withinRangeValue, value: withinRangeValue };
111
- }
112
- else {
113
- return { key: getNextParamName(), value: withinRangeValue };
114
- }
97
+ const getWithinRangeParam = ({ withinRangeValue, getNextParamName }) => {
98
+ if (parseRelativeDatePlaceholder(withinRangeValue)) return {
99
+ key: withinRangeValue,
100
+ value: withinRangeValue
101
+ };
102
+ else return {
103
+ key: getNextParamName(),
104
+ value: withinRangeValue
105
+ };
115
106
  };
116
107
  const getWithinOperatorCustomConvertFn = (leftPartExcluded) => {
117
- return (expression, value, getNextParamName) => {
118
- const { key: startParamKey, value: startParamValue } = getWithinRangeParam({
119
- withinRangeValue: value?.withinRangeStart,
120
- getNextParamName,
121
- });
122
- const { key: endParamKey, value: endParamValue } = getWithinRangeParam({
123
- withinRangeValue: value?.withinRangeEnd,
124
- getNextParamName,
125
- });
126
- return {
127
- // See https://the.fibery.io/SoftDev/bug/The-left-part-of-'is-within'-condition-is-not-included-into-filter-12264
128
- expression: ["and", [leftPartExcluded ? ">" : ">=", expression, startParamKey], ["<=", expression, endParamKey]],
129
- params: {
130
- [startParamKey]: startParamValue,
131
- [endParamKey]: endParamValue,
132
- },
133
- };
134
- };
108
+ return (expression, value, getNextParamName) => {
109
+ const { key: startParamKey, value: startParamValue } = getWithinRangeParam({
110
+ withinRangeValue: value?.withinRangeStart,
111
+ getNextParamName
112
+ });
113
+ const { key: endParamKey, value: endParamValue } = getWithinRangeParam({
114
+ withinRangeValue: value?.withinRangeEnd,
115
+ getNextParamName
116
+ });
117
+ return {
118
+ expression: [
119
+ "and",
120
+ [
121
+ leftPartExcluded ? ">" : ">=",
122
+ expression,
123
+ startParamKey
124
+ ],
125
+ [
126
+ "<=",
127
+ expression,
128
+ endParamKey
129
+ ]
130
+ ],
131
+ params: {
132
+ [startParamKey]: startParamValue,
133
+ [endParamKey]: endParamValue
134
+ }
135
+ };
136
+ };
135
137
  };
136
- exports.getWithinOperatorCustomConvertFn = getWithinOperatorCustomConvertFn;
137
138
  const oldWithinPlaceholderToRelativeDateLookup = {
138
- // we don't need $start-of-day at all for date. We can omit it, but it won't hurt in general.
139
- [params_placeholders_1.weekAgoDateParamPlaceholder]: "$start-of-day-1-week-before-now-date",
140
- [params_placeholders_1.monthAgoDateParamPlaceholder]: "$start-of-day-1-month-before-now-date",
141
- [params_placeholders_1.yearAgoDateParamPlaceholder]: "$start-of-day-1-year-before-now-date",
142
- [params_placeholders_1.weekFromNowDateParamPlaceholder]: "$start-of-day-1-week-after-now-date",
143
- [params_placeholders_1.monthFromNowDateParamPlaceholder]: "$start-of-day-1-month-after-now-date",
144
- [params_placeholders_1.yearFromNowDateParamPlaceholder]: "$start-of-day-1-year-after-now-date",
145
- [params_placeholders_1.todayDateParamPlaceholder]: "$end-of-day-0-day-before-now-date",
146
- [params_placeholders_1.weekAgoStartDateTimeParamPlaceholder]: "$start-of-day-1-week-before-now-date-time",
147
- [params_placeholders_1.monthAgoStartDateTimeParamPlaceholder]: "$start-of-day-1-month-before-now-date-time",
148
- [params_placeholders_1.yearAgoStartDateTimeParamPlaceholder]: "$start-of-day-1-year-before-now-date-time",
149
- [params_placeholders_1.weekFromNowEndDateTimeParamPlaceholder]: "$start-of-day-1-week-after-now-date-time",
150
- [params_placeholders_1.monthFromNowEndDateTimeParamPlaceholder]: "$start-of-day-1-month-after-now-date-time",
151
- [params_placeholders_1.yearFromNowEndDateTimeParamPlaceholder]: "$start-of-day-1-year-after-now-date-time",
152
- [params_placeholders_1.todayEndDateTimeParamPlaceholder]: "$end-of-day-0-day-before-now-date-time",
139
+ [weekAgoDateParamPlaceholder]: "$start-of-day-1-week-before-now-date",
140
+ [monthAgoDateParamPlaceholder]: "$start-of-day-1-month-before-now-date",
141
+ [yearAgoDateParamPlaceholder]: "$start-of-day-1-year-before-now-date",
142
+ [weekFromNowDateParamPlaceholder]: "$start-of-day-1-week-after-now-date",
143
+ [monthFromNowDateParamPlaceholder]: "$start-of-day-1-month-after-now-date",
144
+ [yearFromNowDateParamPlaceholder]: "$start-of-day-1-year-after-now-date",
145
+ [todayDateParamPlaceholder]: "$end-of-day-0-day-before-now-date",
146
+ [weekAgoStartDateTimeParamPlaceholder]: "$start-of-day-1-week-before-now-date-time",
147
+ [monthAgoStartDateTimeParamPlaceholder]: "$start-of-day-1-month-before-now-date-time",
148
+ [yearAgoStartDateTimeParamPlaceholder]: "$start-of-day-1-year-before-now-date-time",
149
+ [weekFromNowEndDateTimeParamPlaceholder]: "$start-of-day-1-week-after-now-date-time",
150
+ [monthFromNowEndDateTimeParamPlaceholder]: "$start-of-day-1-month-after-now-date-time",
151
+ [yearFromNowEndDateTimeParamPlaceholder]: "$start-of-day-1-year-after-now-date-time",
152
+ [todayEndDateTimeParamPlaceholder]: "$end-of-day-0-day-before-now-date-time"
153
153
  };
154
154
  const getWithinRangeValue = (paramMatchValue) => {
155
- if (Object.hasOwn(oldWithinPlaceholderToRelativeDateLookup, paramMatchValue)) {
156
- return oldWithinPlaceholderToRelativeDateLookup[paramMatchValue];
157
- }
158
- else {
159
- return paramMatchValue;
160
- }
155
+ if (Object.hasOwn(oldWithinPlaceholderToRelativeDateLookup, paramMatchValue)) return oldWithinPlaceholderToRelativeDateLookup[paramMatchValue];
156
+ else return paramMatchValue;
161
157
  };
162
158
  const matchWithinOperator = (pattern, where, params, typeObject) => {
163
- const { matchSuccess, matches: [firstFieldMatch, firstParamMatch, secondFieldMatch, secondParamMatch], } = (0, pattern_match_1.doPatternMatch)(where, params, pattern, typeObject);
164
- if (matchSuccess) {
165
- const firstFieldValue = firstFieldMatch.value;
166
- const secondFieldValue = secondFieldMatch.value;
167
- if ((0, isEqual_1.default)(firstFieldValue, secondFieldValue)) {
168
- return {
169
- matchSuccess,
170
- expression: firstFieldValue,
171
- value: {
172
- withinRangeStart: getWithinRangeValue(firstParamMatch.value),
173
- withinRangeEnd: getWithinRangeValue(secondParamMatch.value),
174
- },
175
- };
176
- }
177
- }
178
- return { matchSuccess: false };
159
+ const { matchSuccess, matches: [firstFieldMatch, firstParamMatch, secondFieldMatch, secondParamMatch] } = doPatternMatch(where, params, pattern, typeObject);
160
+ if (matchSuccess) {
161
+ const firstFieldValue = firstFieldMatch.value;
162
+ const secondFieldValue = secondFieldMatch.value;
163
+ if (isEqual(firstFieldValue, secondFieldValue)) return {
164
+ matchSuccess,
165
+ expression: firstFieldValue,
166
+ value: {
167
+ withinRangeStart: getWithinRangeValue(firstParamMatch.value),
168
+ withinRangeEnd: getWithinRangeValue(secondParamMatch.value)
169
+ }
170
+ };
171
+ }
172
+ return { matchSuccess: false };
179
173
  };
180
174
  const getWithinOperatorCustomMatchFn = (fieldPlaceholder, leftPartExcluded) => {
181
- return (where, params, typeObject) => {
182
- const match = matchWithinOperator([
183
- "and",
184
- [">", fieldPlaceholder, (0, pattern_match_placeholders_1.getParamPlaceholder)((x) => x !== null)],
185
- ["<=", fieldPlaceholder, (0, pattern_match_placeholders_1.getParamPlaceholder)((x) => x !== null)],
186
- ], where, params, typeObject);
187
- if (!match.matchSuccess && !leftPartExcluded) {
188
- // see https://the.fibery.io/SoftDev/bug/The-left-part-of-'is-within'-condition-is-not-included-into-filter-12264
189
- // we probably want to have the same for date-time, but then we will intersect with the "match" function of "operatorDateTimeIs".
190
- return matchWithinOperator([
191
- "and",
192
- [">=", fieldPlaceholder, (0, pattern_match_placeholders_1.getParamPlaceholder)((x) => x !== null)],
193
- ["<=", fieldPlaceholder, (0, pattern_match_placeholders_1.getParamPlaceholder)((x) => x !== null)],
194
- ], where, params, typeObject);
195
- }
196
- return match;
197
- };
175
+ return (where, params, typeObject) => {
176
+ const match = matchWithinOperator([
177
+ "and",
178
+ [
179
+ ">",
180
+ fieldPlaceholder,
181
+ getParamPlaceholder((x) => x !== null)
182
+ ],
183
+ [
184
+ "<=",
185
+ fieldPlaceholder,
186
+ getParamPlaceholder((x) => x !== null)
187
+ ]
188
+ ], where, params, typeObject);
189
+ if (!match.matchSuccess && !leftPartExcluded) return matchWithinOperator([
190
+ "and",
191
+ [
192
+ ">=",
193
+ fieldPlaceholder,
194
+ getParamPlaceholder((x) => x !== null)
195
+ ],
196
+ [
197
+ "<=",
198
+ fieldPlaceholder,
199
+ getParamPlaceholder((x) => x !== null)
200
+ ]
201
+ ], where, params, typeObject);
202
+ return match;
203
+ };
198
204
  };
199
- exports.getWithinOperatorCustomMatchFn = getWithinOperatorCustomMatchFn;
200
- //# sourceMappingURL=operator-utils.js.map
205
+ //#endregion
206
+ export { NO_VALUE, getCompareOperatorForDateTime, getWithinOperatorCustomConvertFn, getWithinOperatorCustomMatchFn, isDateTime, isNoValue };
@@ -1,108 +1,113 @@
1
- import type { Expression } from "../types";
2
- import type { Operator } from "./types";
3
- export declare const operatorReferenceIsMe: Operator;
4
- export declare const operatorReferenceIsNotMe: Operator;
5
- export declare const operatorReferenceIs: Operator;
6
- export declare const operatorReferenceIsAnyOf: Operator;
7
- export declare const operatorReferenceIsNot: Operator;
8
- export declare const operatorReferenceIsNoneOf: Operator;
9
- export declare const operatorReferenceIsEmpty: Operator;
10
- export declare const operatorReferenceIsNotEmpty: Operator;
11
- export declare const operatorUserRoleIsAnyOf: Operator;
12
- export declare const operatorTextIs: Operator;
13
- export declare const operatorTextExactlyIs: Operator;
14
- export declare const operatorTextIsNot: Operator;
15
- export declare const operatorTextContains: Operator;
16
- export declare const operatorTextDoesNotContain: Operator;
17
- export declare const operatorTextStartsWith: Operator;
18
- export declare const operatorTextEndsWith: Operator;
19
- export declare const operatorNumberEquals: Operator;
20
- export declare const operatorNumberDoesNotEqual: Operator;
21
- export declare const operatorGreaterThan: Operator;
22
- export declare const operatorLessThan: Operator;
23
- export declare const operatorGreaterThanOrEqual: Operator;
24
- export declare const operatorLessThanOrEqual: Operator;
25
- export declare const operatorCollectionCountEquals: Operator;
26
- export declare const operatorCollectionCountDoesNotEqual: Operator;
27
- export declare const operatorCollectionCountGreaterThan: Operator;
28
- export declare const operatorCollectionCountLessThan: Operator;
29
- export declare const operatorCollectionCountGreaterThanOrEqual: Operator;
30
- export declare const operatorCollectionCountLessThanOrEqual: Operator;
31
- export declare const operatorNumberIsEmptyV1: Operator;
32
- export declare const operatorNumberIsEmptyV2: Operator;
33
- export declare const operatorNumberIsNotEmptyV1: Operator;
34
- export declare const operatorNumberIsNotEmptyV2: Operator;
35
- export declare const operatorTextIsEmptyV1: Operator;
36
- export declare const operatorTextIsEmptyV2: Operator;
37
- export declare const operatorTextIsNotEmptyV1: Operator;
38
- export declare const operatorTextIsNotEmptyV2: Operator;
39
- export declare const operatorLocationContains: Operator;
40
- export declare const operatorLocationDoesNotContain: Operator;
41
- export declare const operatorLocationIsEmpty: Operator;
42
- export declare const operatorLocationIsNotEmpty: Operator;
43
- export declare const operatorCollectionContains: Operator;
44
- export declare const operatorCollectionContainsMe: Operator;
45
- export declare const withoutLastIdAccess: (expression: Expression) => Expression;
46
- export declare const operatorCollectionContainsAnyOf: Operator;
47
- export declare const operatorCollectionDoesNotContain: Operator;
48
- export declare const operatorCollectionDoesNotContainMe: Operator;
49
- export declare const operatorCollectionDoesNotContainAnyOf: Operator;
50
- export declare const operatorCollectionIsEmpty: Operator;
51
- export declare const operatorCollectionIsNotEmpty: Operator;
52
- export declare const operatorBoolIs: Operator;
53
- export declare const operatorDateIs: Operator;
54
- export declare const operatorDateIsEmptyV1: Operator;
55
- export declare const operatorDateIsEmptyV2: Operator;
56
- export declare const operatorDateIsNotEmptyV1: Operator;
57
- export declare const operatorDateIsNotEmptyV2: Operator;
58
- export declare const operatorDateIsWithin: Operator;
59
- export declare const operatorDateIsBefore: Operator;
60
- export declare const operatorDateIsOnOrBefore: Operator;
61
- export declare const operatorDateIsAfter: Operator;
62
- export declare const operatorDateIsOnOrAfter: Operator;
63
- export declare const operatorDateTimeIs: Operator;
64
- export declare const operatorDateTimeIsWithin: Operator;
65
- export declare const operatorDateTimeIsBefore: Operator;
66
- export declare const operatorDateTimeIsAfter: Operator;
67
- export declare const operatorDateTimeIsOnOrBefore: Operator;
68
- export declare const operatorDateTimeIsOnOrAfter: Operator;
69
- export declare const operatorsGroupsWithoutMe: {
70
- ":filter-type/comment-reference-collection": Operator[];
71
- ":filter-type/file-reference": Operator[];
72
- ":filter-type/file-reference-collection": Operator[];
73
- ":filter-type/reference": Operator[];
74
- ":filter-type/user-reference": Operator[];
75
- ":filter-type/single-select": Operator[];
76
- ":filter-type/multi-select": Operator[];
77
- ":filter-type/reference-collection": Operator[];
78
- ":filter-type/user-reference-collection": Operator[];
79
- ":filter-type/text": Operator[];
80
- ":filter-type/number": Operator[];
81
- ":filter-type/bool": Operator[];
82
- ":filter-type/date": Operator[];
83
- ":filter-type/date-time": Operator[];
84
- ":filter-type/location": Operator[];
85
- ":filter-type/user-role": Operator[];
86
- ":filter-type/collection-count": Operator[];
1
+ import { Expression } from "../types.js";
2
+ import { Operator } from "./types.js";
3
+ declare namespace operators_d_exports {
4
+ export { hiddenValidOperators, operatorBoolIs, operatorCollectionContains, operatorCollectionContainsAnyOf, operatorCollectionContainsMe, operatorCollectionCountDoesNotEqual, operatorCollectionCountEquals, operatorCollectionCountGreaterThan, operatorCollectionCountGreaterThanOrEqual, operatorCollectionCountLessThan, operatorCollectionCountLessThanOrEqual, operatorCollectionDoesNotContain, operatorCollectionDoesNotContainAnyOf, operatorCollectionDoesNotContainMe, operatorCollectionIsEmpty, operatorCollectionIsNotEmpty, operatorDateIs, operatorDateIsAfter, operatorDateIsBefore, operatorDateIsEmptyV1, operatorDateIsEmptyV2, operatorDateIsNotEmptyV1, operatorDateIsNotEmptyV2, operatorDateIsOnOrAfter, operatorDateIsOnOrBefore, operatorDateIsWithin, operatorDateTimeIs, operatorDateTimeIsAfter, operatorDateTimeIsBefore, operatorDateTimeIsOnOrAfter, operatorDateTimeIsOnOrBefore, operatorDateTimeIsWithin, operatorGreaterThan, operatorGreaterThanOrEqual, operatorLessThan, operatorLessThanOrEqual, operatorLocationContains, operatorLocationDoesNotContain, operatorLocationIsEmpty, operatorLocationIsNotEmpty, operatorNumberDoesNotEqual, operatorNumberEquals, operatorNumberIsEmptyV1, operatorNumberIsEmptyV2, operatorNumberIsNotEmptyV1, operatorNumberIsNotEmptyV2, operatorReferenceIs, operatorReferenceIsAnyOf, operatorReferenceIsEmpty, operatorReferenceIsMe, operatorReferenceIsNoneOf, operatorReferenceIsNot, operatorReferenceIsNotEmpty, operatorReferenceIsNotMe, operatorTextContains, operatorTextDoesNotContain, operatorTextEndsWith, operatorTextExactlyIs, operatorTextIs, operatorTextIsEmptyV1, operatorTextIsEmptyV2, operatorTextIsNot, operatorTextIsNotEmptyV1, operatorTextIsNotEmptyV2, operatorTextStartsWith, operatorUserRoleIsAnyOf, operators, operatorsGroups, operatorsGroupsWithoutMe, withoutLastIdAccess };
5
+ }
6
+ declare const operatorReferenceIsMe: Operator;
7
+ declare const operatorReferenceIsNotMe: Operator;
8
+ declare const operatorReferenceIs: Operator;
9
+ declare const operatorReferenceIsAnyOf: Operator;
10
+ declare const operatorReferenceIsNot: Operator;
11
+ declare const operatorReferenceIsNoneOf: Operator;
12
+ declare const operatorReferenceIsEmpty: Operator;
13
+ declare const operatorReferenceIsNotEmpty: Operator;
14
+ declare const operatorUserRoleIsAnyOf: Operator;
15
+ declare const operatorTextIs: Operator;
16
+ declare const operatorTextExactlyIs: Operator;
17
+ declare const operatorTextIsNot: Operator;
18
+ declare const operatorTextContains: Operator;
19
+ declare const operatorTextDoesNotContain: Operator;
20
+ declare const operatorTextStartsWith: Operator;
21
+ declare const operatorTextEndsWith: Operator;
22
+ declare const operatorNumberEquals: Operator;
23
+ declare const operatorNumberDoesNotEqual: Operator;
24
+ declare const operatorGreaterThan: Operator;
25
+ declare const operatorLessThan: Operator;
26
+ declare const operatorGreaterThanOrEqual: Operator;
27
+ declare const operatorLessThanOrEqual: Operator;
28
+ declare const operatorCollectionCountEquals: Operator;
29
+ declare const operatorCollectionCountDoesNotEqual: Operator;
30
+ declare const operatorCollectionCountGreaterThan: Operator;
31
+ declare const operatorCollectionCountLessThan: Operator;
32
+ declare const operatorCollectionCountGreaterThanOrEqual: Operator;
33
+ declare const operatorCollectionCountLessThanOrEqual: Operator;
34
+ declare const operatorNumberIsEmptyV1: Operator;
35
+ declare const operatorNumberIsEmptyV2: Operator;
36
+ declare const operatorNumberIsNotEmptyV1: Operator;
37
+ declare const operatorNumberIsNotEmptyV2: Operator;
38
+ declare const operatorTextIsEmptyV1: Operator;
39
+ declare const operatorTextIsEmptyV2: Operator;
40
+ declare const operatorTextIsNotEmptyV1: Operator;
41
+ declare const operatorTextIsNotEmptyV2: Operator;
42
+ declare const operatorLocationContains: Operator;
43
+ declare const operatorLocationDoesNotContain: Operator;
44
+ declare const operatorLocationIsEmpty: Operator;
45
+ declare const operatorLocationIsNotEmpty: Operator;
46
+ declare const operatorCollectionContains: Operator;
47
+ declare const operatorCollectionContainsMe: Operator;
48
+ declare const withoutLastIdAccess: (expression: Expression) => Expression;
49
+ declare const operatorCollectionContainsAnyOf: Operator;
50
+ declare const operatorCollectionDoesNotContain: Operator;
51
+ declare const operatorCollectionDoesNotContainMe: Operator;
52
+ declare const operatorCollectionDoesNotContainAnyOf: Operator;
53
+ declare const operatorCollectionIsEmpty: Operator;
54
+ declare const operatorCollectionIsNotEmpty: Operator;
55
+ declare const operatorBoolIs: Operator;
56
+ declare const operatorDateIs: Operator;
57
+ declare const operatorDateIsEmptyV1: Operator;
58
+ declare const operatorDateIsEmptyV2: Operator;
59
+ declare const operatorDateIsNotEmptyV1: Operator;
60
+ declare const operatorDateIsNotEmptyV2: Operator;
61
+ declare const operatorDateIsWithin: Operator;
62
+ declare const operatorDateIsBefore: Operator;
63
+ declare const operatorDateIsOnOrBefore: Operator;
64
+ declare const operatorDateIsAfter: Operator;
65
+ declare const operatorDateIsOnOrAfter: Operator;
66
+ declare const operatorDateTimeIs: Operator;
67
+ declare const operatorDateTimeIsWithin: Operator;
68
+ declare const operatorDateTimeIsBefore: Operator;
69
+ declare const operatorDateTimeIsAfter: Operator;
70
+ declare const operatorDateTimeIsOnOrBefore: Operator;
71
+ declare const operatorDateTimeIsOnOrAfter: Operator;
72
+ declare const operatorsGroupsWithoutMe: {
73
+ ":filter-type/comment-reference-collection": Operator[];
74
+ ":filter-type/file-reference": Operator[];
75
+ ":filter-type/file-reference-collection": Operator[];
76
+ ":filter-type/reference": Operator[];
77
+ ":filter-type/user-reference": Operator[];
78
+ ":filter-type/single-select": Operator[];
79
+ ":filter-type/multi-select": Operator[];
80
+ ":filter-type/reference-collection": Operator[];
81
+ ":filter-type/user-reference-collection": Operator[];
82
+ ":filter-type/text": Operator[];
83
+ ":filter-type/number": Operator[];
84
+ ":filter-type/bool": Operator[];
85
+ ":filter-type/date": Operator[];
86
+ ":filter-type/date-time": Operator[];
87
+ ":filter-type/location": Operator[];
88
+ ":filter-type/user-role": Operator[];
89
+ ":filter-type/collection-count": Operator[];
87
90
  };
88
- export declare const operatorsGroups: {
89
- ":filter-type/comment-reference-collection": Operator[];
90
- ":filter-type/file-reference": Operator[];
91
- ":filter-type/file-reference-collection": Operator[];
92
- ":filter-type/reference": Operator[];
93
- ":filter-type/user-reference": Operator[];
94
- ":filter-type/single-select": Operator[];
95
- ":filter-type/multi-select": Operator[];
96
- ":filter-type/reference-collection": Operator[];
97
- ":filter-type/user-reference-collection": Operator[];
98
- ":filter-type/text": Operator[];
99
- ":filter-type/number": Operator[];
100
- ":filter-type/bool": Operator[];
101
- ":filter-type/date": Operator[];
102
- ":filter-type/date-time": Operator[];
103
- ":filter-type/location": Operator[];
104
- ":filter-type/user-role": Operator[];
105
- ":filter-type/collection-count": Operator[];
91
+ declare const operatorsGroups: {
92
+ ":filter-type/comment-reference-collection": Operator[];
93
+ ":filter-type/file-reference": Operator[];
94
+ ":filter-type/file-reference-collection": Operator[];
95
+ ":filter-type/reference": Operator[];
96
+ ":filter-type/user-reference": Operator[];
97
+ ":filter-type/single-select": Operator[];
98
+ ":filter-type/multi-select": Operator[];
99
+ ":filter-type/reference-collection": Operator[];
100
+ ":filter-type/user-reference-collection": Operator[];
101
+ ":filter-type/text": Operator[];
102
+ ":filter-type/number": Operator[];
103
+ ":filter-type/bool": Operator[];
104
+ ":filter-type/date": Operator[];
105
+ ":filter-type/date-time": Operator[];
106
+ ":filter-type/location": Operator[];
107
+ ":filter-type/user-role": Operator[];
108
+ ":filter-type/collection-count": Operator[];
106
109
  };
107
- export declare const operators: Operator[];
108
- export declare const hiddenValidOperators: Operator[];
110
+ declare const operators: Operator[];
111
+ declare const hiddenValidOperators: Operator[];
112
+ //#endregion
113
+ export { hiddenValidOperators, operatorBoolIs, operatorCollectionContains, operatorCollectionContainsAnyOf, operatorCollectionContainsMe, operatorCollectionCountDoesNotEqual, operatorCollectionCountEquals, operatorCollectionCountGreaterThan, operatorCollectionCountGreaterThanOrEqual, operatorCollectionCountLessThan, operatorCollectionCountLessThanOrEqual, operatorCollectionDoesNotContain, operatorCollectionDoesNotContainAnyOf, operatorCollectionDoesNotContainMe, operatorCollectionIsEmpty, operatorCollectionIsNotEmpty, operatorDateIs, operatorDateIsAfter, operatorDateIsBefore, operatorDateIsEmptyV1, operatorDateIsEmptyV2, operatorDateIsNotEmptyV1, operatorDateIsNotEmptyV2, operatorDateIsOnOrAfter, operatorDateIsOnOrBefore, operatorDateIsWithin, operatorDateTimeIs, operatorDateTimeIsAfter, operatorDateTimeIsBefore, operatorDateTimeIsOnOrAfter, operatorDateTimeIsOnOrBefore, operatorDateTimeIsWithin, operatorGreaterThan, operatorGreaterThanOrEqual, operatorLessThan, operatorLessThanOrEqual, operatorLocationContains, operatorLocationDoesNotContain, operatorLocationIsEmpty, operatorLocationIsNotEmpty, operatorNumberDoesNotEqual, operatorNumberEquals, operatorNumberIsEmptyV1, operatorNumberIsEmptyV2, operatorNumberIsNotEmptyV1, operatorNumberIsNotEmptyV2, operatorReferenceIs, operatorReferenceIsAnyOf, operatorReferenceIsEmpty, operatorReferenceIsMe, operatorReferenceIsNoneOf, operatorReferenceIsNot, operatorReferenceIsNotEmpty, operatorReferenceIsNotMe, operatorTextContains, operatorTextDoesNotContain, operatorTextEndsWith, operatorTextExactlyIs, operatorTextIs, operatorTextIsEmptyV1, operatorTextIsEmptyV2, operatorTextIsNot, operatorTextIsNotEmptyV1, operatorTextIsNotEmptyV2, operatorTextStartsWith, operatorUserRoleIsAnyOf, operators, operatorsGroups, operatorsGroupsWithoutMe, operators_d_exports, withoutLastIdAccess };