@nice2dev/ui 1.4.3 → 1.4.5
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 +59 -0
- package/dist/{NiceDataGrid-CrKDzMM1.cjs → NiceDataGrid-mrnaLHQk.cjs} +1 -1
- package/dist/{NiceForm-CT9hEXpc.cjs → NiceForm-O3sv-DNX.cjs} +1 -1
- package/dist/NiceMention-tgJKS8PH.cjs +432 -0
- package/dist/NiceSavedQueryPanel-U1-yaw-Q.cjs +587 -0
- package/dist/{NiceScheduler-BZQAKEVF.cjs → NiceScheduler-Boo-D1S-.cjs} +1 -1
- package/dist/{core-lazy-VTd5zfoZ.cjs → core-lazy-C_qnVGxE.cjs} +1 -1
- package/dist/data/NiceTreeGrid.mjs +519 -458
- package/dist/data.cjs +1 -1
- package/dist/data.d.ts +20 -1
- package/dist/editors/pickers/NiceDateRangeBox.mjs +258 -227
- package/dist/editors/pickers/NiceDateTimePicker.mjs +403 -388
- package/dist/editors/rich/NiceMarkdownEditor.mjs +2 -1
- package/dist/editors/rich/NiceWiki.mjs +225 -158
- package/dist/editors.cjs +1 -1
- package/dist/editors.d.ts +29 -7
- package/dist/index.cjs +112 -112
- package/dist/index.d.ts +110 -8
- package/dist/index.mjs +716 -713
- package/dist/style.css +2 -2
- package/dist/tools/NiceThemeGalleryPicker.mjs +362 -0
- package/package.json +4 -4
- package/dist/NiceMention-BZEHqPrf.cjs +0 -432
- package/dist/NiceSavedQueryPanel-C5Ab_NWx.cjs +0 -587
package/dist/index.d.ts
CHANGED
|
@@ -11989,9 +11989,13 @@ export declare interface NiceDateRangeBoxProps extends NiceFormFieldProps {
|
|
|
11989
11989
|
max?: string;
|
|
11990
11990
|
/** Show a clear button. */
|
|
11991
11991
|
clearable?: boolean;
|
|
11992
|
-
/**
|
|
11992
|
+
/**
|
|
11993
|
+
* Placeholder for the start input. Default: the field's date mask in the locale's order
|
|
11994
|
+
* (`DD.MM.YYYY`), so the format to type in shows (1.4.4 — it was "Start date"); with
|
|
11995
|
+
* `singleField`, both ends' masks (`DD.MM.YYYY – DD.MM.YYYY`).
|
|
11996
|
+
*/
|
|
11993
11997
|
startPlaceholder?: string;
|
|
11994
|
-
/** Placeholder for the end input. */
|
|
11998
|
+
/** Placeholder for the end input. Default: the field's date mask, as the start's. */
|
|
11995
11999
|
endPlaceholder?: string;
|
|
11996
12000
|
/** Label shown above (or before) the start picker. */
|
|
11997
12001
|
startLabel?: string;
|
|
@@ -12000,7 +12004,9 @@ export declare interface NiceDateRangeBoxProps extends NiceFormFieldProps {
|
|
|
12000
12004
|
/**
|
|
12001
12005
|
* Collapse the pair into ONE field with ONE popup: the field shows
|
|
12002
12006
|
* `start – end` and the popup holds a single calendar on which the span is
|
|
12003
|
-
* painted in two clicks. Default `false` (two fields, two popups).
|
|
12007
|
+
* painted in two clicks. Default `false` (two fields, two popups). Both ends can also be typed
|
|
12008
|
+
* into the field through its mask (1.4.4; days, days with a time, months — weeks and times only
|
|
12009
|
+
* pick); an end is set once its half is a real date.
|
|
12004
12010
|
*/
|
|
12005
12011
|
singleField?: boolean;
|
|
12006
12012
|
/** Layout direction for the two pickers (default `horizontal`). */
|
|
@@ -23488,6 +23494,67 @@ export { niceThemeFluent }
|
|
|
23488
23494
|
|
|
23489
23495
|
export { niceThemeFluentV2 }
|
|
23490
23496
|
|
|
23497
|
+
/** A tab of the full gallery. `label` is English; the i18n key is `theme.category.<id>`. */
|
|
23498
|
+
export declare interface NiceThemeGalleryCategory {
|
|
23499
|
+
id: string;
|
|
23500
|
+
label: string;
|
|
23501
|
+
}
|
|
23502
|
+
|
|
23503
|
+
/** One theme of a {@link NiceThemeGalleryPicker}. A {@link NiceThemeCatalogEntry} is one. */
|
|
23504
|
+
export declare interface NiceThemeGalleryItem {
|
|
23505
|
+
/** The theme's name — unique in the gallery, the value it picks. */
|
|
23506
|
+
name: string;
|
|
23507
|
+
theme: NiceTheme;
|
|
23508
|
+
/** The id of its category (the full gallery's tabs). */
|
|
23509
|
+
category?: string;
|
|
23510
|
+
}
|
|
23511
|
+
|
|
23512
|
+
/**
|
|
23513
|
+
* {@link NiceThemeGalleryPicker} — theme cards with large previews in each theme's own colours;
|
|
23514
|
+
* a picker with `value` / `onChange`, and with `limit` one row with a full-screen "Show more".
|
|
23515
|
+
*/
|
|
23516
|
+
export declare const NiceThemeGalleryPicker: default_2.FC<NiceThemeGalleryPickerProps>;
|
|
23517
|
+
|
|
23518
|
+
/** Props for the {@link NiceThemeGalleryPicker} component. */
|
|
23519
|
+
export declare interface NiceThemeGalleryPickerProps extends NiceBaseProps {
|
|
23520
|
+
/** The themes. Default: the built-in catalog (`NICE_THEME_CATALOG_ENTRIES`). */
|
|
23521
|
+
themes?: readonly NiceThemeGalleryItem[];
|
|
23522
|
+
/** The full gallery's category tabs. Default: the built-in catalog's categories. */
|
|
23523
|
+
categories?: readonly NiceThemeGalleryCategory[];
|
|
23524
|
+
/** The picked theme's name — **controlled**. Omit it to let the gallery keep its own pick. */
|
|
23525
|
+
value?: string | null;
|
|
23526
|
+
/** The theme picked first in the uncontrolled mode. Default: none. */
|
|
23527
|
+
defaultValue?: string | null;
|
|
23528
|
+
/** Called when a card is picked, with its name and item. */
|
|
23529
|
+
onChange?: (name: string, item: NiceThemeGalleryItem) => void;
|
|
23530
|
+
/**
|
|
23531
|
+
* Show only this many cards, in one row, and a "Show more" button that opens every theme
|
|
23532
|
+
* full-screen (with search and categories). The picked theme is always among the row's cards.
|
|
23533
|
+
*/
|
|
23534
|
+
limit?: number;
|
|
23535
|
+
/** The width of a card's preview in px. Default 240. */
|
|
23536
|
+
previewWidth?: number;
|
|
23537
|
+
/** A search field over the cards (the full gallery always has one). Default `false`. */
|
|
23538
|
+
searchable?: boolean;
|
|
23539
|
+
/** The gallery's name: the list's accessible name and the full gallery's title. Default "Theme gallery". */
|
|
23540
|
+
label?: string;
|
|
23541
|
+
/** Something more on a card, under its name — a badge, a rating. */
|
|
23542
|
+
renderCardExtra?: (item: NiceThemeGalleryItem) => default_2.ReactNode;
|
|
23543
|
+
/** An extra class for a card (a review status frame). */
|
|
23544
|
+
cardClassName?: (item: NiceThemeGalleryItem) => string | undefined;
|
|
23545
|
+
}
|
|
23546
|
+
|
|
23547
|
+
/**
|
|
23548
|
+
* A theme as a small app, `width` px wide: top bar with a brand mark, a title and an avatar;
|
|
23549
|
+
* sidebar with its header levels, the active row and three items; a page title, two figure cards,
|
|
23550
|
+
* a bar chart and a row of buttons — in the theme's layout colours.
|
|
23551
|
+
*/
|
|
23552
|
+
export declare const NiceThemeGalleryPreview: default_2.FC<{
|
|
23553
|
+
roles: NiceThemePreviewRoles;
|
|
23554
|
+
width?: number;
|
|
23555
|
+
label?: string;
|
|
23556
|
+
}>;
|
|
23557
|
+
|
|
23491
23558
|
export { NiceThemeGradient }
|
|
23492
23559
|
|
|
23493
23560
|
export { niceThemeHighContrast }
|
|
@@ -24277,7 +24344,7 @@ export declare interface NiceTreeContextMenuItem {
|
|
|
24277
24344
|
disabled?: boolean;
|
|
24278
24345
|
}
|
|
24279
24346
|
|
|
24280
|
-
export declare function NiceTreeGrid<T extends NiceTreeGridNode>({ columns, data, keyField, parentKeyField, nested, childrenField, expandedKeys: controlledExpanded, defaultExpandedKeys, onExpandedChange, hasChildren, loadChildren, rowActions, defaultExpandAll, sortable, sortField: controlledSortField, sortDirection: controlledSortDir, onSort, selectable, selectedKeys: controlledSelected, onSelectionChange, checkable, checkedKeys, defaultCheckedKeys, onCheckedChange, checkStrategy, isRowCheckable, isRowDisabled, checkboxPlacement, checkOnRowClick, showCheckedCount, checkedSummary, showSelectAll, showOnlyChecked: controlledOnlyChecked, defaultShowOnlyChecked, onShowOnlyCheckedChange, toolbarActions, searchable, searchPlaceholder, searchText, defaultSearchText, onSearchChange, searchFields, searchFilter, searchKeepDescendants, searchAutoExpand, highlightMatches, rowClassName, getRowLabel, virtualScroll, rowHeight, height, striped, compact, size, loading, disabled, readOnly, error, emptyText, toolbar, onRowClick, className, style, id, testId, 'data-testid': dataTestId, accessMode, 'aria-label': ariaLabel, 'aria-labelledby': ariaLabelledBy, }: NiceTreeGridProps<T>): default_2.JSX.Element | null;
|
|
24347
|
+
export declare function NiceTreeGrid<T extends NiceTreeGridNode>({ columns, data, keyField, parentKeyField, nested, childrenField, expandedKeys: controlledExpanded, defaultExpandedKeys, onExpandedChange, hasChildren, loadChildren, rowActions, defaultExpandAll, sortable, sortField: controlledSortField, sortDirection: controlledSortDir, onSort, selectable, selectedKeys: controlledSelected, onSelectionChange, checkable, checkedKeys, defaultCheckedKeys, onCheckedChange, checkStrategy, isRowCheckable, isRowDisabled, checkboxPlacement, checkOnRowClick, showCheckedCount, checkedSummary, showSelectAll, showOnlyChecked: controlledOnlyChecked, defaultShowOnlyChecked, onShowOnlyCheckedChange, toolbarActions, searchable, searchPlaceholder, searchText, defaultSearchText, onSearchChange, searchFields, searchFilter, searchKeepDescendants, searchAutoExpand, highlightMatches, rowClassName, getRowLabel, virtualScroll, rowHeight, height, striped, compact, size, loading, disabled, readOnly, error, emptyText, toolbar, onRowClick, contextMenuItems, className, style, id, testId, 'data-testid': dataTestId, accessMode, 'aria-label': ariaLabel, 'aria-labelledby': ariaLabelledBy, }: NiceTreeGridProps<T>): default_2.JSX.Element | null;
|
|
24281
24348
|
|
|
24282
24349
|
/** What a `checkedSummary` function of {@link NiceTreeGrid} gets. */
|
|
24283
24350
|
export declare interface NiceTreeGridCheckedSummaryInfo<T = NiceTreeGridNode> {
|
|
@@ -24306,6 +24373,19 @@ export declare interface NiceTreeGridCheckInfo<T = NiceTreeGridNode> {
|
|
|
24306
24373
|
halfCheckedKeys: string[];
|
|
24307
24374
|
}
|
|
24308
24375
|
|
|
24376
|
+
/** An entry of a {@link NiceTreeGridProps.contextMenuItems} menu (1.4.5). */
|
|
24377
|
+
export declare interface NiceTreeGridMenuItem {
|
|
24378
|
+
id: string;
|
|
24379
|
+
label?: default_2.ReactNode;
|
|
24380
|
+
/** NiceIcon name. */
|
|
24381
|
+
icon?: string;
|
|
24382
|
+
disabled?: boolean;
|
|
24383
|
+
danger?: boolean;
|
|
24384
|
+
/** A line between entries instead of an entry. */
|
|
24385
|
+
divider?: boolean;
|
|
24386
|
+
onSelect?: () => void;
|
|
24387
|
+
}
|
|
24388
|
+
|
|
24309
24389
|
/** A row node in the {@link NiceTreeGrid} (supports index-signature for dynamic fields). */
|
|
24310
24390
|
export declare interface NiceTreeGridNode {
|
|
24311
24391
|
[field: string]: unknown;
|
|
@@ -24473,6 +24553,12 @@ export declare interface NiceTreeGridProps<T extends NiceTreeGridNode = NiceTree
|
|
|
24473
24553
|
toolbar?: default_2.ReactNode;
|
|
24474
24554
|
/** Called when a row is clicked. */
|
|
24475
24555
|
onRowClick?: (row: T) => void;
|
|
24556
|
+
/**
|
|
24557
|
+
* A row's context menu (1.4.5): opened by a right click, Shift+F10 or the Menu key on the row;
|
|
24558
|
+
* the arrows move in it, Enter picks, Escape closes it and gives focus back to the row. No items,
|
|
24559
|
+
* no menu.
|
|
24560
|
+
*/
|
|
24561
|
+
contextMenuItems?: (row: T) => NiceTreeGridMenuItem[] | undefined;
|
|
24476
24562
|
}
|
|
24477
24563
|
|
|
24478
24564
|
/** A built-in button in the rows of {@link NiceTreeGrid}. */
|
|
@@ -25940,6 +26026,10 @@ export { NiceWebSocketMessageType }
|
|
|
25940
26026
|
/**
|
|
25941
26027
|
* {@link NiceWiki} — Wiki module with page tree sidebar, rich content area,
|
|
25942
26028
|
* inline editor (edit mode), page create/delete, and version history hooks.
|
|
26029
|
+
* Works on its own since 1.4.4: each page can carry its `content`, and the selection, the edit
|
|
26030
|
+
* mode and the saved edits are kept inside unless their props are given; the tree filters as
|
|
26031
|
+
* you search, breadcrumbs lead back up, Markdown renders, and edit mode uses NiceMarkdownEditor
|
|
26032
|
+
* or NiceHtmlEditor with Save and Cancel.
|
|
25943
26033
|
*/
|
|
25944
26034
|
export declare const NiceWiki: default_2.ForwardRefExoticComponent<NiceWikiProps & default_2.RefAttributes<HTMLDivElement>> & {
|
|
25945
26035
|
displayName: string;
|
|
@@ -25948,14 +26038,21 @@ export declare const NiceWiki: default_2.ForwardRefExoticComponent<NiceWikiProps
|
|
|
25948
26038
|
export declare interface NiceWikiProps extends NiceFormFieldProps {
|
|
25949
26039
|
/** Page tree. Defaults to none. */
|
|
25950
26040
|
pages?: WikiPage[];
|
|
25951
|
-
/** Currently selected page id. */
|
|
26041
|
+
/** Currently selected page id — **controlled**. Omit it to let the wiki keep its own selection. */
|
|
25952
26042
|
selectedPageId?: string | number;
|
|
25953
|
-
/**
|
|
26043
|
+
/** The page selected first in the uncontrolled mode (1.4.4). Default: the first page. */
|
|
26044
|
+
defaultSelectedPageId?: string | number;
|
|
26045
|
+
/**
|
|
26046
|
+
* Content of the currently selected page (HTML or Markdown) — **controlled**. Omit it and the
|
|
26047
|
+
* wiki shows each page's own `content`, edits it in a draft and keeps what is saved (1.4.4).
|
|
26048
|
+
*/
|
|
25954
26049
|
content?: string;
|
|
25955
|
-
/** Content format. */
|
|
26050
|
+
/** Content format: HTML (edited in NiceHtmlEditor) or Markdown (NiceMarkdownEditor, rendered). */
|
|
25956
26051
|
contentFormat?: 'html' | 'markdown';
|
|
25957
|
-
/** Whether the editor is in edit mode. */
|
|
26052
|
+
/** Whether the editor is in edit mode — **controlled**. Omit it to let the Edit button work alone. */
|
|
25958
26053
|
editing?: boolean;
|
|
26054
|
+
/** Edit mode at first in the uncontrolled mode (1.4.4). Default `false`. */
|
|
26055
|
+
defaultEditing?: boolean;
|
|
25959
26056
|
/** Fires when a page is selected. */
|
|
25960
26057
|
onPageSelect?: (page: WikiPage) => void;
|
|
25961
26058
|
/** Fires when content changes (in edit mode). */
|
|
@@ -31825,6 +31922,11 @@ export declare interface WikiPage {
|
|
|
31825
31922
|
updatedBy?: string;
|
|
31826
31923
|
/** Whether this page is a draft. */
|
|
31827
31924
|
isDraft?: boolean;
|
|
31925
|
+
/**
|
|
31926
|
+
* The page's content (in `contentFormat`) — shown, edited and saved inside the wiki when the
|
|
31927
|
+
* `content` prop is not given (1.4.4), so a wiki works from its page data alone.
|
|
31928
|
+
*/
|
|
31929
|
+
content?: string;
|
|
31828
31930
|
}
|
|
31829
31931
|
|
|
31830
31932
|
/** A wiki page version. */
|