@opra/common 0.17.0 → 0.17.2
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.
- package/browser.js +12220 -0
- package/cjs/document/constants.js +1 -1
- package/cjs/document/data-type/complex-type.js +1 -1
- package/cjs/document/resource/collection.js +13 -7
- package/cjs/filter/antlr/OpraFilterLexer.js +209 -238
- package/cjs/filter/antlr/OpraFilterListener.js +1 -1
- package/cjs/filter/antlr/OpraFilterParser.js +795 -1482
- package/cjs/filter/antlr/OpraFilterVisitor.js +1 -1
- package/cjs/filter/ast/expressions/logical-expression.js +4 -0
- package/cjs/filter/ast/expressions/{parentheses-expression.js → negative-expression.js} +3 -3
- package/cjs/filter/ast/expressions/parenthesized-expression.js +14 -0
- package/cjs/filter/ast/index.js +2 -1
- package/cjs/filter/build.js +1 -1
- package/cjs/filter/filter-tree-visitor.js +44 -66
- package/cjs/filter/index.js +2 -5
- package/cjs/filter/opra-filter.ns.js +8 -0
- package/cjs/filter/parse.js +5 -6
- package/cjs/http/codecs/filter-codec.js +2 -2
- package/cjs/http/http-message.host.js +6 -6
- package/cjs/http/http-request-message.js +3 -3
- package/cjs/http/http-response-message.js +2 -2
- package/cjs/http/multipart/batch-multipart.js +1 -1
- package/cjs/i18n/i18n.js +1 -1
- package/esm/document/constants.js +1 -1
- package/esm/document/data-type/complex-type.js +1 -1
- package/esm/document/resource/collection.js +14 -8
- package/esm/filter/antlr/OpraFilterLexer.js +209 -238
- package/esm/filter/antlr/OpraFilterListener.js +1 -1
- package/esm/filter/antlr/OpraFilterParser.js +775 -1448
- package/esm/filter/antlr/OpraFilterVisitor.js +1 -1
- package/esm/filter/ast/expressions/logical-expression.js +4 -0
- package/esm/filter/ast/expressions/{parentheses-expression.js → negative-expression.js} +1 -1
- package/esm/filter/ast/expressions/parenthesized-expression.js +10 -0
- package/esm/filter/ast/index.js +2 -1
- package/esm/filter/build.js +2 -2
- package/esm/filter/filter-tree-visitor.js +46 -68
- package/esm/filter/index.js +1 -5
- package/esm/filter/opra-filter.ns.js +5 -0
- package/esm/filter/parse.js +3 -4
- package/esm/http/codecs/filter-codec.js +2 -2
- package/esm/http/http-message.host.js +1 -1
- package/esm/http/http-request-message.js +1 -1
- package/esm/http/http-response-message.js +1 -1
- package/esm/http/multipart/batch-multipart.js +1 -1
- package/esm/i18n/i18n.js +1 -1
- package/package.json +29 -17
- package/types/document/resource/collection.d.ts +2 -2
- package/types/filter/antlr/OpraFilterLexer.d.ts +9 -22
- package/types/filter/antlr/OpraFilterListener.d.ts +89 -217
- package/types/filter/antlr/OpraFilterParser.d.ts +91 -206
- package/types/filter/antlr/OpraFilterVisitor.d.ts +49 -124
- package/types/filter/ast/expressions/{parentheses-expression.d.ts → negative-expression.d.ts} +1 -1
- package/types/filter/ast/expressions/parenthesized-expression.d.ts +6 -0
- package/types/filter/ast/index.d.ts +2 -1
- package/types/filter/build.d.ts +2 -2
- package/types/filter/filter-tree-visitor.d.ts +10 -11
- package/types/filter/index.d.ts +1 -5
- package/types/filter/opra-filter.ns.d.ts +5 -0
- package/types/filter/parse.d.ts +1 -1
- package/types/http/http-message.host.d.ts +1 -1
- package/types/i18n/i18n.d.ts +2 -2
- package/types/i18n/translate.d.ts +1 -1
- package/types/schema/data-type/complex-type.interface.d.ts +1 -1
- package/types/schema/resource/endpoint.interface.d.ts +2 -2
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ParseTreeVisitor } from '@browsery/antlr4';
|
|
2
|
-
import {
|
|
2
|
+
import { ArithmeticOperatorContext, ArrayValueContext, BooleanContext, BooleanLiteralContext, ComparisonExpressionContext, ComparisonLeftContext, ComparisonOperatorContext, ComparisonRightContext, DateLiteralContext, DateTimeLiteralContext, ExternalConstantContext, IdentifierContext, InfinityContext, InfinityLiteralContext, LogicalExpressionContext, LogicalOperatorContext, NegativeExpressionContext, NullContext, NullLiteralContext, NumberLiteralContext, ParenthesizedExpressionContext, ParenthesizedItemContext, PolarityOperatorContext, QualifiedIdentifierContext, RootContext, StringLiteralContext, TimeLiteralContext } from "./OpraFilterParser.js";
|
|
3
3
|
/**
|
|
4
4
|
* This interface defines a complete generic visitor for a parse tree produced
|
|
5
5
|
* by `OpraFilterParser`.
|
|
@@ -22,19 +22,12 @@ export default class OpraFilterVisitor<Result> extends ParseTreeVisitor<Result>
|
|
|
22
22
|
*/
|
|
23
23
|
visitParenthesizedExpression?: (ctx: ParenthesizedExpressionContext) => Result;
|
|
24
24
|
/**
|
|
25
|
-
* Visit a parse tree produced by the `
|
|
25
|
+
* Visit a parse tree produced by the `negativeExpression`
|
|
26
26
|
* labeled alternative in `OpraFilterParser.expression`.
|
|
27
27
|
* @param ctx the parse tree
|
|
28
28
|
* @return the visitor result
|
|
29
29
|
*/
|
|
30
|
-
|
|
31
|
-
/**
|
|
32
|
-
* Visit a parse tree produced by the `polarityExpression`
|
|
33
|
-
* labeled alternative in `OpraFilterParser.expression`.
|
|
34
|
-
* @param ctx the parse tree
|
|
35
|
-
* @return the visitor result
|
|
36
|
-
*/
|
|
37
|
-
visitPolarityExpression?: (ctx: PolarityExpressionContext) => Result;
|
|
30
|
+
visitNegativeExpression?: (ctx: NegativeExpressionContext) => Result;
|
|
38
31
|
/**
|
|
39
32
|
* Visit a parse tree produced by the `comparisonExpression`
|
|
40
33
|
* labeled alternative in `OpraFilterParser.expression`.
|
|
@@ -42,13 +35,6 @@ export default class OpraFilterVisitor<Result> extends ParseTreeVisitor<Result>
|
|
|
42
35
|
* @return the visitor result
|
|
43
36
|
*/
|
|
44
37
|
visitComparisonExpression?: (ctx: ComparisonExpressionContext) => Result;
|
|
45
|
-
/**
|
|
46
|
-
* Visit a parse tree produced by the `arithmeticExpression`
|
|
47
|
-
* labeled alternative in `OpraFilterParser.expression`.
|
|
48
|
-
* @param ctx the parse tree
|
|
49
|
-
* @return the visitor result
|
|
50
|
-
*/
|
|
51
|
-
visitArithmeticExpression?: (ctx: ArithmeticExpressionContext) => Result;
|
|
52
38
|
/**
|
|
53
39
|
* Visit a parse tree produced by the `logicalExpression`
|
|
54
40
|
* labeled alternative in `OpraFilterParser.expression`.
|
|
@@ -57,188 +43,103 @@ export default class OpraFilterVisitor<Result> extends ParseTreeVisitor<Result>
|
|
|
57
43
|
*/
|
|
58
44
|
visitLogicalExpression?: (ctx: LogicalExpressionContext) => Result;
|
|
59
45
|
/**
|
|
60
|
-
* Visit a parse tree produced by
|
|
61
|
-
* labeled alternative in `OpraFilterParser.expression`.
|
|
62
|
-
* @param ctx the parse tree
|
|
63
|
-
* @return the visitor result
|
|
64
|
-
*/
|
|
65
|
-
visitTermExpression?: (ctx: TermExpressionContext) => Result;
|
|
66
|
-
/**
|
|
67
|
-
* Visit a parse tree produced by the `literalTerm`
|
|
68
|
-
* labeled alternative in `OpraFilterParser.term`.
|
|
69
|
-
* @param ctx the parse tree
|
|
70
|
-
* @return the visitor result
|
|
71
|
-
*/
|
|
72
|
-
visitLiteralTerm?: (ctx: LiteralTermContext) => Result;
|
|
73
|
-
/**
|
|
74
|
-
* Visit a parse tree produced by the `qualifiedIdentifierTerm`
|
|
75
|
-
* labeled alternative in `OpraFilterParser.term`.
|
|
76
|
-
* @param ctx the parse tree
|
|
77
|
-
* @return the visitor result
|
|
78
|
-
*/
|
|
79
|
-
visitQualifiedIdentifierTerm?: (ctx: QualifiedIdentifierTermContext) => Result;
|
|
80
|
-
/**
|
|
81
|
-
* Visit a parse tree produced by the `externalConstantTerm`
|
|
82
|
-
* labeled alternative in `OpraFilterParser.term`.
|
|
46
|
+
* Visit a parse tree produced by `OpraFilterParser.comparisonLeft`.
|
|
83
47
|
* @param ctx the parse tree
|
|
84
48
|
* @return the visitor result
|
|
85
49
|
*/
|
|
86
|
-
|
|
50
|
+
visitComparisonLeft?: (ctx: ComparisonLeftContext) => Result;
|
|
87
51
|
/**
|
|
88
|
-
* Visit a parse tree produced by `OpraFilterParser.
|
|
52
|
+
* Visit a parse tree produced by `OpraFilterParser.comparisonRight`.
|
|
89
53
|
* @param ctx the parse tree
|
|
90
54
|
* @return the visitor result
|
|
91
55
|
*/
|
|
92
|
-
|
|
56
|
+
visitComparisonRight?: (ctx: ComparisonRightContext) => Result;
|
|
93
57
|
/**
|
|
94
|
-
* Visit a parse tree produced by
|
|
95
|
-
* labeled alternative in `OpraFilterParser.invocation`.
|
|
58
|
+
* Visit a parse tree produced by `OpraFilterParser.parenthesizedItem`.
|
|
96
59
|
* @param ctx the parse tree
|
|
97
60
|
* @return the visitor result
|
|
98
61
|
*/
|
|
99
|
-
|
|
100
|
-
/**
|
|
101
|
-
* Visit a parse tree produced by the `memberIndex`
|
|
102
|
-
* labeled alternative in `OpraFilterParser.indexer`.
|
|
103
|
-
* @param ctx the parse tree
|
|
104
|
-
* @return the visitor result
|
|
105
|
-
*/
|
|
106
|
-
visitMemberIndex?: (ctx: MemberIndexContext) => Result;
|
|
107
|
-
/**
|
|
108
|
-
* Visit a parse tree produced by the `numberIndex`
|
|
109
|
-
* labeled alternative in `OpraFilterParser.indexer`.
|
|
110
|
-
* @param ctx the parse tree
|
|
111
|
-
* @return the visitor result
|
|
112
|
-
*/
|
|
113
|
-
visitNumberIndex?: (ctx: NumberIndexContext) => Result;
|
|
114
|
-
/**
|
|
115
|
-
* Visit a parse tree produced by `OpraFilterParser.function`.
|
|
116
|
-
* @param ctx the parse tree
|
|
117
|
-
* @return the visitor result
|
|
118
|
-
*/
|
|
119
|
-
visitFunction?: (ctx: FunctionContext) => Result;
|
|
120
|
-
/**
|
|
121
|
-
* Visit a parse tree produced by `OpraFilterParser.paramList`.
|
|
122
|
-
* @param ctx the parse tree
|
|
123
|
-
* @return the visitor result
|
|
124
|
-
*/
|
|
125
|
-
visitParamList?: (ctx: ParamListContext) => Result;
|
|
126
|
-
/**
|
|
127
|
-
* Visit a parse tree produced by `OpraFilterParser.unit`.
|
|
128
|
-
* @param ctx the parse tree
|
|
129
|
-
* @return the visitor result
|
|
130
|
-
*/
|
|
131
|
-
visitUnit?: (ctx: UnitContext) => Result;
|
|
132
|
-
/**
|
|
133
|
-
* Visit a parse tree produced by `OpraFilterParser.dateTimePrecision`.
|
|
134
|
-
* @param ctx the parse tree
|
|
135
|
-
* @return the visitor result
|
|
136
|
-
*/
|
|
137
|
-
visitDateTimePrecision?: (ctx: DateTimePrecisionContext) => Result;
|
|
138
|
-
/**
|
|
139
|
-
* Visit a parse tree produced by `OpraFilterParser.pluralDateTimePrecision`.
|
|
140
|
-
* @param ctx the parse tree
|
|
141
|
-
* @return the visitor result
|
|
142
|
-
*/
|
|
143
|
-
visitPluralDateTimePrecision?: (ctx: PluralDateTimePrecisionContext) => Result;
|
|
144
|
-
/**
|
|
145
|
-
* Visit a parse tree produced by `OpraFilterParser.qualifiedIdentifier`.
|
|
146
|
-
* @param ctx the parse tree
|
|
147
|
-
* @return the visitor result
|
|
148
|
-
*/
|
|
149
|
-
visitQualifiedIdentifier?: (ctx: QualifiedIdentifierContext) => Result;
|
|
150
|
-
/**
|
|
151
|
-
* Visit a parse tree produced by `OpraFilterParser.externalConstant`.
|
|
152
|
-
* @param ctx the parse tree
|
|
153
|
-
* @return the visitor result
|
|
154
|
-
*/
|
|
155
|
-
visitExternalConstant?: (ctx: ExternalConstantContext) => Result;
|
|
156
|
-
/**
|
|
157
|
-
* Visit a parse tree produced by `OpraFilterParser.identifier`.
|
|
158
|
-
* @param ctx the parse tree
|
|
159
|
-
* @return the visitor result
|
|
160
|
-
*/
|
|
161
|
-
visitIdentifier?: (ctx: IdentifierContext) => Result;
|
|
62
|
+
visitParenthesizedItem?: (ctx: ParenthesizedItemContext) => Result;
|
|
162
63
|
/**
|
|
163
64
|
* Visit a parse tree produced by the `numberLiteral`
|
|
164
|
-
* labeled alternative in `OpraFilterParser.
|
|
65
|
+
* labeled alternative in `OpraFilterParser.value`.
|
|
165
66
|
* @param ctx the parse tree
|
|
166
67
|
* @return the visitor result
|
|
167
68
|
*/
|
|
168
69
|
visitNumberLiteral?: (ctx: NumberLiteralContext) => Result;
|
|
169
70
|
/**
|
|
170
71
|
* Visit a parse tree produced by the `infinityLiteral`
|
|
171
|
-
* labeled alternative in `OpraFilterParser.
|
|
72
|
+
* labeled alternative in `OpraFilterParser.value`.
|
|
172
73
|
* @param ctx the parse tree
|
|
173
74
|
* @return the visitor result
|
|
174
75
|
*/
|
|
175
76
|
visitInfinityLiteral?: (ctx: InfinityLiteralContext) => Result;
|
|
176
77
|
/**
|
|
177
78
|
* Visit a parse tree produced by the `booleanLiteral`
|
|
178
|
-
* labeled alternative in `OpraFilterParser.
|
|
79
|
+
* labeled alternative in `OpraFilterParser.value`.
|
|
179
80
|
* @param ctx the parse tree
|
|
180
81
|
* @return the visitor result
|
|
181
82
|
*/
|
|
182
83
|
visitBooleanLiteral?: (ctx: BooleanLiteralContext) => Result;
|
|
183
84
|
/**
|
|
184
85
|
* Visit a parse tree produced by the `nullLiteral`
|
|
185
|
-
* labeled alternative in `OpraFilterParser.
|
|
86
|
+
* labeled alternative in `OpraFilterParser.value`.
|
|
186
87
|
* @param ctx the parse tree
|
|
187
88
|
* @return the visitor result
|
|
188
89
|
*/
|
|
189
90
|
visitNullLiteral?: (ctx: NullLiteralContext) => Result;
|
|
190
91
|
/**
|
|
191
92
|
* Visit a parse tree produced by the `dateLiteral`
|
|
192
|
-
* labeled alternative in `OpraFilterParser.
|
|
93
|
+
* labeled alternative in `OpraFilterParser.value`.
|
|
193
94
|
* @param ctx the parse tree
|
|
194
95
|
* @return the visitor result
|
|
195
96
|
*/
|
|
196
97
|
visitDateLiteral?: (ctx: DateLiteralContext) => Result;
|
|
197
98
|
/**
|
|
198
99
|
* Visit a parse tree produced by the `dateTimeLiteral`
|
|
199
|
-
* labeled alternative in `OpraFilterParser.
|
|
100
|
+
* labeled alternative in `OpraFilterParser.value`.
|
|
200
101
|
* @param ctx the parse tree
|
|
201
102
|
* @return the visitor result
|
|
202
103
|
*/
|
|
203
104
|
visitDateTimeLiteral?: (ctx: DateTimeLiteralContext) => Result;
|
|
204
105
|
/**
|
|
205
106
|
* Visit a parse tree produced by the `timeLiteral`
|
|
206
|
-
* labeled alternative in `OpraFilterParser.
|
|
107
|
+
* labeled alternative in `OpraFilterParser.value`.
|
|
207
108
|
* @param ctx the parse tree
|
|
208
109
|
* @return the visitor result
|
|
209
110
|
*/
|
|
210
111
|
visitTimeLiteral?: (ctx: TimeLiteralContext) => Result;
|
|
211
112
|
/**
|
|
212
113
|
* Visit a parse tree produced by the `stringLiteral`
|
|
213
|
-
* labeled alternative in `OpraFilterParser.
|
|
114
|
+
* labeled alternative in `OpraFilterParser.value`.
|
|
214
115
|
* @param ctx the parse tree
|
|
215
116
|
* @return the visitor result
|
|
216
117
|
*/
|
|
217
118
|
visitStringLiteral?: (ctx: StringLiteralContext) => Result;
|
|
218
119
|
/**
|
|
219
|
-
* Visit a parse tree produced by `OpraFilterParser.
|
|
120
|
+
* Visit a parse tree produced by `OpraFilterParser.qualifiedIdentifier`.
|
|
220
121
|
* @param ctx the parse tree
|
|
221
122
|
* @return the visitor result
|
|
222
123
|
*/
|
|
223
|
-
|
|
124
|
+
visitQualifiedIdentifier?: (ctx: QualifiedIdentifierContext) => Result;
|
|
224
125
|
/**
|
|
225
|
-
* Visit a parse tree produced by `OpraFilterParser.
|
|
126
|
+
* Visit a parse tree produced by `OpraFilterParser.externalConstant`.
|
|
226
127
|
* @param ctx the parse tree
|
|
227
128
|
* @return the visitor result
|
|
228
129
|
*/
|
|
229
|
-
|
|
130
|
+
visitExternalConstant?: (ctx: ExternalConstantContext) => Result;
|
|
230
131
|
/**
|
|
231
|
-
* Visit a parse tree produced by `OpraFilterParser.
|
|
132
|
+
* Visit a parse tree produced by `OpraFilterParser.identifier`.
|
|
232
133
|
* @param ctx the parse tree
|
|
233
134
|
* @return the visitor result
|
|
234
135
|
*/
|
|
235
|
-
|
|
136
|
+
visitIdentifier?: (ctx: IdentifierContext) => Result;
|
|
236
137
|
/**
|
|
237
|
-
* Visit a parse tree produced by `OpraFilterParser.
|
|
138
|
+
* Visit a parse tree produced by `OpraFilterParser.arrayValue`.
|
|
238
139
|
* @param ctx the parse tree
|
|
239
140
|
* @return the visitor result
|
|
240
141
|
*/
|
|
241
|
-
|
|
142
|
+
visitArrayValue?: (ctx: ArrayValueContext) => Result;
|
|
242
143
|
/**
|
|
243
144
|
* Visit a parse tree produced by `OpraFilterParser.boolean`.
|
|
244
145
|
* @param ctx the parse tree
|
|
@@ -257,4 +158,28 @@ export default class OpraFilterVisitor<Result> extends ParseTreeVisitor<Result>
|
|
|
257
158
|
* @return the visitor result
|
|
258
159
|
*/
|
|
259
160
|
visitInfinity?: (ctx: InfinityContext) => Result;
|
|
161
|
+
/**
|
|
162
|
+
* Visit a parse tree produced by `OpraFilterParser.arithmeticOperator`.
|
|
163
|
+
* @param ctx the parse tree
|
|
164
|
+
* @return the visitor result
|
|
165
|
+
*/
|
|
166
|
+
visitArithmeticOperator?: (ctx: ArithmeticOperatorContext) => Result;
|
|
167
|
+
/**
|
|
168
|
+
* Visit a parse tree produced by `OpraFilterParser.comparisonOperator`.
|
|
169
|
+
* @param ctx the parse tree
|
|
170
|
+
* @return the visitor result
|
|
171
|
+
*/
|
|
172
|
+
visitComparisonOperator?: (ctx: ComparisonOperatorContext) => Result;
|
|
173
|
+
/**
|
|
174
|
+
* Visit a parse tree produced by `OpraFilterParser.logicalOperator`.
|
|
175
|
+
* @param ctx the parse tree
|
|
176
|
+
* @return the visitor result
|
|
177
|
+
*/
|
|
178
|
+
visitLogicalOperator?: (ctx: LogicalOperatorContext) => Result;
|
|
179
|
+
/**
|
|
180
|
+
* Visit a parse tree produced by `OpraFilterParser.polarityOperator`.
|
|
181
|
+
* @param ctx the parse tree
|
|
182
|
+
* @return the visitor result
|
|
183
|
+
*/
|
|
184
|
+
visitPolarityOperator?: (ctx: PolarityOperatorContext) => Result;
|
|
260
185
|
}
|
package/types/filter/ast/expressions/{parentheses-expression.d.ts → negative-expression.d.ts}
RENAMED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Expression } from '../abstract/expression.js';
|
|
2
|
-
export declare class
|
|
2
|
+
export declare class NegativeExpression extends Expression {
|
|
3
3
|
expression: Expression;
|
|
4
4
|
constructor(expression: Expression);
|
|
5
5
|
toString(): string;
|
|
@@ -6,7 +6,8 @@ export * from './expressions/arithmetic-expression.js';
|
|
|
6
6
|
export * from './expressions/array-expression.js';
|
|
7
7
|
export * from './expressions/comparison-expression.js';
|
|
8
8
|
export * from './expressions/logical-expression.js';
|
|
9
|
-
export * from './expressions/
|
|
9
|
+
export * from './expressions/parenthesized-expression.js';
|
|
10
|
+
export * from './expressions/negative-expression.js';
|
|
10
11
|
export * from './terms/boolean-literal.js';
|
|
11
12
|
export * from './terms/date-literal.js';
|
|
12
13
|
export * from './terms/null-literal.js';
|
package/types/filter/build.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ArithmeticExpression, ArrayExpression, ComparisonExpression, DateLiteral, Expression, LogicalExpression, NumberLiteral,
|
|
1
|
+
import { ArithmeticExpression, ArrayExpression, ComparisonExpression, DateLiteral, Expression, LogicalExpression, NumberLiteral, ParenthesizedExpression, QualifiedIdentifier, TimeLiteral } from './ast/index.js';
|
|
2
2
|
type _EntryValue = Expression | string | number | bigint | boolean | null | Date;
|
|
3
3
|
export type EntryValue = _EntryValue | _EntryValue[];
|
|
4
4
|
export declare function $or(...items: Expression[]): LogicalExpression;
|
|
@@ -20,7 +20,7 @@ export declare function $like(left: EntryValue, right: EntryValue): ComparisonEx
|
|
|
20
20
|
export declare function $notLike(left: _EntryValue, right: _EntryValue): ComparisonExpression;
|
|
21
21
|
export declare function $ilike(left: _EntryValue, right: _EntryValue): ComparisonExpression;
|
|
22
22
|
export declare function $notILike(left: _EntryValue, right: _EntryValue): ComparisonExpression;
|
|
23
|
-
export declare function $paren(expression: Expression):
|
|
23
|
+
export declare function $paren(expression: Expression): ParenthesizedExpression;
|
|
24
24
|
type MathExpression = ArithmeticExpression & {
|
|
25
25
|
add(expression: EntryValue): MathExpression;
|
|
26
26
|
sub(expression: EntryValue): MathExpression;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { ParseTreeVisitor as TParseTreeVisitor, RuleNode } from '@browsery/antlr4';
|
|
2
|
-
import {
|
|
2
|
+
import { ArrayValueContext, BooleanLiteralContext, ComparisonExpressionContext, DateLiteralContext, DateTimeLiteralContext, ExternalConstantContext, LogicalExpressionContext, NegativeExpressionContext, NumberLiteralContext, ParenthesizedExpressionContext, ParenthesizedItemContext, QualifiedIdentifierContext, RootContext, StringLiteralContext, TimeLiteralContext } from './antlr/OpraFilterParser.js';
|
|
3
3
|
import OpraFilterVisitor from './antlr/OpraFilterVisitor.js';
|
|
4
|
-
import {
|
|
4
|
+
import { ArrayExpression, BooleanLiteral, DateLiteral, LogicalExpression, NegativeExpression, NullLiteral, NumberLiteral, ParenthesizedExpression, QualifiedIdentifier, StringLiteral, TimeLiteral } from './ast/index.js';
|
|
5
5
|
import { ExternalConstant } from './ast/terms/external-constant.js';
|
|
6
6
|
declare const ParseTreeVisitor: typeof TParseTreeVisitor;
|
|
7
7
|
export declare class FilterTreeVisitor extends ParseTreeVisitor<any> implements OpraFilterVisitor<any> {
|
|
@@ -12,7 +12,13 @@ export declare class FilterTreeVisitor extends ParseTreeVisitor<any> implements
|
|
|
12
12
|
visitChildren(node: RuleNode): any;
|
|
13
13
|
protected defaultResult(): any;
|
|
14
14
|
visitRoot(ctx: RootContext): any;
|
|
15
|
-
|
|
15
|
+
visitParenthesizedExpression(ctx: ParenthesizedExpressionContext): ParenthesizedExpression;
|
|
16
|
+
visitParenthesizedItem(ctx: ParenthesizedItemContext): any;
|
|
17
|
+
visitNegativeExpression(ctx: NegativeExpressionContext): NegativeExpression;
|
|
18
|
+
visitComparisonExpression(ctx: ComparisonExpressionContext): any;
|
|
19
|
+
visitLogicalExpression(ctx: LogicalExpressionContext): LogicalExpression;
|
|
20
|
+
visitQualifiedIdentifier(ctx: QualifiedIdentifierContext): QualifiedIdentifier;
|
|
21
|
+
visitExternalConstant(ctx: ExternalConstantContext): ExternalConstant;
|
|
16
22
|
visitNullLiteral(): NullLiteral;
|
|
17
23
|
visitBooleanLiteral(ctx: BooleanLiteralContext): BooleanLiteral;
|
|
18
24
|
visitNumberLiteral(ctx: NumberLiteralContext): NumberLiteral;
|
|
@@ -21,13 +27,6 @@ export declare class FilterTreeVisitor extends ParseTreeVisitor<any> implements
|
|
|
21
27
|
visitDateLiteral(ctx: DateLiteralContext): DateLiteral;
|
|
22
28
|
visitDateTimeLiteral(ctx: DateTimeLiteralContext): DateLiteral;
|
|
23
29
|
visitTimeLiteral(ctx: TimeLiteralContext): TimeLiteral;
|
|
24
|
-
|
|
25
|
-
visitPolarityExpression(ctx: PolarityExpressionContext): any;
|
|
26
|
-
visitExternalConstantTerm(ctx: ExternalConstantTermContext): ExternalConstant;
|
|
27
|
-
visitParenthesizedExpression(ctx: ParenthesizedExpressionContext): ParenthesesExpression;
|
|
28
|
-
visitArrayExpression(ctx: ArrayExpressionContext): ArrayExpression;
|
|
29
|
-
visitComparisonExpression(ctx: ComparisonExpressionContext): any;
|
|
30
|
-
visitLogicalExpression(ctx: LogicalExpressionContext): LogicalExpression;
|
|
31
|
-
visitArithmeticExpression(ctx: ArithmeticExpressionContext): ArithmeticExpression;
|
|
30
|
+
visitArrayValue(ctx: ArrayValueContext): ArrayExpression;
|
|
32
31
|
}
|
|
33
32
|
export {};
|
package/types/filter/index.d.ts
CHANGED
package/types/filter/parse.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import type { ParseTreeVisitor } from '@browsery/antlr4';
|
|
2
|
-
export declare function
|
|
2
|
+
export declare function parse(text: string, visitor?: ParseTreeVisitor<any>): any;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/// <reference types="node" />
|
|
2
2
|
/// <reference types="node" />
|
|
3
|
-
import { HeaderInfo, ParserType } from 'http-parser-js';
|
|
4
3
|
import stream from 'stream';
|
|
4
|
+
import { HeaderInfo, ParserType } from '@browsery/http-parser';
|
|
5
5
|
import { HttpHeaders } from './http-headers.js';
|
|
6
6
|
declare const kHeaders: unique symbol;
|
|
7
7
|
declare const kHeadersProxy: unique symbol;
|
package/types/i18n/i18n.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { FallbackLng, Formatter as I18nextFormatter, i18n, InitOptions as I18nextInitOptions, Resource as I18nextResource, TFunction as I18nextTFunction, TOptions } from 'i18next';
|
|
2
|
-
import * as I18next from 'i18next';
|
|
3
1
|
import { Type } from 'ts-gems';
|
|
2
|
+
import { FallbackLng, Formatter as I18nextFormatter, i18n, InitOptions as I18nextInitOptions, Resource as I18nextResource, TFunction as I18nextTFunction, TOptions } from '@browsery/i18next';
|
|
3
|
+
import * as I18next from '@browsery/i18next';
|
|
4
4
|
export type BaseI18n = Type<I18next.i18n>;
|
|
5
5
|
export declare const BaseI18n: BaseI18n;
|
|
6
6
|
export type DeepTranslateOptions = TOptions & {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { TOptions } from 'i18next';
|
|
1
|
+
import { TOptions } from '@browsery/i18next';
|
|
2
2
|
export declare function translate(key: string, options?: TOptions<Record<string, any>>): string;
|
|
3
3
|
export declare function translate(key: string, options: TOptions<Record<string, any>>, fallback: string): string;
|
|
4
4
|
export declare function translate(key: string, fallback: string): string;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Type } from 'ts-gems';
|
|
2
2
|
import type { DataType, DataTypeBase } from './data-type.interface.js';
|
|
3
|
-
import { Field } from './field.interface.js';
|
|
3
|
+
import type { Field } from './field.interface.js';
|
|
4
4
|
import type { MappedType } from './mapped-type.interface.js';
|
|
5
5
|
import type { UnionType } from './union-type.interface.js';
|
|
6
6
|
export interface ComplexType extends DataTypeBase {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { OpraFilter } from '../../filter/index.js';
|
|
2
2
|
import type { Field } from '../data-type/field.interface';
|
|
3
3
|
export interface Endpoint {
|
|
4
4
|
description?: string;
|
|
@@ -11,7 +11,7 @@ export declare namespace _Operation {
|
|
|
11
11
|
interface Filter {
|
|
12
12
|
filters?: {
|
|
13
13
|
field: Field.QualifiedName;
|
|
14
|
-
operators?: ComparisonOperator[];
|
|
14
|
+
operators?: OpraFilter.ComparisonOperator[];
|
|
15
15
|
}[];
|
|
16
16
|
}
|
|
17
17
|
interface InputPickOmit {
|