@nice2dev/ui 1.4.23 → 1.4.24

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/dist/index.d.ts CHANGED
@@ -6461,10 +6461,6 @@ export declare const LazyComponents: {
6461
6461
  * Lazy-loaded NiceChart
6462
6462
  */
6463
6463
  Chart: LazyComponentWithPreload<any>;
6464
- /**
6465
- * Lazy-loaded NiceVectorMap
6466
- */
6467
- VectorMap: LazyComponentWithPreload<any>;
6468
6464
  /**
6469
6465
  * Lazy-loaded NiceSankey
6470
6466
  */
@@ -9652,6 +9648,36 @@ export declare interface NiceChartProps extends NiceStandardProps {
9652
9648
  exportable?: boolean;
9653
9649
  }
9654
9650
 
9651
+ export declare const NiceChartRangeSelector: default_2.FC<NiceChartRangeSelectorProps>;
9652
+
9653
+ /** Props for the {@link NiceChartRangeSelector} component — a chart's range window with handles over an optional sparkline. */
9654
+ export declare interface NiceChartRangeSelectorProps extends NiceStandardProps {
9655
+ /** Sparkline data rendered behind the window. */
9656
+ data?: number[];
9657
+ /** Minimum selectable value. */
9658
+ min: number;
9659
+ /** Maximum selectable value. */
9660
+ max: number;
9661
+ /** Current start of the selected range. */
9662
+ start: number;
9663
+ /** Current end of the selected range. */
9664
+ end: number;
9665
+ /** Called when the range changes. */
9666
+ onChange: (start: number, end: number) => void;
9667
+ /** Width in px (the starting width when `responsive`). */
9668
+ width?: number;
9669
+ /** Height in px. */
9670
+ height?: number;
9671
+ /** Step increment. */
9672
+ step?: number;
9673
+ /** Custom value formatter. */
9674
+ formatValue?: (v: number) => string;
9675
+ /** Sparkline fill color. */
9676
+ chartColor?: string;
9677
+ /** Follow the container's width. Default `true`. */
9678
+ responsive?: boolean;
9679
+ }
9680
+
9655
9681
  /** A single data series in a {@link NiceChart}. */
9656
9682
  export declare interface NiceChartSeries {
9657
9683
  name: string;
@@ -14773,22 +14799,47 @@ export declare const NiceHeatMap: default_2.ForwardRefExoticComponent<NiceHeatMa
14773
14799
  displayName: string;
14774
14800
  };
14775
14801
 
14776
- /** Props for the {@link NiceHeatMap} component — a 2D color-intensity grid with optional cell click. */
14802
+ /** Props for the {@link NiceHeatMap} component — a matrix coloured by value. */
14777
14803
  export declare interface NiceHeatMapProps extends NiceStandardProps {
14778
- /** 2D data matrix (rows × cols). */
14779
- data?: number[][];
14780
- /** Column header labels. */
14804
+ /** Matrix of values, rows × columns; `null` is an empty cell. */
14805
+ data?: Array<Array<number | null>>;
14806
+ /** Column labels (along the top). */
14781
14807
  xLabels?: string[];
14782
- /** Row header labels. */
14808
+ /** Row labels (along the left). */
14783
14809
  yLabels?: string[];
14784
- /** Color scale as [min color, max color]. */
14785
- colors?: [string, string];
14786
- /** Called when a cell is clicked. */
14787
- onCellClick?: (row: number, col: number, value: number) => void;
14788
- /** Cell size in px. */
14810
+ /**
14811
+ * Colour stops from low to high: two for a sequential scale, three (low, middle, high) for a
14812
+ * diverging one. Theme colours by default.
14813
+ */
14814
+ colors?: [string, string] | [string, string, string];
14815
+ /** Fires when a cell is clicked. */
14816
+ onCellClick?: (row: number, col: number, value: number | null) => void;
14817
+ /** Smallest cell size in px (cells grow to fill the width when `responsive`). Default 32. */
14789
14818
  cellSize?: number;
14790
- /** Show numeric values inside cells. */
14819
+ /** Write the values in the cells. Default `false` — the colours carry them. 1.4.24. */
14791
14820
  showValues?: boolean;
14821
+ /** Colour scale legend under the matrix. Default `true`. 1.4.24. */
14822
+ showLegend?: boolean;
14823
+ /** Tooltip with the row, the column and the value. Default `true`. 1.4.24. */
14824
+ showTooltip?: boolean;
14825
+ /** Cells fill the container's width. Default `true`. 1.4.24. */
14826
+ responsive?: boolean;
14827
+ /** Low end of the scale (default: the smallest value). 1.4.24. */
14828
+ min?: number;
14829
+ /** High end of the scale (default: the largest value). 1.4.24. */
14830
+ max?: number;
14831
+ /** Gap between cells in px. Default 2. 1.4.24. */
14832
+ cellGap?: number;
14833
+ /** Corner radius of the cells in px. Default 3. 1.4.24. */
14834
+ cellRadius?: number;
14835
+ /** Colour of empty (`null`) cells. 1.4.24. */
14836
+ emptyColor?: string;
14837
+ /** Format a value for the cells, the tooltip and the legend. 1.4.24. */
14838
+ formatValue?: (v: number) => string;
14839
+ /** Title of the column axis. 1.4.24. */
14840
+ xAxisLabel?: string;
14841
+ /** Title of the row axis. 1.4.24. */
14842
+ yAxisLabel?: string;
14792
14843
  }
14793
14844
 
14794
14845
  export declare const NiceHelpDesk: default_2.FC<NiceHelpDeskProps>;
@@ -16792,10 +16843,17 @@ export declare interface NiceMapChartProps extends NiceStandardProps {
16792
16843
  onRegionHover?: (region: MapRegion | null) => void;
16793
16844
  /** Tytuł */
16794
16845
  title?: string;
16795
- /** Niestandardowy SVG mapy */
16846
+ /** Niestandardowy SVG mapy — drawn as a background image (1.4.24: no longer injected as HTML). */
16796
16847
  mapSvg?: string;
16797
16848
  /** Zoom kontrolowany */
16798
16849
  zoomable?: boolean;
16850
+ /** Highlighted region (from the former NiceVectorMap). 1.4.24. */
16851
+ selectedRegionId?: string;
16852
+ /**
16853
+ * Geographic bounds `[west, south, east, north]` of the viewBox: bubbles' `lng` / `lat` are then
16854
+ * projected into it. Without bounds they are viewBox coordinates, as before. 1.4.24.
16855
+ */
16856
+ bounds?: [number, number, number, number];
16799
16857
  }
16800
16858
 
16801
16859
  /** A map marker for the {@link NiceMap} component. */
@@ -16840,18 +16898,6 @@ export declare interface NiceMapProps extends NiceBaseProps {
16840
16898
  provider?: 'osm';
16841
16899
  }
16842
16900
 
16843
- /** A geographic region rendered by the {@link NiceVectorMap}. */
16844
- export declare interface NiceMapRegion {
16845
- /** Unique region identifier (e.g. ISO code). */
16846
- id: string;
16847
- /** Display name. */
16848
- name: string;
16849
- /** SVG path data. */
16850
- path: string;
16851
- /** Data value (drives color intensity). */
16852
- value?: number;
16853
- }
16854
-
16855
16901
  export declare const NiceMarkdownEditor: default_2.ForwardRefExoticComponent<NiceMarkdownEditorProps & default_2.RefAttributes<HTMLDivElement>> & {
16856
16902
  displayName: string;
16857
16903
  };
@@ -18913,6 +18959,18 @@ export declare interface NiceOrganizationChartProps extends NiceStandardProps {
18913
18959
  exportable?: boolean | Array<'svg' | 'png'>;
18914
18960
  /** An export, instead of downloading it (`svg`: the document text, `png`: the image). */
18915
18961
  onExport?: (format: 'svg' | 'png', data: string | Blob) => void;
18962
+ /** Drag the chart with the pointer (the hand). Default `true`. 1.4.24. */
18963
+ pannable?: boolean;
18964
+ /** Zoom with the wheel — `'ctrl'` (default) only with Ctrl / ⌘ held, `true` always. 1.4.24. */
18965
+ wheelZoom?: boolean | 'ctrl';
18966
+ /** A search box in the toolbar: matches are highlighted, expanded and brought into view. 1.4.24. */
18967
+ searchable?: boolean;
18968
+ /** Start with branches below this depth collapsed (0 = only the root open). 1.4.24. */
18969
+ collapsedDepth?: number;
18970
+ /** Keys drawn highlighted. 1.4.24. */
18971
+ highlightKeys?: string[];
18972
+ /** Fires when a node is clicked (with or without `selectable`). 1.4.24. */
18973
+ onNodeClick?: (node: NiceOrgNode) => void;
18916
18974
  }
18917
18975
 
18918
18976
  export { NiceOrganizationProfile }
@@ -20337,34 +20395,6 @@ export declare interface NiceRadioGroupProps extends NiceFormFieldProps {
20337
20395
  direction?: 'horizontal' | 'vertical';
20338
20396
  }
20339
20397
 
20340
- export declare const NiceRangeSelector: default_2.FC<NiceRangeSelectorProps>;
20341
-
20342
- /** Props for the {@link NiceRangeSelector} component — a dual-handle range slider with optional sparkline background. */
20343
- export declare interface NiceRangeSelectorProps extends NiceStandardProps {
20344
- /** Sparkline data rendered behind the handles. */
20345
- data?: number[];
20346
- /** Minimum selectable value. */
20347
- min: number;
20348
- /** Maximum selectable value. */
20349
- max: number;
20350
- /** Current start of the selected range. */
20351
- start: number;
20352
- /** Current end of the selected range. */
20353
- end: number;
20354
- /** Called when the range changes. */
20355
- onChange: (start: number, end: number) => void;
20356
- /** SVG width in px. */
20357
- width?: number;
20358
- /** SVG height in px. */
20359
- height?: number;
20360
- /** Step increment. */
20361
- step?: number;
20362
- /** Custom value formatter. */
20363
- formatValue?: (v: number) => string;
20364
- /** Sparkline fill color. */
20365
- chartColor?: string;
20366
- }
20367
-
20368
20398
  export declare const NiceRangeSlider: default_2.FC<NiceRangeSliderProps>;
20369
20399
 
20370
20400
  /** Props for the {@link NiceRangeSlider} component — a dual-thumb slider for selecting a numeric range. */
@@ -21353,33 +21383,6 @@ export declare interface NiceRulesEngineProps extends NiceBaseProps {
21353
21383
 
21354
21384
  export declare const NiceSankey: default_2.FC<NiceSankeyProps>;
21355
21385
 
21356
- export declare const NiceSankeyChart: default_2.FC<NiceSankeyChartProps>;
21357
-
21358
- export declare interface NiceSankeyChartProps extends NiceStandardProps {
21359
- /** Węzły */
21360
- nodes?: SankeyNode[];
21361
- /** Połączenia */
21362
- links?: SankeyLink[];
21363
- /** Szerokość */
21364
- width?: number;
21365
- /** Wysokość */
21366
- height?: number;
21367
- /** Szerokość węzła */
21368
- nodeWidth?: number;
21369
- /** Padding między węzłami */
21370
- nodePadding?: number;
21371
- /** Pokaż wartości */
21372
- showValues?: boolean;
21373
- /** Pokaż tooltip */
21374
- showTooltip?: boolean;
21375
- /** Callback po kliknięciu węzła */
21376
- onNodeClick?: (node: SankeyNode) => void;
21377
- /** Callback po kliknięciu połączenia */
21378
- onLinkClick?: (link: SankeyLink) => void;
21379
- /** Tytuł */
21380
- title?: string;
21381
- }
21382
-
21383
21386
  /** A flow link between two {@link NiceSankeyNode} entries. */
21384
21387
  export declare interface NiceSankeyLink {
21385
21388
  /** Source node id. */
@@ -21388,14 +21391,18 @@ export declare interface NiceSankeyLink {
21388
21391
  target: string;
21389
21392
  /** Flow magnitude. */
21390
21393
  value: number;
21394
+ /** Link colour (default: a gradient from the source's colour to the target's). */
21395
+ color?: string;
21391
21396
  }
21392
21397
 
21393
21398
  /** A node in the {@link NiceSankey} diagram. */
21394
21399
  export declare interface NiceSankeyNode {
21395
21400
  /** Unique identifier. */
21396
21401
  id: string;
21397
- /** Node label. */
21398
- label: string;
21402
+ /** Node label (default: `name`, then the id). */
21403
+ label?: string;
21404
+ /** Alias of `label`, as in the former NiceSankeyChart. */
21405
+ name?: string;
21399
21406
  /** Node color. */
21400
21407
  color?: string;
21401
21408
  }
@@ -21416,6 +21423,16 @@ export declare interface NiceSankeyProps extends NiceStandardProps {
21416
21423
  nodePadding?: number;
21417
21424
  /** Chart title. */
21418
21425
  title?: string;
21426
+ /** Add each node's total to its label. 1.4.24. */
21427
+ showValues?: boolean;
21428
+ /** Native tooltips on nodes and links. Default `true`. 1.4.24. */
21429
+ showTooltip?: boolean;
21430
+ /** Links drawn as a gradient from the source's colour to the target's. Default `true`. 1.4.24. */
21431
+ gradientLinks?: boolean;
21432
+ /** Fires when a node is clicked. 1.4.24. */
21433
+ onNodeClick?: (node: NiceSankeyNode) => void;
21434
+ /** Fires when a link is clicked. 1.4.24. */
21435
+ onLinkClick?: (link: NiceSankeyLink) => void;
21419
21436
  }
21420
21437
 
21421
21438
  export declare interface NiceSavedQuery {
@@ -23435,6 +23452,12 @@ export declare interface NiceStockChartProps extends NiceStandardProps {
23435
23452
  bullColor?: string;
23436
23453
  /** Color for bearish candles. */
23437
23454
  bearColor?: string;
23455
+ /** Crosshair with the day's open / high / low / close / volume. Default `true`. 1.4.24. */
23456
+ showCrosshair?: boolean;
23457
+ /** Follow the container's width (`width` is the starting size). Default `true`. 1.4.24. */
23458
+ responsive?: boolean;
23459
+ /** Format a price for the axis and the tooltip. Default: two decimals. 1.4.24. */
23460
+ formatPrice?: (v: number) => string;
23438
23461
  }
23439
23462
 
23440
23463
  /** Chart type for the {@link NiceStockChart}. */
@@ -25467,15 +25490,21 @@ export declare interface NiceTreeListProps<T extends NiceTreeListNode = NiceTree
25467
25490
  emptyText?: string;
25468
25491
  }
25469
25492
 
25470
- export declare const NiceTreeMap: default_2.ForwardRefExoticComponent<NiceTreeMapProps & default_2.RefAttributes<HTMLDivElement>> & {
25471
- displayName: string;
25472
- };
25493
+ export declare const NiceTreeMap: default_2.FC<NiceTreeMapProps>;
25473
25494
 
25474
- export declare const NiceTreeMapChart: default_2.FC<NiceTreeMapChartProps>;
25495
+ /** A node of a {@link NiceTreeMap}. */
25496
+ export declare interface NiceTreeMapNode {
25497
+ id: string;
25498
+ name: string;
25499
+ value: number;
25500
+ color?: string;
25501
+ children?: NiceTreeMapNode[];
25502
+ }
25475
25503
 
25476
- export declare interface NiceTreeMapChartProps extends NiceStandardProps {
25504
+ /** Props for {@link NiceTreeMap}. */
25505
+ export declare interface NiceTreeMapProps extends NiceStandardProps {
25477
25506
  /** Dane hierarchiczne. Można też podać płaską listę — zostanie opakowana w wirtualny korzeń. */
25478
- data: TreeMapNode | Array<{
25507
+ data: NiceTreeMapNode | Array<{
25479
25508
  label?: string;
25480
25509
  name?: string;
25481
25510
  value: number;
@@ -25490,7 +25519,7 @@ export declare interface NiceTreeMapChartProps extends NiceStandardProps {
25490
25519
  /** Pokaż wartości */
25491
25520
  showValues?: boolean;
25492
25521
  /** Callback po kliknięciu */
25493
- onNodeClick?: (node: TreeMapNode, path: string[]) => void;
25522
+ onNodeClick?: (node: NiceTreeMapNode, path: string[]) => void;
25494
25523
  /** Umożliw drill-down */
25495
25524
  drilldownEnabled?: boolean;
25496
25525
  /** Kolory */
@@ -25499,34 +25528,6 @@ export declare interface NiceTreeMapChartProps extends NiceStandardProps {
25499
25528
  tilePadding?: number;
25500
25529
  }
25501
25530
 
25502
- /** A hierarchical node in the {@link NiceTreeMap}. */
25503
- export declare interface NiceTreeMapNode {
25504
- /** Unique key. */
25505
- key: string;
25506
- /** Node label. */
25507
- label: string;
25508
- /** Numeric weight (determines area). */
25509
- value: number;
25510
- /** Node color. */
25511
- color?: string;
25512
- /** Child nodes. */
25513
- children?: NiceTreeMapNode[];
25514
- }
25515
-
25516
- /** Props for the {@link NiceTreeMap} component — a squarified treemap visualization. */
25517
- export declare interface NiceTreeMapProps extends NiceStandardProps {
25518
- /** Root node. */
25519
- data: NiceTreeMapNode;
25520
- /** SVG width in px. */
25521
- width?: number;
25522
- /** SVG height in px. */
25523
- height?: number;
25524
- /** Called when a leaf node is clicked. */
25525
- onNodeClick?: (node: NiceTreeMapNode) => void;
25526
- /** Color palette. */
25527
- colors?: string[];
25528
- }
25529
-
25530
25531
  /** A node in the {@link NiceTreeView} hierarchy. */
25531
25532
  export declare interface NiceTreeNode {
25532
25533
  /** Unique key. */
@@ -26205,35 +26206,6 @@ export declare type NiceValueType = 'text' | 'number' | 'date' | 'boolean' | 'an
26205
26206
 
26206
26207
  export { NiceVariant }
26207
26208
 
26208
- export declare const NiceVectorMap: default_2.FC<NiceVectorMapProps>;
26209
-
26210
- /** Props for the {@link NiceVectorMap} component — an SVG choropleth map with region selection and tooltips. */
26211
- export declare interface NiceVectorMapProps extends NiceStandardProps {
26212
- /** Region definitions. */
26213
- regions?: NiceMapRegion[];
26214
- /** SVG width in px. */
26215
- width?: number;
26216
- /** SVG height in px. */
26217
- height?: number;
26218
- /** SVG viewBox (overrides width/height). */
26219
- viewBox?: string;
26220
- /**
26221
- * Color scale as [min color, max color] — `#rrggbb` hex, interpolated numerically per
26222
- * region (a `var()` token cannot be interpolated).
26223
- */
26224
- colorRange?: [string, string];
26225
- /** Maximum data value (for color interpolation). */
26226
- maxValue?: number;
26227
- /** Called when a region is clicked. */
26228
- onRegionClick?: (region: NiceMapRegion) => void;
26229
- /** Currently selected region id. */
26230
- selectedRegionId?: string;
26231
- /** Map title. */
26232
- title?: string;
26233
- /** Show tooltip on hover. */
26234
- showTooltip?: boolean;
26235
- }
26236
-
26237
26209
  export declare function NiceVideoAnnotator({ video: initialVideo, annotations: initialAnnotations, markers: initialMarkers, transcription: initialTranscription, speakers: initialSpeakers, currentUser, enableSpatialAnnotations, enableTranscription, enableComments, enableReview: _enableReview, autoSaveInterval: _autoSaveInterval, onAnnotationsChange, onMarkersChange, onTranscriptionChange: _onTranscriptionChange, onAutoSave: _onAutoSave, onFrameExtracted, renderAnnotation, editorSize, className, style, children, ...baseProps }: NiceVideoAnnotatorProps): default_2.JSX.Element;
26238
26210
 
26239
26211
  export declare interface NiceVideoAnnotatorProps extends NiceBaseProps {
@@ -28967,21 +28939,6 @@ export declare interface SalesforceConnectorConfig extends ConnectorConfig {
28967
28939
  };
28968
28940
  }
28969
28941
 
28970
- export declare interface SankeyLink {
28971
- source: string;
28972
- target: string;
28973
- value: number;
28974
- color?: string;
28975
- }
28976
-
28977
- export declare interface SankeyNode {
28978
- id: string;
28979
- name?: string;
28980
- /** Optional human-readable label. Falls back to `name` when omitted. */
28981
- label?: string;
28982
- color?: string;
28983
- }
28984
-
28985
28942
  export declare const SAPConnector: ConnectorDefinition;
28986
28943
 
28987
28944
  export declare interface SAPConnectorConfig extends ConnectorConfig {
@@ -31472,14 +31429,6 @@ export declare function treeKeyboardMove(e: Pick<KeyboardEvent, 'key' | 'ctrlKey
31472
31429
  */
31473
31430
  export declare function treeKeyboardTarget(move: NiceTreeKeyboardMove, key: string, parentKey: string | null, siblings: readonly string[]): NiceTreeDropTarget | null;
31474
31431
 
31475
- export declare interface TreeMapNode {
31476
- id: string;
31477
- name: string;
31478
- value: number;
31479
- color?: string;
31480
- children?: TreeMapNode[];
31481
- }
31482
-
31483
31432
  /** Levels in a node's subtree: 1 for a node without children. */
31484
31433
  export declare function treeNodeHeight<T>(node: T, options?: TreeEditOptions): number;
31485
31434