@nice2dev/ui-core 1.4.20 → 1.4.22

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,87 @@
1
1
  # @nice2dev/ui-core — Changelog
2
2
 
3
+ ## 1.4.22
4
+
5
+ ### Patch Changes
6
+
7
+ - 4a84396: Controls B (round 44, 1.4.22): editors, tools and media.
8
+
9
+ - **Built-in icons** (`NiceIcon` without a resolver):
10
+ - `refresh` takes NtdRefresh's shape: two arcs with solid heads, replacing the old corner glyph;
11
+ - `grip` is six dots;
12
+ - `indent` and `outdent` are text lines with a solid arrow head;
13
+ - built-ins can now have filled parts.
14
+ - **NiceCaptcha, NicePasswordGenerator:** the refresh button draws the refresh icon, not a CSS ring.
15
+ The captcha button has no frame.
16
+ - **NiceTaskInbox:** the refresh button is a frameless icon button.
17
+ - **NiceGitManager** fills its container, so the width no longer jumps between tabs.
18
+ - **NiceCodeDiffEditor:**
19
+ - it no longer scrolls past the last line;
20
+ - the line-number gutter is narrow, and the +/- markers have a gap before the code;
21
+ - new `options` passes Monaco settings through.
22
+ - **NiceCodeEditor:** the matching bracket pair gets a tinted box, and the bracket-pair guide line is
23
+ gone.
24
+ - **NiceChatWindow:** the hover actions sit centred beside the bubble.
25
+ - **NiceWorkflowInstanceMonitor:** the process name and the instance id are on two lines.
26
+ - **NiceDataExportCenter:**
27
+ - columns move up and down;
28
+ - a column takes its own header name (new `ExportField.header`);
29
+ - export configurations are saved under a name, picked from a list and deleted from the same bar.
30
+ - **NiceGenericPlayer:**
31
+ - dropped audio and video files join the playlist (`allowFileDrop`, `onFilesAdded`), and video
32
+ files play in the stage (new `'video'` source kind);
33
+ - a Playlist button shows and hides the list (`showPlaylist`);
34
+ - `showProControls` hides the shuffle, repeat, speed and A-B row.
35
+ - **NicePianoRoll:**
36
+ - new `snapToGrid` (on by default) snaps a new note to the grid;
37
+ - new `gridDivisions`, `noteLength` and `readOnly`.
38
+
39
+ ## 1.4.21
40
+
41
+ ### Patch Changes
42
+
43
+ - 15ed387: Controls A (round 44, 1.4.21): forms, navigation and layout fixes from the showcase feedback.
44
+
45
+ - **NiceStepper** (and NiceWizard, which uses it):
46
+ - connectors sit level with the middle of the circle, however many lines a description has;
47
+ - vertical steps centre the circle on the item;
48
+ - steps take `status` (`completed`, `active`, `pending`, `error`, `skipped`) and `description`.
49
+ - **NiceDocumentApprovalFlow** draws its steps with NiceStepper. The decision panel stays.
50
+ - **NiceMenu:** new `panelAnchor: 'item' | 'menu'`. With `'menu'`, `panelAlign` lines the panel up
51
+ with the whole bar.
52
+ - **NiceBottomSheet:**
53
+ - snap points are visible dots (`showSnapPoints`), and clicking one jumps there;
54
+ - the handle is a slider (arrow keys, Home, End);
55
+ - a new `initialSnap` or new `snapPoints` move an open sheet.
56
+ - **NiceSortable:** the drop line is measured from the items. It sits midway between two items, and
57
+ in a row it is as tall as an item. Dragging down drops after the hovered item.
58
+ - **NiceDraggable:** marks itself while dragged (`nice-draggable--dragging`). `NICE_DRAG_MIME` and
59
+ `readNiceDrag()` read a drop.
60
+ - **NiceResponsiveBox** follows its own width with a ResizeObserver: it stacks below `stackBelow`
61
+ (480) and wraps at `minItemWidth`.
62
+ - **NiceIconRail, NiceSortableTree:** `size` scales the buttons, the icons and the text, not only the
63
+ spacing.
64
+ - **NiceLoginForm** (auth): an empty `title` hides the heading.
65
+ - **NiceSpeechToText:** errors read as translated sentences, not browser codes, and a new
66
+ `onError(code)` reports the code.
67
+ - **NiceQuestCard:** at 100 % the bar turns green and shows a check mark.
68
+ - **NiceLeaderboard:** players without a photo get initials on one of six theme tones.
69
+ - **NiceTutorial:** new `showBackButton`, `showCloseButton`, `showProgressBar` and `showSpeedControl`.
70
+ - **NiceEntityEditor:** "Add field" and "New entity" open dialogs.
71
+ - **NiceI18nEditor:**
72
+ - removals ask first (`confirmRemove`);
73
+ - Undo and Redo (Ctrl+Z, Ctrl+Y);
74
+ - `onSave` adds a Save button (Ctrl+S);
75
+ - the buttons are icon-only.
76
+ - **Validation:**
77
+ - rules take a `group`, and NiceValidationBuilder has "+ Group";
78
+ - `evaluateValidation(rules, record, { groups, includeUngrouped })` and `isRecordValid` check only
79
+ the chosen groups.
80
+ - **NiceViewRegistry:** the default registry renders `dataGrid`, `chart`, `kpi` and `badge`, so the
81
+ studio's view preview no longer shows "Unknown control".
82
+ - **NiceGantt:** `dependencyStyle="rounded"` draws curves on every route, including arrows that run
83
+ back to the left and links within one row.
84
+
3
85
  ## 1.4.20
