@object-ui/plugin-report 4.2.1 → 4.4.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/CHANGELOG.md CHANGED
@@ -1,5 +1,199 @@
1
1
  # @object-ui/plugin-report
2
2
 
3
+ ## 4.4.0
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies [63eb66d]
8
+ - Updated dependencies [2bd45af]
9
+ - @object-ui/fields@4.4.0
10
+ - @object-ui/components@4.4.0
11
+ - @object-ui/plugin-grid@4.4.0
12
+ - @object-ui/types@4.4.0
13
+ - @object-ui/core@4.4.0
14
+ - @object-ui/i18n@4.4.0
15
+ - @object-ui/react@4.4.0
16
+
17
+ ## 4.3.1
18
+
19
+ ### Patch Changes
20
+
21
+ - Updated dependencies [5f4ac6e]
22
+ - Updated dependencies [6b683c8]
23
+ - @object-ui/i18n@4.3.1
24
+ - @object-ui/components@4.3.1
25
+ - @object-ui/fields@4.3.1
26
+ - @object-ui/react@4.3.1
27
+ - @object-ui/plugin-grid@4.3.1
28
+ - @object-ui/types@4.3.1
29
+ - @object-ui/core@4.3.1
30
+
31
+ ## 4.3.0
32
+
33
+ ### Minor Changes
34
+
35
+ - f196cf4: feat(plugin-report): popup picker for groupings + section-aware test ids
36
+
37
+ The matrix/summary "Group by" (rows) and "Columns axis" (cols) sections now
38
+ share the same searchable popup picker as the columns section, with a
39
+ commit-on-select single-pick mode wired through `FieldPickerDialog`.
40
+ - Per-row field buttons display the human-readable field label and open a
41
+ dialog scoped to swap that single field (already-used fields filtered out)
42
+ - "Add grouping" trigger uses the same dialog
43
+ - `GroupingsBuilder` accepts a `testIdPrefix` prop; ReportConfigPanel passes
44
+ `rows-grouping` and `cols-grouping` so both instances no longer share the
45
+ ambiguous `grouping-field-0` testid
46
+ - Bigger row spacing (h-7 / text-xs) — the old `text-[10px]` was unreadable
47
+
48
+ `FieldPickerDialog` gains:
49
+ - `commitOnSelect`: hides the Confirm/Cancel footer; clicking a row commits
50
+ - closes immediately (intended for `singleSelect` flows)
51
+ - `trigger`: custom trigger element override (used by the per-row field button)
52
+
53
+ - 079c3b2: feat(plugin-report): per-block field resolution for joined reports
54
+
55
+ Joined report blocks can override `objectName` to query a different
56
+ object than the container, but the editor was always offering the
57
+ container's fields — wrong field names, wrong types, broken granularity
58
+ and chart-axis filtering.
59
+
60
+ `ReportConfigPanel` now accepts an optional `getFieldsForObject`
61
+ resolver. `JoinedBlocksEditor` uses it to source fields for each
62
+ block based on `block.objectName ?? containerObjectName`, falling
63
+ back to the static `availableFields` when the resolver returns
64
+ `undefined` (unknown object).
65
+
66
+ `ReportView` wires the resolver against the app's loaded `objects`
67
+ list and reuses the same parsing path internally to derive its
68
+ top-level `availableFields`, removing the duplicated schema lookup.
69
+
70
+ 5 new RTL tests verify the resolver wiring, fallback behaviour,
71
+ add-block flow, and inline duplicate-name validation (111 plugin-report
72
+ tests green).
73
+
74
+ - ee1cc96: feat(plugin-report): joined-report block editor
75
+
76
+ `type: 'joined'` reports were a black hole in the editor — the type
77
+ selector exposed them but no UI knew how to edit the `blocks` array,
78
+ so users could neither create nor modify joined reports without
79
+ hand-editing JSON.
80
+
81
+ This change adds a `Blocks` section to the report editor, visible only
82
+ when `type === 'joined'`. Each block renders as a collapsible card with
83
+ its own name (required + unique-validated), label, description, block
84
+ type, object override, and reuses the existing `ColumnsEditor`,
85
+ `GroupingsBuilder`, `SpecFilterAdapter`, and `ChartConfig` builders so
86
+ every block behaves like a mini standalone report — matching the
87
+ runtime contract of `JoinedReportRenderer`.
88
+
89
+ Block-level validation is surfaced in the main `ValidationBanner`:
90
+ empty blocks array, missing or duplicate block names, and blocks
91
+ without columns all become editor-time errors so saves stay safe.
92
+
93
+ The non-joined sections (Columns / Rows / Columns axis / Filters /
94
+ Chart) are hidden when `type === 'joined'` since they live per-block
95
+ in the spec.
96
+
97
+ New exports from `@object-ui/plugin-report`:
98
+ - `JoinedBlocksEditor` — standalone component for embedding the
99
+ block editor anywhere.
100
+ - `validateJoinedBlocks` — pure helper returning translated
101
+ problem strings, suitable for custom validation banners.
102
+ - `ColumnsEditor`, `GroupingsBuilder`, `ChartConfig`,
103
+ `SpecFilterAdapter`, `normalizeColumns` are now exported so
104
+ downstream consumers can build their own report-editor surfaces.
105
+
106
+ i18n: added `report.editor.blocks*` / `report.editor.addBlock` /
107
+ `report.editor.removeBlock` / `report.editor.blockName*` /
108
+ `report.editor.blockLabel*` / `report.editor.blockDescription*` /
109
+ `report.editor.validationJoinedNeedsBlocks` /
110
+ `report.editor.validationBlockNameRequired` /
111
+ `report.editor.validationBlockNameDuplicate` /
112
+ `report.editor.validationBlockNeedsColumns` to en + zh.
113
+
114
+ - 0b032be: feat(plugin-report): replace inline column picker with a popup field picker
115
+
116
+ The columns section now opens a Dialog-based multi-select picker (`FieldPickerDialog`)
117
+ instead of rendering the unselected field list inline. The popup supports search,
118
+ batched multi-selection (commit several fields in one click), per-field type badges,
119
+ cancel-discards-pending semantics, and is fully i18n'd. Also fixes a latent
120
+ `ReferenceError: normalizeColumns is not defined` that crashed the editor whenever
121
+ the chart section was expanded.
122
+
123
+ - 4e7bc1b: **Report editor panel overhaul**
124
+
125
+ The report configuration panel is now safe to open on any spec-shape `Report` and only exposes fields that are actually persisted by `@objectstack/spec`.
126
+
127
+ `@object-ui/plugin-report`:
128
+ - Add a bidirectional `SpecFilterAdapter` so `ReportConfigPanel` can edit
129
+ spec `FilterCondition` filters (`{field: value}`, `{field: {$op: value}}`,
130
+ top-level `$and`/`$or`). Complex / nested filters fall back to a
131
+ read-only banner and are preserved verbatim on save.
132
+ - Drop sections that never round-tripped through the spec
133
+ (`conditionalFormatting`, `sections`, `export`, `schedule`, `appearance`)
134
+ and their helper components.
135
+ - Add type-driven section visibility: `tabular` shows Columns/Filters,
136
+ `summary` adds Rows + Chart, `matrix` adds Rows + Columns axis + Chart.
137
+ - New `GroupingsBuilder` covers `groupingsDown`/`groupingsAcross` with
138
+ `sortOrder` and date-aware `dateGranularity` controls.
139
+ - New `ColumnsEditor` lets users reorder picked columns, override labels,
140
+ set aggregates and choose a display format.
141
+ - Chart subset now mirrors the spec: chart `title`, `showLegend`,
142
+ `showDataLabels`, plus `funnel` (scatter removed).
143
+ - Validation banner highlights missing `objectName` and missing
144
+ rows/columns for `matrix`/`summary` reports.
145
+ - All editor labels and hints are i18n-driven (`report.editor.*`).
146
+ - 18 new unit tests cover the filter adapter round-trip.
147
+
148
+ `@object-ui/components`:
149
+ - `FilterBuilder` now guards against malformed external `value` props.
150
+ Previously a spec-shape filter (`{is_active: true}`) would crash the
151
+ component on first render; the builder now falls back to an empty
152
+ AND group whenever `value` is not a valid `FilterGroup`.
153
+
154
+ `@object-ui/i18n`:
155
+ - Add `report.editor.*` strings to `en` and `zh`.
156
+
157
+ - 8442c05: Improve report editor panel usability based on real-user browser testing:
158
+ - **Wider config panel** — the report editor now defaults to a `--config-panel-width`
159
+ of 440px (up from 280px), driven by a new optional `style` prop on
160
+ `ConfigPanelRenderer`. Long field labels, report titles, type labels, and filter
161
+ rows no longer truncate to "Account Na" / "kup" / "ct" / 1-character widths.
162
+ - **Disambiguated "Columns" sections** — for `summary` and `matrix` reports the
163
+ measure list is now labelled **"Values / 度量"** (pivot-style vocabulary) instead
164
+ of "Columns", which previously clashed with the matrix's pivot column axis
165
+ (also called "Columns / 列"). The two sections used to be indistinguishable.
166
+ New i18n key `report.editor.values` / `valuesHint` is shipped for all 10
167
+ locales (en, zh, ar, de, es, fr, ja, ko, pt, ru).
168
+ - **Reordered sections for matrix/summary** — the editor now surfaces _Rows_
169
+ and _Columns_ (the pivot axes) **before** _Values_, mirroring how a business
170
+ user thinks about a pivot table.
171
+ - **Per-row aggregate/format headers** — each column row in `ColumnsEditor` now
172
+ shows small "Aggregate" / "Format" labels above the respective selects, and
173
+ the row uses a 2-line layout so the label input has its own line. The cramped
174
+ 3-dropdowns-side-by-side layout at 10px font is gone.
175
+ - **Searchable field picker** — the "Add columns" list now has a search box,
176
+ a `filtered / total` counter, an empty-state message, and a scrollable bordered
177
+ container. New i18n keys: `report.editor.searchFields`,
178
+ `report.editor.noMatchingFields`.
179
+
180
+ ### Patch Changes
181
+
182
+ - 12c3b7c: refactor(plugin-report): split ReportConfigPanel.tsx (~1200 lines) into per-builder modules. The orchestrator file now only hosts `buildReportSchema`, `ValidationBanner`, and the public `ReportConfigPanel` component; each sub-editor (`SpecFilterAdapter`, `ColumnsEditor`, `GroupingsBuilder`, `ChartConfig`) lives in its own file alongside `editorTypes.ts` for shared types/constants. All existing exports are re-exported from `ReportConfigPanel` so test files and downstream consumers (`JoinedBlocksEditor`, `app-shell`) keep their current import paths. Pure refactor — no behavior change, 111 tests green.
183
+ - Updated dependencies [f196cf4]
184
+ - Updated dependencies [ee1cc96]
185
+ - Updated dependencies [0b032be]
186
+ - Updated dependencies [115d36a]
187
+ - Updated dependencies [4e7bc1b]
188
+ - Updated dependencies [8442c05]
189
+ - @object-ui/i18n@4.3.0
190
+ - @object-ui/components@4.3.0
191
+ - @object-ui/fields@4.3.0
192
+ - @object-ui/react@4.3.0
193
+ - @object-ui/plugin-grid@4.3.0
194
+ - @object-ui/types@4.3.0
195
+ - @object-ui/core@4.3.0
196
+
3
197
  ## 4.2.1
4
198
 
5
199
  ### Patch Changes