@nice2dev/ui-core 1.4.19 → 1.4.21

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,55 @@
1
1
  # @nice2dev/ui-core — Changelog
2
2
 
3
+ ## 1.4.21
4
+
5
+ ### Patch Changes
6
+
7
+ - 15ed387: Controls A (round 44, 1.4.21): forms, navigation and layout fixes from the showcase feedback.
8
+
9
+ - **NiceStepper** (and NiceWizard, which uses it):
10
+ - connectors sit level with the middle of the circle, however many lines a description has;
11
+ - vertical steps centre the circle on the item;
12
+ - steps take `status` (`completed`, `active`, `pending`, `error`, `skipped`) and `description`.
13
+ - **NiceDocumentApprovalFlow** draws its steps with NiceStepper. The decision panel stays.
14
+ - **NiceMenu:** new `panelAnchor: 'item' | 'menu'`. With `'menu'`, `panelAlign` lines the panel up
15
+ with the whole bar.
16
+ - **NiceBottomSheet:**
17
+ - snap points are visible dots (`showSnapPoints`), and clicking one jumps there;
18
+ - the handle is a slider (arrow keys, Home, End);
19
+ - a new `initialSnap` or new `snapPoints` move an open sheet.
20
+ - **NiceSortable:** the drop line is measured from the items. It sits midway between two items, and
21
+ in a row it is as tall as an item. Dragging down drops after the hovered item.
22
+ - **NiceDraggable:** marks itself while dragged (`nice-draggable--dragging`). `NICE_DRAG_MIME` and
23
+ `readNiceDrag()` read a drop.
24
+ - **NiceResponsiveBox** follows its own width with a ResizeObserver: it stacks below `stackBelow`
25
+ (480) and wraps at `minItemWidth`.
26
+ - **NiceIconRail, NiceSortableTree:** `size` scales the buttons, the icons and the text, not only the
27
+ spacing.
28
+ - **NiceLoginForm** (auth): an empty `title` hides the heading.
29
+ - **NiceSpeechToText:** errors read as translated sentences, not browser codes, and a new
30
+ `onError(code)` reports the code.
31
+ - **NiceQuestCard:** at 100 % the bar turns green and shows a check mark.
32
+ - **NiceLeaderboard:** players without a photo get initials on one of six theme tones.
33
+ - **NiceTutorial:** new `showBackButton`, `showCloseButton`, `showProgressBar` and `showSpeedControl`.
34
+ - **NiceEntityEditor:** "Add field" and "New entity" open dialogs.
35
+ - **NiceI18nEditor:**
36
+ - removals ask first (`confirmRemove`);
37
+ - Undo and Redo (Ctrl+Z, Ctrl+Y);
38
+ - `onSave` adds a Save button (Ctrl+S);
39
+ - the buttons are icon-only.
40
+ - **Validation:**
41
+ - rules take a `group`, and NiceValidationBuilder has "+ Group";
42
+ - `evaluateValidation(rules, record, { groups, includeUngrouped })` and `isRecordValid` check only
43
+ the chosen groups.
44
+ - **NiceViewRegistry:** the default registry renders `dataGrid`, `chart`, `kpi` and `badge`, so the
45
+ studio's view preview no longer shows "Unknown control".
46
+ - **NiceGantt:** `dependencyStyle="rounded"` draws curves on every route, including arrows that run
47
+ back to the left and links within one row.
48
+
49
+ ## 1.4.20
50
+
51
+ No changes in this release.
52
+
3
53
  ## 1.4.19
4
54
 
5
55
  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;