4
86
 
5
87
  No changes in this release.
@@ -21,6 +21,18 @@ export interface NiceFieldValidationRule {
21
21
  when?: NiceFilterGroup;
22
22
  /** For `op: 'custom'` — predicate returning `true` when the value is VALID. */
23
23
  validate?: (value: unknown, record: Record<string, unknown>) => boolean;
24
+ /**
25
+ * Validation group (e.g. `'billing'`). `evaluateValidation(rules, record, { groups })` checks only the
26
+ * listed groups — handy for wizards and partial saves. 1.4.21.
27
+ */
28
+ group?: string;
29
+ }
30
+ /** Options for {@link evaluateValidation} / {@link isRecordValid}. 1.4.21. */
31
+ export interface NiceValidationOptions {
32
+ /** Check only the rules of these groups. Omitted = every rule. */
33
+ groups?: string[];
34
+ /** With `groups`, also check the rules that have no group. Default `false`. */
35
+ includeUngrouped?: boolean;
24
36
  }
25
37
  /** A validation problem produced by {@link evaluateValidation}. */
26
38
  export interface NiceFieldValidationIssue {
@@ -40,6 +52,6 @@ export declare function evaluateValidationRule(rule: NiceFieldValidationRule, re
40
52
  * Evaluate all rules against a record, honoring each rule's `when` clause.
41
53
  * Returns one issue per failing rule (empty array ⇒ valid).
42
54
  */
43
- export declare function evaluateValidation(rules: NiceFieldValidationRule[] | undefined, record: Record<string, unknown>): NiceFieldValidationIssue[];
55
+ export declare function evaluateValidation(rules: NiceFieldValidationRule[] | undefined, record: Record<string, unknown>, options?: NiceValidationOptions): NiceFieldValidationIssue[];
44
56
  /** Convenience: does the record satisfy every `error`-severity rule? */
45
- export declare function isRecordValid(rules: NiceFieldValidationRule[] | undefined, record: Record<string, unknown>): boolean;
57
+ export declare function isRecordValid(rules: NiceFieldValidationRule[] | undefined, record: Record<string, unknown>, options?: NiceValidationOptions): boolean;