@elaraai/e3-ui 1.0.83 → 1.0.85
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/dist/src/bind/data.d.ts +4 -3
- package/dist/src/bind/data.d.ts.map +1 -1
- package/dist/src/bind/data.js +4 -3
- package/dist/src/bind/data.js.map +1 -1
- package/dist/src/bind/record.d.ts +234 -6
- package/dist/src/bind/record.d.ts.map +1 -1
- package/dist/src/bind/record.js +250 -7
- package/dist/src/bind/record.js.map +1 -1
- package/dist/src/bind/sources.d.ts +148 -0
- package/dist/src/bind/sources.d.ts.map +1 -0
- package/dist/src/bind/sources.js +116 -0
- package/dist/src/bind/sources.js.map +1 -0
- package/dist/src/index.d.ts +4 -1
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/index.js +9 -1
- package/dist/src/index.js.map +1 -1
- package/dist/src/internal.d.ts +4 -1
- package/dist/src/internal.d.ts.map +1 -1
- package/dist/src/internal.js +11 -1
- package/dist/src/internal.js.map +1 -1
- package/dist/src/query/builder.d.ts +3257 -0
- package/dist/src/query/builder.d.ts.map +1 -0
- package/dist/src/query/builder.js +126 -0
- package/dist/src/query/builder.js.map +1 -0
- package/dist/src/query/index.d.ts +108 -0
- package/dist/src/query/index.d.ts.map +1 -0
- package/dist/src/query/index.js +76 -0
- package/dist/src/query/index.js.map +1 -0
- package/dist/src/query/library.d.ts +3241 -0
- package/dist/src/query/library.d.ts.map +1 -0
- package/dist/src/query/library.js +114 -0
- package/dist/src/query/library.js.map +1 -0
- package/dist/src/query/queries.d.ts +4696 -0
- package/dist/src/query/queries.d.ts.map +1 -0
- package/dist/src/query/queries.js +129 -0
- package/dist/src/query/queries.js.map +1 -0
- package/dist/src/query/saved.d.ts +72 -0
- package/dist/src/query/saved.d.ts.map +1 -0
- package/dist/src/query/saved.js +84 -0
- package/dist/src/query/saved.js.map +1 -0
- package/dist/src/query/steps.d.ts +613 -0
- package/dist/src/query/steps.d.ts.map +1 -0
- package/dist/src/query/steps.js +316 -0
- package/dist/src/query/steps.js.map +1 -0
- package/dist/src/query/types.d.ts +444 -0
- package/dist/src/query/types.d.ts.map +1 -0
- package/dist/src/query/types.js +113 -0
- package/dist/src/query/types.js.map +1 -0
- package/dist/src/studio/builder.d.ts +3123 -0
- package/dist/src/studio/builder.d.ts.map +1 -0
- package/dist/src/studio/builder.js +115 -0
- package/dist/src/studio/builder.js.map +1 -0
- package/dist/src/studio/canvas.d.ts +83 -0
- package/dist/src/studio/canvas.d.ts.map +1 -0
- package/dist/src/studio/canvas.js +71 -0
- package/dist/src/studio/canvas.js.map +1 -0
- package/dist/src/studio/component.d.ts +178 -0
- package/dist/src/studio/component.d.ts.map +1 -0
- package/dist/src/studio/component.js +189 -0
- package/dist/src/studio/component.js.map +1 -0
- package/dist/src/studio/index.d.ts +104 -0
- package/dist/src/studio/index.d.ts.map +1 -0
- package/dist/src/studio/index.js +75 -0
- package/dist/src/studio/index.js.map +1 -0
- package/dist/src/studio/inspector.d.ts +208 -0
- package/dist/src/studio/inspector.d.ts.map +1 -0
- package/dist/src/studio/inspector.js +155 -0
- package/dist/src/studio/inspector.js.map +1 -0
- package/dist/src/studio/library.d.ts +3506 -0
- package/dist/src/studio/library.d.ts.map +1 -0
- package/dist/src/studio/library.js +245 -0
- package/dist/src/studio/library.js.map +1 -0
- package/dist/src/studio/page.d.ts +305 -0
- package/dist/src/studio/page.d.ts.map +1 -0
- package/dist/src/studio/page.js +105 -0
- package/dist/src/studio/page.js.map +1 -0
- package/dist/src/studio/pages.d.ts +10929 -0
- package/dist/src/studio/pages.d.ts.map +1 -0
- package/dist/src/studio/pages.js +502 -0
- package/dist/src/studio/pages.js.map +1 -0
- package/dist/src/studio/palette.d.ts +179 -0
- package/dist/src/studio/palette.d.ts.map +1 -0
- package/dist/src/studio/palette.js +120 -0
- package/dist/src/studio/palette.js.map +1 -0
- package/dist/src/studio/publish.d.ts +397 -0
- package/dist/src/studio/publish.d.ts.map +1 -0
- package/dist/src/studio/publish.js +198 -0
- package/dist/src/studio/publish.js.map +1 -0
- package/dist/src/ui.d.ts +16 -3
- package/dist/src/ui.d.ts.map +1 -1
- package/dist/src/ui.js +21 -1
- package/dist/src/ui.js.map +1 -1
- package/dist/test/bind/data/data.examples.d.ts +76 -1
- package/dist/test/bind/data/data.examples.d.ts.map +1 -1
- package/dist/test/bind/data/data.examples.js +176 -3
- package/dist/test/bind/data/data.examples.js.map +1 -1
- package/dist/test/bind/func/func.examples.d.ts +8 -0
- package/dist/test/bind/func/func.examples.d.ts.map +1 -1
- package/dist/test/bind/func/func.examples.js +4 -3
- package/dist/test/bind/func/func.examples.js.map +1 -1
- package/dist/test/bind/record/record.examples.d.ts +65 -1
- package/dist/test/bind/record/record.examples.d.ts.map +1 -1
- package/dist/test/bind/record/record.examples.js +21 -3
- package/dist/test/bind/record/record.examples.js.map +1 -1
- package/dist/test/query/query.examples.d.ts +5022 -0
- package/dist/test/query/query.examples.d.ts.map +1 -0
- package/dist/test/query/query.examples.js +467 -0
- package/dist/test/query/query.examples.js.map +1 -0
- package/dist/test/studio/component.examples.d.ts +7 -0
- package/dist/test/studio/component.examples.d.ts.map +1 -0
- package/dist/test/studio/component.examples.js +46 -0
- package/dist/test/studio/component.examples.js.map +1 -0
- package/dist/test/studio/page.examples.d.ts +7 -0
- package/dist/test/studio/page.examples.d.ts.map +1 -0
- package/dist/test/studio/page.examples.js +64 -0
- package/dist/test/studio/page.examples.js.map +1 -0
- package/dist/test/studio/studio.examples.d.ts +1766 -0
- package/dist/test/studio/studio.examples.d.ts.map +1 -0
- package/dist/test/studio/studio.examples.js +354 -0
- package/dist/test/studio/studio.examples.js.map +1 -0
- package/package.json +9 -8
|
@@ -0,0 +1,613 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) 2025 Elara AI Pty Ltd
|
|
3
|
+
* Dual-licensed under AGPL-3.0 and commercial license. See LICENSE for details.
|
|
4
|
+
*/
|
|
5
|
+
/**
|
|
6
|
+
* The query builder's steps (#933) — a query as the builder edits it: a data
|
|
7
|
+
* source and the steps that read it, in plain words.
|
|
8
|
+
*
|
|
9
|
+
* Steps are a projection of a query's jq program: each step prints as a
|
|
10
|
+
* canonical form of jq (`Query Editor Spec.md` §4.7), and a program made of
|
|
11
|
+
* canonical forms parses back into its steps. They are East values, because
|
|
12
|
+
* the builder's edits are drafts of the shared editing session, which holds,
|
|
13
|
+
* compares and diffs its entries as East values. The functions over them —
|
|
14
|
+
* printing, parsing, checking, editing and counting — are e3-ui-components'.
|
|
15
|
+
*
|
|
16
|
+
* A field is named by a string: `"total"`, `"status"` (a variant's case) or
|
|
17
|
+
* `"status.shipped.date"` (a field of a case's payload).
|
|
18
|
+
*
|
|
19
|
+
* @packageDocumentation
|
|
20
|
+
*/
|
|
21
|
+
import { ArrayType, BooleanType, DictType, FloatType, NullType, OptionType, RecursiveType, StringType, StructType, VariantType } from "@elaraai/east";
|
|
22
|
+
/**
|
|
23
|
+
* A value a step compares with or fills in.
|
|
24
|
+
*
|
|
25
|
+
* @property text - Text, a case's name, or a date written as ISO text ("2026-03-01")
|
|
26
|
+
* @property number - A number; a whole one prints as an Integer
|
|
27
|
+
* @property boolean - Yes or no
|
|
28
|
+
* @property null - Nothing
|
|
29
|
+
*/
|
|
30
|
+
export declare const QueryStepValueType: VariantType<{
|
|
31
|
+
readonly text: StringType;
|
|
32
|
+
readonly number: FloatType;
|
|
33
|
+
readonly boolean: BooleanType;
|
|
34
|
+
readonly null: NullType;
|
|
35
|
+
}>;
|
|
36
|
+
/** Type representing a value a step compares with or fills in. */
|
|
37
|
+
export type QueryStepValueType = typeof QueryStepValueType;
|
|
38
|
+
/**
|
|
39
|
+
* A count or a bound a step takes: a number, or the text typed when it is not
|
|
40
|
+
* one, which the check reports.
|
|
41
|
+
*
|
|
42
|
+
* @property number - The number
|
|
43
|
+
* @property text - The text as typed
|
|
44
|
+
*/
|
|
45
|
+
export declare const QueryStepInputType: VariantType<{
|
|
46
|
+
readonly number: FloatType;
|
|
47
|
+
readonly text: StringType;
|
|
48
|
+
}>;
|
|
49
|
+
/** Type representing a count or a bound a step takes. */
|
|
50
|
+
export type QueryStepInputType = typeof QueryStepInputType;
|
|
51
|
+
/**
|
|
52
|
+
* How a step's or a group's conditions combine.
|
|
53
|
+
*
|
|
54
|
+
* @property all - Every condition holds
|
|
55
|
+
* @property any - At least one holds
|
|
56
|
+
*/
|
|
57
|
+
export declare const QueryMatchType: VariantType<{
|
|
58
|
+
readonly all: NullType;
|
|
59
|
+
readonly any: NullType;
|
|
60
|
+
}>;
|
|
61
|
+
/** Type representing how conditions combine. */
|
|
62
|
+
export type QueryMatchType = typeof QueryMatchType;
|
|
63
|
+
/**
|
|
64
|
+
* How a condition compares a field. The builder gives each its words ("is at
|
|
65
|
+
* least"); the field's kind decides which apply.
|
|
66
|
+
*
|
|
67
|
+
* @property eq - Is
|
|
68
|
+
* @property ne - Is not
|
|
69
|
+
* @property ge - Is at least
|
|
70
|
+
* @property le - Is at most
|
|
71
|
+
* @property gt - Is more than
|
|
72
|
+
* @property lt - Is less than
|
|
73
|
+
* @property contains - Contains, for text
|
|
74
|
+
* @property startsWith - Starts with, for text
|
|
75
|
+
* @property missing - Is missing, for an optional field
|
|
76
|
+
* @property present - Has a value, for an optional field
|
|
77
|
+
* @property yes - Is yes
|
|
78
|
+
* @property no - Is no
|
|
79
|
+
* @property inYear - Is in a year, for a date
|
|
80
|
+
* @property inMonth - Is in a month ("2026-03"), for a date
|
|
81
|
+
* @property onOrAfter - Is on or after a day, for a date
|
|
82
|
+
* @property before - Is before a day, for a date
|
|
83
|
+
* @property lengthAtLeast - Has at least a number of items, for a list
|
|
84
|
+
* @property anyWhere - Has an item where an inner condition holds, for a list
|
|
85
|
+
*/
|
|
86
|
+
export declare const QueryComparisonType: VariantType<{
|
|
87
|
+
readonly eq: NullType;
|
|
88
|
+
readonly ne: NullType;
|
|
89
|
+
readonly ge: NullType;
|
|
90
|
+
readonly le: NullType;
|
|
91
|
+
readonly gt: NullType;
|
|
92
|
+
readonly lt: NullType;
|
|
93
|
+
readonly contains: NullType;
|
|
94
|
+
readonly startsWith: NullType;
|
|
95
|
+
readonly missing: NullType;
|
|
96
|
+
readonly present: NullType;
|
|
97
|
+
readonly yes: NullType;
|
|
98
|
+
readonly no: NullType;
|
|
99
|
+
readonly inYear: NullType;
|
|
100
|
+
readonly inMonth: NullType;
|
|
101
|
+
readonly onOrAfter: NullType;
|
|
102
|
+
readonly before: NullType;
|
|
103
|
+
readonly lengthAtLeast: NullType;
|
|
104
|
+
readonly anyWhere: NullType;
|
|
105
|
+
}>;
|
|
106
|
+
/** Type representing how a condition compares a field. */
|
|
107
|
+
export type QueryComparisonType = typeof QueryComparisonType;
|
|
108
|
+
/**
|
|
109
|
+
* A condition of a Keep rows where step: one test of a field, or a group of
|
|
110
|
+
* conditions with its own match.
|
|
111
|
+
*
|
|
112
|
+
* @property test - A field compared: `id` names it for the editing session;
|
|
113
|
+
* `field`, `cmp` and `value` are its slots, empty until chosen; `inner` is
|
|
114
|
+
* the condition on each item of a list (`anyWhere`); `whole` compares a
|
|
115
|
+
* variant as a whole value rather than its case, which the check refuses
|
|
116
|
+
* @property group - Conditions with their own match: `id` names it, `match`
|
|
117
|
+
* combines `conds`
|
|
118
|
+
*/
|
|
119
|
+
export declare const QueryConditionType: RecursiveType<VariantType<{
|
|
120
|
+
readonly test: StructType<{
|
|
121
|
+
readonly id: StringType;
|
|
122
|
+
readonly field: OptionType<StringType>;
|
|
123
|
+
readonly cmp: OptionType<VariantType<{
|
|
124
|
+
readonly eq: NullType;
|
|
125
|
+
readonly ne: NullType;
|
|
126
|
+
readonly ge: NullType;
|
|
127
|
+
readonly le: NullType;
|
|
128
|
+
readonly gt: NullType;
|
|
129
|
+
readonly lt: NullType;
|
|
130
|
+
readonly contains: NullType;
|
|
131
|
+
readonly startsWith: NullType;
|
|
132
|
+
readonly missing: NullType;
|
|
133
|
+
readonly present: NullType;
|
|
134
|
+
readonly yes: NullType;
|
|
135
|
+
readonly no: NullType;
|
|
136
|
+
readonly inYear: NullType;
|
|
137
|
+
readonly inMonth: NullType;
|
|
138
|
+
readonly onOrAfter: NullType;
|
|
139
|
+
readonly before: NullType;
|
|
140
|
+
readonly lengthAtLeast: NullType;
|
|
141
|
+
readonly anyWhere: NullType;
|
|
142
|
+
}>>;
|
|
143
|
+
readonly value: OptionType<VariantType<{
|
|
144
|
+
readonly text: StringType;
|
|
145
|
+
readonly number: FloatType;
|
|
146
|
+
readonly boolean: BooleanType;
|
|
147
|
+
readonly null: NullType;
|
|
148
|
+
}>>;
|
|
149
|
+
readonly inner: OptionType<import("@elaraai/east").RecursiveTypeMarker>;
|
|
150
|
+
readonly whole: BooleanType;
|
|
151
|
+
}>;
|
|
152
|
+
readonly group: StructType<{
|
|
153
|
+
readonly id: StringType;
|
|
154
|
+
readonly match: VariantType<{
|
|
155
|
+
readonly all: NullType;
|
|
156
|
+
readonly any: NullType;
|
|
157
|
+
}>;
|
|
158
|
+
readonly conds: ArrayType<import("@elaraai/east").RecursiveTypeMarker>;
|
|
159
|
+
}>;
|
|
160
|
+
}>>;
|
|
161
|
+
/** Type representing a condition of a Keep rows where step. */
|
|
162
|
+
export type QueryConditionType = typeof QueryConditionType;
|
|
163
|
+
/**
|
|
164
|
+
* What a Group and total step totals with.
|
|
165
|
+
*
|
|
166
|
+
* @property count - How many rows
|
|
167
|
+
* @property sum - Adds up a number
|
|
168
|
+
* @property mean - Averages a number
|
|
169
|
+
* @property min - The lowest
|
|
170
|
+
* @property max - The highest
|
|
171
|
+
* @property distinct - How many different values
|
|
172
|
+
*/
|
|
173
|
+
export declare const QueryAggregateFunctionType: VariantType<{
|
|
174
|
+
readonly count: NullType;
|
|
175
|
+
readonly sum: NullType;
|
|
176
|
+
readonly mean: NullType;
|
|
177
|
+
readonly min: NullType;
|
|
178
|
+
readonly max: NullType;
|
|
179
|
+
readonly distinct: NullType;
|
|
180
|
+
}>;
|
|
181
|
+
/** Type representing what a total totals with. */
|
|
182
|
+
export type QueryAggregateFunctionType = typeof QueryAggregateFunctionType;
|
|
183
|
+
/**
|
|
184
|
+
* One total of a Group and total step.
|
|
185
|
+
*
|
|
186
|
+
* @property id - Names it for the editing session
|
|
187
|
+
* @property fn - What it totals with
|
|
188
|
+
* @property field - The field it totals; `none` for a count, and until chosen
|
|
189
|
+
* @property as - The name of the field it makes. While it is the name the
|
|
190
|
+
* builder gives the total (`count`, the field's, `max_cost`), it follows the
|
|
191
|
+
* total and its field; the jq holds no more than the name, so that is all a
|
|
192
|
+
* total keeps.
|
|
193
|
+
*/
|
|
194
|
+
export declare const QueryAggregateType: StructType<{
|
|
195
|
+
readonly id: StringType;
|
|
196
|
+
readonly fn: VariantType<{
|
|
197
|
+
readonly count: NullType;
|
|
198
|
+
readonly sum: NullType;
|
|
199
|
+
readonly mean: NullType;
|
|
200
|
+
readonly min: NullType;
|
|
201
|
+
readonly max: NullType;
|
|
202
|
+
readonly distinct: NullType;
|
|
203
|
+
}>;
|
|
204
|
+
readonly field: OptionType<StringType>;
|
|
205
|
+
readonly as: StringType;
|
|
206
|
+
}>;
|
|
207
|
+
/** Type representing one total of a Group and total step. */
|
|
208
|
+
export type QueryAggregateType = typeof QueryAggregateType;
|
|
209
|
+
/**
|
|
210
|
+
* What a Group and total step groups by.
|
|
211
|
+
*
|
|
212
|
+
* @property field - One group per value of a field
|
|
213
|
+
* @property all - All rows together, as one group
|
|
214
|
+
*/
|
|
215
|
+
export declare const QueryGroupByType: VariantType<{
|
|
216
|
+
readonly field: StringType;
|
|
217
|
+
readonly all: NullType;
|
|
218
|
+
}>;
|
|
219
|
+
/** Type representing what a Group and total step groups by. */
|
|
220
|
+
export type QueryGroupByType = typeof QueryGroupByType;
|
|
221
|
+
/**
|
|
222
|
+
* Which way a Sort step orders.
|
|
223
|
+
*
|
|
224
|
+
* @property asc - Lowest, earliest or A first
|
|
225
|
+
* @property desc - Highest, latest or Z first
|
|
226
|
+
*/
|
|
227
|
+
export declare const QuerySortDirectionType: VariantType<{
|
|
228
|
+
readonly asc: NullType;
|
|
229
|
+
readonly desc: NullType;
|
|
230
|
+
}>;
|
|
231
|
+
/** Type representing which way a Sort step orders. */
|
|
232
|
+
export type QuerySortDirectionType = typeof QuerySortDirectionType;
|
|
233
|
+
/**
|
|
234
|
+
* The part a Take part of a date step takes.
|
|
235
|
+
*
|
|
236
|
+
* @property year - The year, a whole number
|
|
237
|
+
* @property month - The month, as text ("2026-03")
|
|
238
|
+
* @property weekday - The day of the week, as text ("Monday")
|
|
239
|
+
*/
|
|
240
|
+
export declare const QueryDatePartType: VariantType<{
|
|
241
|
+
readonly year: NullType;
|
|
242
|
+
readonly month: NullType;
|
|
243
|
+
readonly weekday: NullType;
|
|
244
|
+
}>;
|
|
245
|
+
/** Type representing the part a Take part of a date step takes. */
|
|
246
|
+
export type QueryDatePartType = typeof QueryDatePartType;
|
|
247
|
+
/**
|
|
248
|
+
* One field a Show only fields step shows.
|
|
249
|
+
*
|
|
250
|
+
* @property id - Names it for the editing session
|
|
251
|
+
* @property field - The field shown; `none` until chosen
|
|
252
|
+
* @property as - The name it is shown under
|
|
253
|
+
*/
|
|
254
|
+
export declare const QueryPickFieldType: StructType<{
|
|
255
|
+
readonly id: StringType;
|
|
256
|
+
readonly field: OptionType<StringType>;
|
|
257
|
+
readonly as: StringType;
|
|
258
|
+
}>;
|
|
259
|
+
/** Type representing one field a Show only fields step shows. */
|
|
260
|
+
export type QueryPickFieldType = typeof QueryPickFieldType;
|
|
261
|
+
/**
|
|
262
|
+
* One step of a query. Each has an `id`, which names it for the editing
|
|
263
|
+
* session; a slot that is `none` is not chosen yet, and a step with an empty
|
|
264
|
+
* slot it needs is unfinished, and left out of the program.
|
|
265
|
+
*
|
|
266
|
+
* @property filter - Keep rows where: `conds`, combined by `match`
|
|
267
|
+
* @property lookup - Look up from another dataset: the bound `dataset` keyed
|
|
268
|
+
* by `key`, a field of the rows; `fields` are its values' fields brought in
|
|
269
|
+
* @property group - Group and total: `by` a field or all rows together, with
|
|
270
|
+
* `aggs` its totals
|
|
271
|
+
* @property sort - Sort by a `field` in a direction
|
|
272
|
+
* @property limit - Keep the first `n` rows
|
|
273
|
+
* @property count - Count the rows
|
|
274
|
+
* @property pick - Show only these `fields`, each under its name
|
|
275
|
+
* @property fill - Fill in missing values: where `field` is missing, use `value`
|
|
276
|
+
* @property drill - Open each list: one row per item of the list `field`
|
|
277
|
+
* @property datepart - Take part of a date `field`, as a field named `as`
|
|
278
|
+
* @property walk - List every part in the tree, through its list of parts `via`
|
|
279
|
+
* @property tabulate - Try the model over a range: the input `over` from
|
|
280
|
+
* `from` to `to` every `step`, the other inputs `fixed`, the result named `as`
|
|
281
|
+
* @property jq - A jq step: its `text`, checked but not shown as words
|
|
282
|
+
*/
|
|
283
|
+
export declare const QueryStepType: VariantType<{
|
|
284
|
+
readonly filter: StructType<{
|
|
285
|
+
readonly id: StringType;
|
|
286
|
+
readonly match: VariantType<{
|
|
287
|
+
readonly all: NullType;
|
|
288
|
+
readonly any: NullType;
|
|
289
|
+
}>;
|
|
290
|
+
readonly conds: ArrayType<RecursiveType<VariantType<{
|
|
291
|
+
readonly test: StructType<{
|
|
292
|
+
readonly id: StringType;
|
|
293
|
+
readonly field: OptionType<StringType>;
|
|
294
|
+
readonly cmp: OptionType<VariantType<{
|
|
295
|
+
readonly eq: NullType;
|
|
296
|
+
readonly ne: NullType;
|
|
297
|
+
readonly ge: NullType;
|
|
298
|
+
readonly le: NullType;
|
|
299
|
+
readonly gt: NullType;
|
|
300
|
+
readonly lt: NullType;
|
|
301
|
+
readonly contains: NullType;
|
|
302
|
+
readonly startsWith: NullType;
|
|
303
|
+
readonly missing: NullType;
|
|
304
|
+
readonly present: NullType;
|
|
305
|
+
readonly yes: NullType;
|
|
306
|
+
readonly no: NullType;
|
|
307
|
+
readonly inYear: NullType;
|
|
308
|
+
readonly inMonth: NullType;
|
|
309
|
+
readonly onOrAfter: NullType;
|
|
310
|
+
readonly before: NullType;
|
|
311
|
+
readonly lengthAtLeast: NullType;
|
|
312
|
+
readonly anyWhere: NullType;
|
|
313
|
+
}>>;
|
|
314
|
+
readonly value: OptionType<VariantType<{
|
|
315
|
+
readonly text: StringType;
|
|
316
|
+
readonly number: FloatType;
|
|
317
|
+
readonly boolean: BooleanType;
|
|
318
|
+
readonly null: NullType;
|
|
319
|
+
}>>;
|
|
320
|
+
readonly inner: OptionType<import("@elaraai/east").RecursiveTypeMarker>;
|
|
321
|
+
readonly whole: BooleanType;
|
|
322
|
+
}>;
|
|
323
|
+
readonly group: StructType<{
|
|
324
|
+
readonly id: StringType;
|
|
325
|
+
readonly match: VariantType<{
|
|
326
|
+
readonly all: NullType;
|
|
327
|
+
readonly any: NullType;
|
|
328
|
+
}>;
|
|
329
|
+
readonly conds: ArrayType<import("@elaraai/east").RecursiveTypeMarker>;
|
|
330
|
+
}>;
|
|
331
|
+
}>>>;
|
|
332
|
+
}>;
|
|
333
|
+
readonly lookup: StructType<{
|
|
334
|
+
readonly id: StringType;
|
|
335
|
+
readonly dataset: OptionType<StringType>;
|
|
336
|
+
readonly key: OptionType<StringType>;
|
|
337
|
+
readonly fields: ArrayType<StringType>;
|
|
338
|
+
}>;
|
|
339
|
+
readonly group: StructType<{
|
|
340
|
+
readonly id: StringType;
|
|
341
|
+
readonly by: OptionType<VariantType<{
|
|
342
|
+
readonly field: StringType;
|
|
343
|
+
readonly all: NullType;
|
|
344
|
+
}>>;
|
|
345
|
+
readonly aggs: ArrayType<StructType<{
|
|
346
|
+
readonly id: StringType;
|
|
347
|
+
readonly fn: VariantType<{
|
|
348
|
+
readonly count: NullType;
|
|
349
|
+
readonly sum: NullType;
|
|
350
|
+
readonly mean: NullType;
|
|
351
|
+
readonly min: NullType;
|
|
352
|
+
readonly max: NullType;
|
|
353
|
+
readonly distinct: NullType;
|
|
354
|
+
}>;
|
|
355
|
+
readonly field: OptionType<StringType>;
|
|
356
|
+
readonly as: StringType;
|
|
357
|
+
}>>;
|
|
358
|
+
}>;
|
|
359
|
+
readonly sort: StructType<{
|
|
360
|
+
readonly id: StringType;
|
|
361
|
+
readonly field: OptionType<StringType>;
|
|
362
|
+
readonly dir: VariantType<{
|
|
363
|
+
readonly asc: NullType;
|
|
364
|
+
readonly desc: NullType;
|
|
365
|
+
}>;
|
|
366
|
+
}>;
|
|
367
|
+
readonly limit: StructType<{
|
|
368
|
+
readonly id: StringType;
|
|
369
|
+
readonly n: VariantType<{
|
|
370
|
+
readonly number: FloatType;
|
|
371
|
+
readonly text: StringType;
|
|
372
|
+
}>;
|
|
373
|
+
}>;
|
|
374
|
+
readonly count: StructType<{
|
|
375
|
+
readonly id: StringType;
|
|
376
|
+
}>;
|
|
377
|
+
readonly pick: StructType<{
|
|
378
|
+
readonly id: StringType;
|
|
379
|
+
readonly fields: ArrayType<StructType<{
|
|
380
|
+
readonly id: StringType;
|
|
381
|
+
readonly field: OptionType<StringType>;
|
|
382
|
+
readonly as: StringType;
|
|
383
|
+
}>>;
|
|
384
|
+
}>;
|
|
385
|
+
readonly fill: StructType<{
|
|
386
|
+
readonly id: StringType;
|
|
387
|
+
readonly field: OptionType<StringType>;
|
|
388
|
+
readonly value: OptionType<VariantType<{
|
|
389
|
+
readonly text: StringType;
|
|
390
|
+
readonly number: FloatType;
|
|
391
|
+
readonly boolean: BooleanType;
|
|
392
|
+
readonly null: NullType;
|
|
393
|
+
}>>;
|
|
394
|
+
}>;
|
|
395
|
+
readonly drill: StructType<{
|
|
396
|
+
readonly id: StringType;
|
|
397
|
+
readonly field: OptionType<StringType>;
|
|
398
|
+
}>;
|
|
399
|
+
readonly datepart: StructType<{
|
|
400
|
+
readonly id: StringType;
|
|
401
|
+
readonly field: OptionType<StringType>;
|
|
402
|
+
readonly part: VariantType<{
|
|
403
|
+
readonly year: NullType;
|
|
404
|
+
readonly month: NullType;
|
|
405
|
+
readonly weekday: NullType;
|
|
406
|
+
}>;
|
|
407
|
+
readonly as: StringType;
|
|
408
|
+
}>;
|
|
409
|
+
readonly walk: StructType<{
|
|
410
|
+
readonly id: StringType;
|
|
411
|
+
readonly via: OptionType<StringType>;
|
|
412
|
+
}>;
|
|
413
|
+
readonly tabulate: StructType<{
|
|
414
|
+
readonly id: StringType;
|
|
415
|
+
readonly over: StringType;
|
|
416
|
+
readonly from: VariantType<{
|
|
417
|
+
readonly number: FloatType;
|
|
418
|
+
readonly text: StringType;
|
|
419
|
+
}>;
|
|
420
|
+
readonly to: VariantType<{
|
|
421
|
+
readonly number: FloatType;
|
|
422
|
+
readonly text: StringType;
|
|
423
|
+
}>;
|
|
424
|
+
readonly step: VariantType<{
|
|
425
|
+
readonly number: FloatType;
|
|
426
|
+
readonly text: StringType;
|
|
427
|
+
}>;
|
|
428
|
+
readonly fixed: DictType<StringType, VariantType<{
|
|
429
|
+
readonly text: StringType;
|
|
430
|
+
readonly number: FloatType;
|
|
431
|
+
readonly boolean: BooleanType;
|
|
432
|
+
readonly null: NullType;
|
|
433
|
+
}>>;
|
|
434
|
+
readonly as: StringType;
|
|
435
|
+
}>;
|
|
436
|
+
readonly jq: StructType<{
|
|
437
|
+
readonly id: StringType;
|
|
438
|
+
readonly text: StringType;
|
|
439
|
+
}>;
|
|
440
|
+
}>;
|
|
441
|
+
/** Type representing one step of a query. */
|
|
442
|
+
export type QueryStepType = typeof QueryStepType;
|
|
443
|
+
/**
|
|
444
|
+
* A query as steps: the data source it starts from — a field of the root,
|
|
445
|
+
* `orders` for `.orders` — and its steps, in order.
|
|
446
|
+
*
|
|
447
|
+
* @property source - The data source it starts from
|
|
448
|
+
* @property steps - Its steps
|
|
449
|
+
*/
|
|
450
|
+
export declare const QueryStepsType: StructType<{
|
|
451
|
+
readonly source: StringType;
|
|
452
|
+
readonly steps: ArrayType<VariantType<{
|
|
453
|
+
readonly filter: StructType<{
|
|
454
|
+
readonly id: StringType;
|
|
455
|
+
readonly match: VariantType<{
|
|
456
|
+
readonly all: NullType;
|
|
457
|
+
readonly any: NullType;
|
|
458
|
+
}>;
|
|
459
|
+
readonly conds: ArrayType<RecursiveType<VariantType<{
|
|
460
|
+
readonly test: StructType<{
|
|
461
|
+
readonly id: StringType;
|
|
462
|
+
readonly field: OptionType<StringType>;
|
|
463
|
+
readonly cmp: OptionType<VariantType<{
|
|
464
|
+
readonly eq: NullType;
|
|
465
|
+
readonly ne: NullType;
|
|
466
|
+
readonly ge: NullType;
|
|
467
|
+
readonly le: NullType;
|
|
468
|
+
readonly gt: NullType;
|
|
469
|
+
readonly lt: NullType;
|
|
470
|
+
readonly contains: NullType;
|
|
471
|
+
readonly startsWith: NullType;
|
|
472
|
+
readonly missing: NullType;
|
|
473
|
+
readonly present: NullType;
|
|
474
|
+
readonly yes: NullType;
|
|
475
|
+
readonly no: NullType;
|
|
476
|
+
readonly inYear: NullType;
|
|
477
|
+
readonly inMonth: NullType;
|
|
478
|
+
readonly onOrAfter: NullType;
|
|
479
|
+
readonly before: NullType;
|
|
480
|
+
readonly lengthAtLeast: NullType;
|
|
481
|
+
readonly anyWhere: NullType;
|
|
482
|
+
}>>;
|
|
483
|
+
readonly value: OptionType<VariantType<{
|
|
484
|
+
readonly text: StringType;
|
|
485
|
+
readonly number: FloatType;
|
|
486
|
+
readonly boolean: BooleanType;
|
|
487
|
+
readonly null: NullType;
|
|
488
|
+
}>>;
|
|
489
|
+
readonly inner: OptionType<import("@elaraai/east").RecursiveTypeMarker>;
|
|
490
|
+
readonly whole: BooleanType;
|
|
491
|
+
}>;
|
|
492
|
+
readonly group: StructType<{
|
|
493
|
+
readonly id: StringType;
|
|
494
|
+
readonly match: VariantType<{
|
|
495
|
+
readonly all: NullType;
|
|
496
|
+
readonly any: NullType;
|
|
497
|
+
}>;
|
|
498
|
+
readonly conds: ArrayType<import("@elaraai/east").RecursiveTypeMarker>;
|
|
499
|
+
}>;
|
|
500
|
+
}>>>;
|
|
501
|
+
}>;
|
|
502
|
+
readonly lookup: StructType<{
|
|
503
|
+
readonly id: StringType;
|
|
504
|
+
readonly dataset: OptionType<StringType>;
|
|
505
|
+
readonly key: OptionType<StringType>;
|
|
506
|
+
readonly fields: ArrayType<StringType>;
|
|
507
|
+
}>;
|
|
508
|
+
readonly group: StructType<{
|
|
509
|
+
readonly id: StringType;
|
|
510
|
+
readonly by: OptionType<VariantType<{
|
|
511
|
+
readonly field: StringType;
|
|
512
|
+
readonly all: NullType;
|
|
513
|
+
}>>;
|
|
514
|
+
readonly aggs: ArrayType<StructType<{
|
|
515
|
+
readonly id: StringType;
|
|
516
|
+
readonly fn: VariantType<{
|
|
517
|
+
readonly count: NullType;
|
|
518
|
+
readonly sum: NullType;
|
|
519
|
+
readonly mean: NullType;
|
|
520
|
+
readonly min: NullType;
|
|
521
|
+
readonly max: NullType;
|
|
522
|
+
readonly distinct: NullType;
|
|
523
|
+
}>;
|
|
524
|
+
readonly field: OptionType<StringType>;
|
|
525
|
+
readonly as: StringType;
|
|
526
|
+
}>>;
|
|
527
|
+
}>;
|
|
528
|
+
readonly sort: StructType<{
|
|
529
|
+
readonly id: StringType;
|
|
530
|
+
readonly field: OptionType<StringType>;
|
|
531
|
+
readonly dir: VariantType<{
|
|
532
|
+
readonly asc: NullType;
|
|
533
|
+
readonly desc: NullType;
|
|
534
|
+
}>;
|
|
535
|
+
}>;
|
|
536
|
+
readonly limit: StructType<{
|
|
537
|
+
readonly id: StringType;
|
|
538
|
+
readonly n: VariantType<{
|
|
539
|
+
readonly number: FloatType;
|
|
540
|
+
readonly text: StringType;
|
|
541
|
+
}>;
|
|
542
|
+
}>;
|
|
543
|
+
readonly count: StructType<{
|
|
544
|
+
readonly id: StringType;
|
|
545
|
+
}>;
|
|
546
|
+
readonly pick: StructType<{
|
|
547
|
+
readonly id: StringType;
|
|
548
|
+
readonly fields: ArrayType<StructType<{
|
|
549
|
+
readonly id: StringType;
|
|
550
|
+
readonly field: OptionType<StringType>;
|
|
551
|
+
readonly as: StringType;
|
|
552
|
+
}>>;
|
|
553
|
+
}>;
|
|
554
|
+
readonly fill: StructType<{
|
|
555
|
+
readonly id: StringType;
|
|
556
|
+
readonly field: OptionType<StringType>;
|
|
557
|
+
readonly value: OptionType<VariantType<{
|
|
558
|
+
readonly text: StringType;
|
|
559
|
+
readonly number: FloatType;
|
|
560
|
+
readonly boolean: BooleanType;
|
|
561
|
+
readonly null: NullType;
|
|
562
|
+
}>>;
|
|
563
|
+
}>;
|
|
564
|
+
readonly drill: StructType<{
|
|
565
|
+
readonly id: StringType;
|
|
566
|
+
readonly field: OptionType<StringType>;
|
|
567
|
+
}>;
|
|
568
|
+
readonly datepart: StructType<{
|
|
569
|
+
readonly id: StringType;
|
|
570
|
+
readonly field: OptionType<StringType>;
|
|
571
|
+
readonly part: VariantType<{
|
|
572
|
+
readonly year: NullType;
|
|
573
|
+
readonly month: NullType;
|
|
574
|
+
readonly weekday: NullType;
|
|
575
|
+
}>;
|
|
576
|
+
readonly as: StringType;
|
|
577
|
+
}>;
|
|
578
|
+
readonly walk: StructType<{
|
|
579
|
+
readonly id: StringType;
|
|
580
|
+
readonly via: OptionType<StringType>;
|
|
581
|
+
}>;
|
|
582
|
+
readonly tabulate: StructType<{
|
|
583
|
+
readonly id: StringType;
|
|
584
|
+
readonly over: StringType;
|
|
585
|
+
readonly from: VariantType<{
|
|
586
|
+
readonly number: FloatType;
|
|
587
|
+
readonly text: StringType;
|
|
588
|
+
}>;
|
|
589
|
+
readonly to: VariantType<{
|
|
590
|
+
readonly number: FloatType;
|
|
591
|
+
readonly text: StringType;
|
|
592
|
+
}>;
|
|
593
|
+
readonly step: VariantType<{
|
|
594
|
+
readonly number: FloatType;
|
|
595
|
+
readonly text: StringType;
|
|
596
|
+
}>;
|
|
597
|
+
readonly fixed: DictType<StringType, VariantType<{
|
|
598
|
+
readonly text: StringType;
|
|
599
|
+
readonly number: FloatType;
|
|
600
|
+
readonly boolean: BooleanType;
|
|
601
|
+
readonly null: NullType;
|
|
602
|
+
}>>;
|
|
603
|
+
readonly as: StringType;
|
|
604
|
+
}>;
|
|
605
|
+
readonly jq: StructType<{
|
|
606
|
+
readonly id: StringType;
|
|
607
|
+
readonly text: StringType;
|
|
608
|
+
}>;
|
|
609
|
+
}>>;
|
|
610
|
+
}>;
|
|
611
|
+
/** Type representing a query as steps. */
|
|
612
|
+
export type QueryStepsType = typeof QueryStepsType;
|
|
613
|
+
//# sourceMappingURL=steps.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"steps.d.ts","sourceRoot":"","sources":["../../../src/query/steps.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,EACH,SAAS,EACT,WAAW,EACX,QAAQ,EACR,SAAS,EACT,QAAQ,EACR,UAAU,EACV,aAAa,EACb,UAAU,EACV,UAAU,EACV,WAAW,EACd,MAAM,eAAe,CAAC;AAMvB;;;;;;;GAOG;AACH,eAAO,MAAM,kBAAkB;;;;;EAK7B,CAAC;AAEH,kEAAkE;AAClE,MAAM,MAAM,kBAAkB,GAAG,OAAO,kBAAkB,CAAC;AAE3D;;;;;;GAMG;AACH,eAAO,MAAM,kBAAkB;;;EAG7B,CAAC;AAEH,yDAAyD;AACzD,MAAM,MAAM,kBAAkB,GAAG,OAAO,kBAAkB,CAAC;AAM3D;;;;;GAKG;AACH,eAAO,MAAM,cAAc;;;EAGzB,CAAC;AAEH,gDAAgD;AAChD,MAAM,MAAM,cAAc,GAAG,OAAO,cAAc,CAAC;AAEnD;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;;EAmB9B,CAAC;AAEH,0DAA0D;AAC1D,MAAM,MAAM,mBAAmB,GAAG,OAAO,mBAAmB,CAAC;AAE7D;;;;;;;;;;GAUG;AACH,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAc5B,CAAC;AAEJ,+DAA+D;AAC/D,MAAM,MAAM,kBAAkB,GAAG,OAAO,kBAAkB,CAAC;AAM3D;;;;;;;;;GASG;AACH,eAAO,MAAM,0BAA0B;;;;;;;EAOrC,CAAC;AAEH,kDAAkD;AAClD,MAAM,MAAM,0BAA0B,GAAG,OAAO,0BAA0B,CAAC;AAE3E;;;;;;;;;;GAUG;AACH,eAAO,MAAM,kBAAkB;;;;;;;;;;;;EAK7B,CAAC;AAEH,6DAA6D;AAC7D,MAAM,MAAM,kBAAkB,GAAG,OAAO,kBAAkB,CAAC;AAE3D;;;;;GAKG;AACH,eAAO,MAAM,gBAAgB;;;EAG3B,CAAC;AAEH,+DAA+D;AAC/D,MAAM,MAAM,gBAAgB,GAAG,OAAO,gBAAgB,CAAC;AAEvD;;;;;GAKG;AACH,eAAO,MAAM,sBAAsB;;;EAGjC,CAAC;AAEH,sDAAsD;AACtD,MAAM,MAAM,sBAAsB,GAAG,OAAO,sBAAsB,CAAC;AAEnE;;;;;;GAMG;AACH,eAAO,MAAM,iBAAiB;;;;EAI5B,CAAC;AAEH,mEAAmE;AACnE,MAAM,MAAM,iBAAiB,GAAG,OAAO,iBAAiB,CAAC;AAEzD;;;;;;GAMG;AACH,eAAO,MAAM,kBAAkB;;;;EAI7B,CAAC;AAEH,iEAAiE;AACjE,MAAM,MAAM,kBAAkB,GAAG,OAAO,kBAAkB,CAAC;AAM3D;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAiExB,CAAC;AAEH,6CAA6C;AAC7C,MAAM,MAAM,aAAa,GAAG,OAAO,aAAa,CAAC;AAEjD;;;;;;GAMG;AACH,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAGzB,CAAC;AAEH,0CAA0C;AAC1C,MAAM,MAAM,cAAc,GAAG,OAAO,cAAc,CAAC"}
|