@zambon-dev/library 1.3.1 → 1.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
@@ -23,7 +23,117 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
23
23
 
24
24
  ### ⚠ Breaking Changes / Migration
25
25
 
26
- ## [1.3.0] - 2026-07-28
26
+ ## [1.4.0] - 2026-09-08
27
+
28
+ ### Added
29
+
30
+ - **Sidebar menu items can now open an external destination instead of an internal route.**
31
+ `SidebarMenu` gained an optional `openMode` (`SidebarMenuOpenMode`): `Internal` (the default),
32
+ `ExternalNewTab`, or `ExternalEmbedded`. Read it through the exported
33
+ `toSidebarMenuOpenMode(menu.openMode)` helper rather than comparing the field directly — the
34
+ value is deserialized straight from your menu endpoint, so the helper accepts the mode as a
35
+ camelCase string, as a case-insensitive variant of it, or as the enum ordinal an ASP.NET Core
36
+ enum property serializes to. Anything unrecognized — an omitted field from a backend that
37
+ predates this feature, `null`, or a mode a newer version adds — degrades to `Internal`, so a
38
+ menu you have not touched behaves exactly as it does today.
39
+
40
+ - **`SidebarService.menuExternalUrlSelected`** — a separate output carrying the items whose mode
41
+ is not `Internal`. They are deliberately **not** announced on `menuUrlSelected`, which keeps its
42
+ existing contract: the URL it carries is always an Angular route. Acting on external items needs
43
+ `@zambon-dev/shared` (which opens the browser tab or the embedded view), or your own subscription
44
+ to the new output. Until then an external item highlights and does nothing, rather than sending
45
+ `https://…` to the router.
46
+
47
+ - **`SidebarConfigs.externalLinkText`** — the tooltip on items that open in a new browser tab.
48
+ Defaults to `Opens in a new browser tab` and, like `errorText` and `loadingText`, is rendered
49
+ as-is rather than through the translate pipe, so pass an already-localized string.
50
+
51
+ ### Changed
52
+
53
+ - **Selection now follows the open mode.** An item that opens in a new browser tab is treated as an
54
+ action rather than a destination: it takes no selection pill and, importantly, does not clear the
55
+ selection of the view the user is still looking at. Items that open embedded become real
56
+ application tabs and keep today’s selection behaviour exactly. A parent that also carries a URL
57
+ still expands, so it cannot become impossible to open.
58
+
59
+ - **Items that open in a new browser tab show a trailing outbound glyph.** It sits in the same
60
+ absolutely-positioned slot as the parent chevron, so a long label still ellipsises inside the
61
+ anchor and the collapsed rail is unchanged, and it fades in with the sidebar like the other
62
+ affordances. Embedded items get no glyph — they stay inside the application. Items with no
63
+ `openMode`, or with `openMode: Internal`, render exactly as before.
64
+
65
+ ### ⚠ Breaking Changes / Migration
66
+
67
+ None. `openMode` is optional, so a backend that does not send it produces today’s behaviour, and
68
+ `menuUrlSelected` is unchanged for internal items. If you subscribe to `menuUrlSelected` yourself
69
+ and want external items too, add a subscription to `menuExternalUrlSelected`.
70
+
71
+ ## [1.3.2] - 2026-07-30
72
+
73
+ ### Added
74
+
75
+ - **Storybook: `Data Grid/Data Grid ▸ Multi Select Tall Rows` story** — multi-selection over rows
76
+ taller than the default `rowHeight` (41.6px), the height a row needs once it shows a thumbnail.
77
+ Misalignment in the selection column is obvious at that height, so this is the story to check the
78
+ selection checkbox against. Development-only: stories are excluded from the package build.
79
+
80
+ ### Changed
81
+
82
+ - **`lib-ribbon` now hides itself when it contains no visible buttons.** A screen with no ribbon
83
+ actions — a dashboard, or any view that projects an empty `#ribbon` template — previously still
84
+ rendered the bar's border, background and padding around nothing, wasting vertical space at the top
85
+ of the page. This mirrors `lib-ribbon-group`, which already hid itself when none of its children
86
+ were visible. Ribbons with at least one visible group are unaffected. See
87
+ **⚠ Breaking Changes / Migration** below.
88
+
89
+ ### Fixed
90
+
91
+ - **`lib-data-grid`'s multi-selection checkbox is now vertically centred in the row.** The checkbox is
92
+ styled with `vertical-align: super`, which lifts it off the middle of its line box — roughly 6px at
93
+ the default font size. At the default `configs.rowHeight` (41.6px) the drift is easy to miss, but on
94
+ taller rows (say `rowHeight: 56` for a row showing a thumbnail) the checkbox visibly hugged the top
95
+ of the row while the text columns stayed centred. The selection cell now lays its checkbox out as a
96
+ flex item, so it is centred by the box model and `vertical-align` no longer applies to it. The cell
97
+ is also tagged with a `selection` class, mirroring the header's `header-cell selection`. Horizontal
98
+ placement is unchanged, and no consumer changes are required.
99
+ - **Form inputs no longer render a stray bordered box when `type` is set as a static attribute.**
100
+ Angular keeps static attributes in the DOM even when a directive consumes them as an `@Input()`, so
101
+ `<lib-form-input-group type="checkbox">` left a `type="checkbox"` attribute on the host element —
102
+ where `@tailwindcss/forms`' tag-agnostic `[type="checkbox"]` base rules styled the host itself as a
103
+ checkbox (1px border, white fill, `height: 1rem`), drawing an empty-input box around the field row
104
+ and tinting its icon. `FormInputGroupComponent` and `FormInputComponent` now clear the attribute via
105
+ a host binding. This affects every value of `type` (`checkbox`, `date`, `number`, `password`, …);
106
+ both `type="checkbox"` and `[type]="'checkbox'"` now render identically, so existing call sites are
107
+ fixed with no changes required.
108
+ - **`lib-multi-editor` no longer discards rows the user did not type into.** `MultiEditorDataset.newData()`
109
+ exists so implementations can pre-fill a new row, but `onNewClick` reached the form through
110
+ `reset()` + `patchValue()`, which leaves it pristine — and the change tracker only records a row
111
+ while `formGroup.dirty`. Pre-filled values were therefore shown in the grid and then dropped from
112
+ the save batch. The visible symptom was worse than lost defaults: adding several rows and editing
113
+ only the last one saved just that row, because `onSaveClick` validates the current selection only,
114
+ so the earlier rows silently vanished on refresh. `newData()`'s values are now registered when the
115
+ row is added.
116
+
117
+ ### ⚠ Breaking Changes / Migration
118
+
119
+ `lib-multi-editor` now sends rows that `newData()` pre-filled but the user never edited. Nothing to do
120
+ if your `newData()` returns an empty object (`{}`) — the common "blank row" convention — since a
121
+ value-less row is still skipped and the posted batch is byte-for-byte what it was before. If your
122
+ `newData()` *does* return field values, those rows now reach `saveData()` where they were previously
123
+ dropped, so a batch may contain entries it did not before; verify your backend rejects or defaults
124
+ them as you expect.
125
+
126
+ `lib-ribbon` now hides itself when it has neither a visible `lib-ribbon-group` nor any other
127
+ projected content. No action needed if your ribbons use groups (the normal case). The rule is a
128
+ global selector at specificity (0,1,2), so overriding it requires `!important`. Because the bar can
129
+ now appear and disappear rather than merely resize, anything positioned relative to the ribbon may
130
+ shift when a button's visibility resolves (e.g. as permissions arrive).
131
+
132
+ ## [1.3.1] - 2026-07-28
133
+
134
+ > There is no `1.3.0` on npm: the version number was taken by an early publish that was later
135
+ > unpublished, and npm never allows a retired version number to be reused. The sidebar rework below
136
+ > therefore shipped as `1.3.1`. Upgrade straight from `1.2.0` to `1.3.1`.
27
137
 
28
138
  ### Added
29
139
 
@@ -90,7 +200,9 @@ config options and the `getUserProfile()` method still exist but are no longer c
90
200
  available via [GitHub Releases](https://github.com/RicardoZambon/ZLibraries/releases) and the
91
201
  `library-v*` tags.
92
202
 
93
- [Unreleased]: https://github.com/RicardoZambon/ZLibraries/compare/library-v1.3.0...HEAD
94
- [1.3.0]: https://github.com/RicardoZambon/ZLibraries/releases/tag/library-v1.3.0
203
+ [Unreleased]: https://github.com/RicardoZambon/ZLibraries/compare/library-v1.4.0...HEAD
204
+ [1.4.0]: https://github.com/RicardoZambon/ZLibraries/releases/tag/library-v1.4.0
205
+ [1.3.2]: https://github.com/RicardoZambon/ZLibraries/releases/tag/library-v1.3.2
206
+ [1.3.1]: https://github.com/RicardoZambon/ZLibraries/releases/tag/library-v1.3.1
95
207
  [1.2.0]: https://github.com/RicardoZambon/ZLibraries/releases/tag/library-v1.2.0
96
208
  [1.1.1]: https://github.com/RicardoZambon/ZLibraries/releases/tag/library-v1.1.1