@nice2dev/ui 1.3.11 → 1.3.13
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 +79 -0
- package/dist/NiceModuleLifecyclePanel-BakQIZ5c.js +8418 -0
- package/dist/NiceModuleLifecyclePanel-ui6mzXQS.cjs +1 -0
- package/dist/NiceModuleLifecyclePanel.css +1 -1
- package/dist/index.cjs +238 -238
- package/dist/index.css +1 -1
- package/dist/index.d.ts +697 -3
- package/dist/index.mjs +21737 -19198
- package/dist/navigation.cjs +1 -1
- package/dist/navigation.d.ts +81 -0
- package/dist/navigation.mjs +97 -96
- package/dist/style.css +2 -2
- package/package.json +4 -4
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,84 @@
|
|
|
1
1
|
# [1.0.27] — 2026-06-07
|
|
2
2
|
|
|
3
|
+
## 1.3.13
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 386d332: NiceSidebarNav — favourites lists and a scope bar:
|
|
8
|
+
|
|
9
|
+
- **Favourites lists**:
|
|
10
|
+
- In the Favourites view, a bar under the mode icons picks the list. Arrows at its edges step through the lists. Its middle opens a searchable list that creates a new list and renames or removes the current one; the default list cannot be removed.
|
|
11
|
+
- A new list always gets a name: the search text, or one typed in the field that "New list…" opens. The list has a close button.
|
|
12
|
+
- An item's star now opens the lists, one checkbox each, so an item can be on several lists. The star also creates a new list.
|
|
13
|
+
- `favoritesLayout="tree"` shows a list under the parents its items have in the other tabs (source, role or unit, module, the groups above), with shared parents merged. Its branches fold without folding them in the other tabs, and ✕ takes an item off the list in view. The default is `'list'`, as before.
|
|
14
|
+
- Each favourite keeps the path it was added from (`path`, plain data). Favourites saved earlier are found in `data`. `getFavoritePath` lets the host place a favourite itself. `sidebarFavoriteTree(favorites, pathOf)` builds the same tree for a host's own page.
|
|
15
|
+
- The menu adds "Add to a list…".
|
|
16
|
+
- The default list is still `favorites`, so favourites saved before keep showing.
|
|
17
|
+
- New preference fields: `favoriteLists` (items stored as plain data, an icon only by name) and `activeFavoriteListId`. A host that stores `onPreferencesChange(prefs, changed)` keeps them as it is.
|
|
18
|
+
- New helpers: `toggleFavoriteInList`, `createFavoriteList`, `renameFavoriteList`, `removeFavoriteList`, `setActiveFavoriteList`, `setActiveGroup`. `addFavorite` and `removeFavorite` take an optional `listId`.
|
|
19
|
+
- New readers: `sidebarFavoriteLists`, `sidebarFavoriteItems`, `sidebarFavoriteListsOf`, `activeSidebarFavoriteList`.
|
|
20
|
+
- **By role / By unit** with two or more roles or units: the same bar picks one, and the tree shows its modules right under the source (`activeGroupId` in the preferences). This changes what such users see: before, every role or unit was listed as a group. `groupPicker={false}` keeps the old view. With a single role or unit nothing changes.
|
|
21
|
+
|
|
22
|
+
- 3da5b64: New controls for building menus:
|
|
23
|
+
|
|
24
|
+
- **NiceSortableTree** — a tree to arrange. Drag a node before, after or into another: its subtree goes along, it rides just under the pointer, and a line shows where it lands (or the group it drops into lights up). Ctrl+Shift+↑ / ↓ move a node, Ctrl+Shift+→ / ← indent and outdent it, F2 renames, Delete removes, and the node menu does the same. The value is the nested array itself (`value` / `defaultValue` / `onChange(next, change)`), with `canHaveChildren`, `canDrag`, `canDrop` and `maxDepth`. The pure helpers behind it are exported: `moveTreeNode`, `moveTreeNodeBy`, `indentTreeNode`, `outdentTreeNode`, `insertTreeNode`, `removeTreeNode`, `updateTreeNode`, `treeNodeLocation`, `walkTreeNodes`.
|
|
25
|
+
- **NiceMenuBuilder** — builds a user's menu or a panel from a catalog of every view:
|
|
26
|
+
- The catalog is a tree with cascading checkboxes; checking a view adds it under the groups of its catalog path (`skipLevels`), and a row's grip drags it to a place in the menu.
|
|
27
|
+
- The menu is a NiceSortableTree with groups of your own.
|
|
28
|
+
- An item panel renames items and changes their icons (`renderIconPicker`, e.g. NiceIconPicker), and a live NiceSidebarNav preview shows the result.
|
|
29
|
+
- The value is plain JSON `{ id, ref?, from?, label?, icon?, children? }`. The model is exported: `catalogFromSidebarData`, `addCatalogPages`, `removeCatalogPages`, `insertCatalogNodes`, `menuToSidebarData`, `menuOrphans` and more.
|
|
30
|
+
- **NiceRoleEditor** — edits roles:
|
|
31
|
+
- A list of roles: new, copy, remove; built-in roles are locked.
|
|
32
|
+
- For the selected role: its name, description and the roles it inherits (no loops), and its permissions as a tree with cascading checkboxes. Codes such as `CRM.Account.View` are grouped by their dots; inherited codes show checked, locked and where they come from.
|
|
33
|
+
- The users holding the role, and "Compare roles", which lays every role side by side over the same tree.
|
|
34
|
+
- The model is exported: `permissionTree`, `resolveRolePermissions`, `resolveUserPermissions`, `wouldCreateRoleCycle`, `duplicateRole`, `removeRole`.
|
|
35
|
+
|
|
36
|
+
Guide: `documentation/guides/MENU_AND_ROLES.md`.
|
|
37
|
+
|
|
38
|
+
- d502589: NiceNavShell tabs:
|
|
39
|
+
|
|
40
|
+
- **Dragging** (`reorderableTabs`): the tab follows the pointer and the tabs it passes make room,
|
|
41
|
+
so it shows where the tab lands — no more browser drag image and "not allowed" cursor. Esc
|
|
42
|
+
cancels, the strip scrolls at its edges; Ctrl+Shift+← / → and the tab menu still reorder
|
|
43
|
+
without a mouse.
|
|
44
|
+
- **Merging** (`mergeableTabs`, default `true`): Shift+click selects a range of tabs, Ctrl+click
|
|
45
|
+
(or Ctrl+Space) one more; the tab menu merges them side by side, one under another or in a grid.
|
|
46
|
+
The merged tab shows its pages together in the body, each with a header to open it in its own
|
|
47
|
+
tab or close it, and its menu changes the layout or splits it back into tabs. Merged tabs are
|
|
48
|
+
saved with the tabs; the API adds `mergeTabs(ids, layout)` and `splitTab(id)`, the tab type
|
|
49
|
+
`panes` / `layout` (`NiceNavShellSplitLayout`). Opening a route a merged tab holds focuses it
|
|
50
|
+
there. The tab menu now moves in when opened at the window's edge.
|
|
51
|
+
|
|
52
|
+
NiceSidebarNav: tree indents 30% smaller for trees with many levels — 8px to level 2, then 11px a
|
|
53
|
+
level (`--nice-sidebar-indent-step`, was 12px and 16px).
|
|
54
|
+
|
|
55
|
+
- b16ac2a: Two levels of folding for the shell, both off by default:
|
|
56
|
+
|
|
57
|
+
- **NiceSidebarNav `railItems`** — a column of buttons (an icon with its caption under it) on the outer side of the sidebar.
|
|
58
|
+
- With items, the footer has two buttons. The left one goes a level back (bar → sidebar → icons only), the right one a level on (icons → sidebar → bar).
|
|
59
|
+
- Without items, the footer keeps its single collapse button.
|
|
60
|
+
- A button with a `route` calls `onNavigate`, so in NiceNavShell it opens its tab: `sidebarProps={{ railItems }}`.
|
|
61
|
+
- Related props: `railOpen` / `defaultRailOpen` / `onRailOpenChange`, `railWidth`, `railActiveId`.
|
|
62
|
+
- **NiceNavShell `topBarItems`** — a row of the same buttons under the top bar, hidden until opened.
|
|
63
|
+
- The built-in top bar gets a button for it.
|
|
64
|
+
- A `topNav` slot of your own uses `api.topBarOpen` and `api.setTopBarOpen(open)`.
|
|
65
|
+
- Related props: `topBarOpen` / `defaultTopBarOpen` / `onTopBarOpenChange`.
|
|
66
|
+
- **NiceIconRail** — the bar itself, vertical or horizontal, one tab stop with arrow keys.
|
|
67
|
+
|
|
68
|
+
- Updated dependencies [386d332]
|
|
69
|
+
- Updated dependencies [3da5b64]
|
|
70
|
+
- Updated dependencies [d502589]
|
|
71
|
+
- Updated dependencies [b16ac2a]
|
|
72
|
+
- @nice2dev/i18n@1.3.13
|
|
73
|
+
- @nice2dev/ui-core@1.3.13
|
|
74
|
+
|
|
75
|
+
## 1.3.12
|
|
76
|
+
|
|
77
|
+
### Patch Changes
|
|
78
|
+
|
|
79
|
+
- @nice2dev/i18n@1.3.12
|
|
80
|
+
- @nice2dev/ui-core@1.3.12
|
|
81
|
+
|
|
3
82
|
## 1.3.11
|
|
4
83
|
|
|
5
84
|
### Patch Changes
|