udi-yac 0.2.4 → 0.3.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.
- package/README.md +38 -25
- package/dist/{ce-entry-CLKEbGj8.js → ce-entry-BN36qTNy.js} +21608 -21351
- package/dist/src/app/ErrorBoundary.d.ts +1 -1
- package/dist/src/app/UDIChatConfig.d.ts +9 -0
- package/dist/src/app/validateConfig.d.ts +0 -12
- package/dist/src/components/FieldTooltipContent.d.ts +12 -0
- package/dist/src/components/ui/accordion.d.ts +8 -1
- package/dist/src/features/chat/components/BrushFilterWidgets.d.ts +8 -0
- package/dist/src/features/dashboard/components/VizTweakComponent.types.d.ts +9 -0
- package/dist/src/features/dashboard/hooks/useBrushFilters.d.ts +45 -0
- package/dist/src/features/dashboard/hooks/useBrushFilters.test.d.ts +1 -0
- package/dist/src/features/dashboard/index.d.ts +1 -0
- package/dist/src/features/dashboard/utils/relevantTableMapping.d.ts +21 -0
- package/dist/src/features/dashboard/utils/relevantTableMapping.test.d.ts +1 -0
- package/dist/src/features/dashboard/utils/tweakability.d.ts +31 -14
- package/dist/src/features/data-package/components/DataOverviewPanel.d.ts +10 -0
- package/dist/src/features/data-package/components/DataOverviewPanel.test.d.ts +1 -0
- package/dist/src/features/data-package/components/EntityOverview.d.ts +10 -0
- package/dist/src/features/data-package/index.d.ts +1 -0
- package/dist/src/features/data-package/stores/dataPackageStore.d.ts +14 -0
- package/dist/src/features/data-package/utils/entityOverview.d.ts +136 -0
- package/dist/src/features/data-package/utils/entityOverview.test.d.ts +1 -0
- package/dist/src/features/tool-calls/components/IntervalFilterComponent.d.ts +8 -1
- package/dist/src/features/tool-calls/components/PointFilterComponent.d.ts +7 -1
- package/dist/src/features/tool-calls/components/PointFilterComponent.test.d.ts +1 -0
- package/dist/src/features/tool-calls/index.d.ts +2 -0
- package/dist/src/lib/chatRoot.d.ts +7 -0
- package/dist/src/stores/globalStore.d.ts +10 -0
- package/dist/src/utils/entityIcons.d.ts +10 -0
- package/dist/src/utils/highlightMatch.d.ts +7 -0
- package/dist/src/utils/httpError.d.ts +11 -0
- package/dist/src/utils/httpError.test.d.ts +1 -0
- package/dist/src/utils/specMutations.d.ts +73 -17
- package/dist/udi-yac.css +1 -1
- package/dist/udi-yac.js +29237 -27904
- package/package.json +5 -4
|
@@ -20,26 +20,82 @@ import { UDIGrammar } from 'udi-toolkit/react';
|
|
|
20
20
|
*/
|
|
21
21
|
export declare function setMappingFieldByEncoding(spec: UDIGrammar, encoding: string, newField: string): UDIGrammar;
|
|
22
22
|
/**
|
|
23
|
-
* Collect the set of source-field names
|
|
24
|
-
*
|
|
25
|
-
*
|
|
26
|
-
*
|
|
27
|
-
*
|
|
28
|
-
*
|
|
29
|
-
*
|
|
30
|
-
* Schema-defining operators — covered here:
|
|
31
|
-
* groupby row keys of the output
|
|
23
|
+
* Collect the set of source-field names referenced by an operator we cannot
|
|
24
|
+
* swap in-place. A mapping whose `field` belongs to this set is not offered as
|
|
25
|
+
* a plain field swap — rewriting only the mapping would leave the pipeline
|
|
26
|
+
* pointing at the old field, producing a silently-broken chart.
|
|
27
|
+
*
|
|
28
|
+
* Locked operators — no supported swap:
|
|
32
29
|
* binby `.field` becomes bin input; output replaces the row schema
|
|
33
|
-
* rollup each aggregation's `.field` is an input to the op; when a
|
|
34
|
-
* mapping references that same field elsewhere, orphaning it
|
|
35
|
-
* breaks the rollup
|
|
36
|
-
* kde `.field` is the density-estimation input
|
|
37
30
|
* join `.on` fields define the join key
|
|
38
31
|
*
|
|
39
|
-
*
|
|
40
|
-
*
|
|
32
|
+
* NOT locked (swappable via a transform-aware mutation instead):
|
|
33
|
+
* groupby swappable via swapDimensionField — rewrites the groupby entry
|
|
34
|
+
* (and dependent rollup output columns) alongside the mapping
|
|
35
|
+
* rollup each aggregation's `.field` is swappable via swapMeasureField —
|
|
36
|
+
* the mapping references the rollup *output* column, not the input
|
|
37
|
+
* kde swappable via swapPlainField — the density input; its output
|
|
38
|
+
* `sample` column is named after the field, so a plain field swap
|
|
39
|
+
* renames kde.field + kde.output.sample alongside the mapping
|
|
40
|
+
*
|
|
41
|
+
* Skipped (schema-preserving; don't lock a swap, but ARE followed when the
|
|
42
|
+
* swapped field is fully replaced — see swapPlainField / applyRenamePlan):
|
|
43
|
+
* filter row-count-only effect, schema unchanged
|
|
41
44
|
* orderby sort only; schema unchanged
|
|
42
|
-
* derive only creates new output fields
|
|
43
|
-
* (would need a parser to extract source-field references safely)
|
|
45
|
+
* derive only creates new output fields
|
|
44
46
|
*/
|
|
45
47
|
export declare function collectLockedFields(spec: UDIGrammar): Set<string>;
|
|
48
|
+
/** The group-by dimension field names referenced anywhere in the pipeline. */
|
|
49
|
+
export declare function collectGroupbyFields(spec: UDIGrammar): Set<string>;
|
|
50
|
+
export interface RollupOutput {
|
|
51
|
+
op?: string;
|
|
52
|
+
field?: string;
|
|
53
|
+
}
|
|
54
|
+
/**
|
|
55
|
+
* Map each rollup *output column name* to its aggregation. Encoding mappings
|
|
56
|
+
* reference these output names (e.g. `sex_count`, `avg_age`), not the raw
|
|
57
|
+
* input field — so this is how the tweak UI recognises an aggregated measure
|
|
58
|
+
* and decides whether it has a swappable input `field` (count/frequency don't).
|
|
59
|
+
* Last write wins if two rollups reuse a name (grammar disallows this anyway).
|
|
60
|
+
*/
|
|
61
|
+
export declare function collectRollupOutputs(spec: UDIGrammar): Record<string, RollupOutput>;
|
|
62
|
+
/**
|
|
63
|
+
* Swap the group-by dimension shown on ONE encoding (e.g. the x axis, sex →
|
|
64
|
+
* race), keeping the aggregation. The mapping rewrite is scoped to `encoding`,
|
|
65
|
+
* so a field shared by another encoding (a bar with `x=sex` AND `color=sex`) is
|
|
66
|
+
* not disturbed.
|
|
67
|
+
*
|
|
68
|
+
* The groupby is kept consistent with what the chart displays:
|
|
69
|
+
* - if the old field is no longer shown anywhere, it is replaced by `newField`
|
|
70
|
+
* in the groupby, and any rollup output column embedding it (`sex_count`) is
|
|
71
|
+
* renamed (`race_count`) so labels track the swap;
|
|
72
|
+
* - if the old field is still shown on another encoding, `newField` is instead
|
|
73
|
+
* added to the groupby (the chart now groups by both) and nothing else is
|
|
74
|
+
* renamed.
|
|
75
|
+
*
|
|
76
|
+
* Returns the same reference on a no-op (encoding absent, or already newField).
|
|
77
|
+
*/
|
|
78
|
+
export declare function swapDimensionField(spec: UDIGrammar, encoding: string, newField: string): UDIGrammar;
|
|
79
|
+
/**
|
|
80
|
+
* Swap a plain (non-aggregated, non-groupby) field shown on ONE encoding, and
|
|
81
|
+
* follow that field through the pipeline. A raw source field can also drive
|
|
82
|
+
* `orderby` and `filter` steps (e.g. a CDF orders by the plotted field and
|
|
83
|
+
* derives a percentile from that order, and drops its nulls) — rewriting only
|
|
84
|
+
* the mapping would leave the chart ordered/filtered by the old field while
|
|
85
|
+
* plotted against the new one. So:
|
|
86
|
+
* - rewrite only the edited encoding's mapping (scoped, like the dimension swap);
|
|
87
|
+
* - if the old field is still shown on another encoding, stop there (ambiguous
|
|
88
|
+
* which axis the transforms belong to — mirror swapDimensionField);
|
|
89
|
+
* - otherwise rename the old field → new field in orderby + filter refs.
|
|
90
|
+
*
|
|
91
|
+
* Returns the same reference on a no-op.
|
|
92
|
+
*/
|
|
93
|
+
export declare function swapPlainField(spec: UDIGrammar, encoding: string, newField: string): UDIGrammar;
|
|
94
|
+
/**
|
|
95
|
+
* Swap the input field of an aggregated measure (e.g. mean of age → mean of
|
|
96
|
+
* weight). `outputKey` is the rollup output column the encoding is bound to.
|
|
97
|
+
* Renames that rollup's `.field`, renames the output column if it embeds the
|
|
98
|
+
* old field name (`avg_age` → `avg_weight`), and updates the encoding / orderby
|
|
99
|
+
* refs that pointed at it. Leaves the group-by dimension untouched.
|
|
100
|
+
*/
|
|
101
|
+
export declare function swapMeasureField(spec: UDIGrammar, outputKey: string, newField: string): UDIGrammar;
|