@panneau/lists 5.0.0-alpha.7 → 5.0.0-alpha.8
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/ItemDetails.d.ts +1 -1
- package/dist/List.d.ts +2 -2
- package/dist/ListSkeleton.d.ts +1 -1
- package/dist/ListView.d.ts +3 -3
- package/dist/actions/ActionButton.d.ts +1 -1
- package/dist/actions/ConfirmDialog.d.ts +1 -1
- package/dist/actions/RowActions.d.ts +2 -2
- package/dist/actions/actions.d.ts +1 -1
- package/dist/displays/displays.d.ts +1 -1
- package/dist/filters/Filters.d.ts +1 -1
- package/dist/filters/controls.d.ts +1 -1
- package/dist/filters/format.d.ts +1 -1
- package/dist/index.d.ts +19 -19
- package/dist/layouts/CardsLayout.d.ts +1 -1
- package/dist/layouts/TableLayout.d.ts +1 -1
- package/dist/layouts/builtIn.d.ts +1 -1
- package/dist/plugin.d.ts +1 -1
- package/dist/query.d.ts +1 -1
- package/dist/selection.d.ts +1 -1
- package/dist/toolbar/SortSelect.d.ts +1 -1
- package/dist/useRenderValue.d.ts +1 -1
- package/dist/values.d.ts +1 -1
- package/package.json +9 -9
package/dist/ItemDetails.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { DisplayEntry, ListColumn, ListItem } from './types';
|
|
1
|
+
import type { DisplayEntry, ListColumn, ListItem } from './types.js';
|
|
2
2
|
export interface ItemDetailsProps {
|
|
3
3
|
/** The item. `undefined` while it loads: the labels, with a skeleton of each value. */
|
|
4
4
|
item: ListItem | undefined;
|
package/dist/List.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { type ListOptions } from '@panneau/core';
|
|
2
|
-
import { type ListViewProps } from './ListView';
|
|
3
|
-
import type { ListItem } from './types';
|
|
2
|
+
import { type ListViewProps } from './ListView.js';
|
|
3
|
+
import type { ListItem } from './types.js';
|
|
4
4
|
export interface ListProps extends Omit<ListViewProps, 'list' | 'total' | 'items'> {
|
|
5
5
|
/** Every item: the list searches, filters, sorts and paginates them in memory. */
|
|
6
6
|
items: readonly ListItem[] | undefined;
|
package/dist/ListSkeleton.d.ts
CHANGED
package/dist/ListView.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { type ReactNode } from 'react';
|
|
2
2
|
import type { List } from '@panneau/core';
|
|
3
3
|
import type { Field, Filter } from '@panneau/protocol';
|
|
4
|
-
import { type ListActions } from './actions/actions';
|
|
5
|
-
import type { ActionIcons } from './actions/icons';
|
|
6
|
-
import type { DisplayEntry, FilterEntry, ListActionHandler, ListActionPreviewer, ListColumn, ListItem, ListLayoutEntry } from './types';
|
|
4
|
+
import { type ListActions } from './actions/actions.js';
|
|
5
|
+
import type { ActionIcons } from './actions/icons.js';
|
|
6
|
+
import type { DisplayEntry, FilterEntry, ListActionHandler, ListActionPreviewer, ListColumn, ListItem, ListLayoutEntry } from './types.js';
|
|
7
7
|
export interface ListViewProps {
|
|
8
8
|
/** The list state of `@panneau/core` (`useList()`): query and selection. */
|
|
9
9
|
list: List;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { ListActionEvent, ListActionPreview } from '../types';
|
|
1
|
+
import type { ListActionEvent, ListActionPreview } from '../types.js';
|
|
2
2
|
/** Whether an action needs a confirmation: it asks for one, or some selected items are skipped. */
|
|
3
3
|
export declare function needsConfirmation(event: ListActionEvent): boolean;
|
|
4
4
|
/** The dry run of a query selection: in progress, or done with the backend's count. */
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { Action } from '@panneau/protocol';
|
|
2
|
-
import type { ListItem } from '../types';
|
|
3
|
-
import { type ActionIcons } from './icons';
|
|
2
|
+
import type { ListItem } from '../types.js';
|
|
3
|
+
import { type ActionIcons } from './icons.js';
|
|
4
4
|
export interface RowActionsProps {
|
|
5
5
|
item: ListItem;
|
|
6
6
|
/** The label of the item, for the accessible names of its actions. */
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { Action, ActionPlacement } from '@panneau/protocol';
|
|
2
|
-
import type { ListItem } from '../types';
|
|
2
|
+
import type { ListItem } from '../types.js';
|
|
3
3
|
/** Actions of a list: a list (grouped by their placements), or already grouped by placement. */
|
|
4
4
|
export type ListActions = readonly Action[] | Partial<Record<ActionPlacement, readonly Action[]>>;
|
|
5
5
|
/**
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { DisplayEntry, DisplayProps } from '../types';
|
|
1
|
+
import type { DisplayEntry, DisplayProps } from '../types.js';
|
|
2
2
|
/** What a cell shows without a value. Hidden from assistive technologies, which skip the cell. */
|
|
3
3
|
export declare function EmptyValue(): import("react").JSX.Element;
|
|
4
4
|
/** Text, on two lines at most. The default display. */
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { Field, Filter, FilterValue } from '@panneau/protocol';
|
|
2
|
-
import type { FilterEntry, ListColumn } from '../types';
|
|
2
|
+
import type { FilterEntry, ListColumn } from '../types.js';
|
|
3
3
|
/** Labels of filter values (relation ids), by filter id, for the chips. */
|
|
4
4
|
export type FilterLabels = Readonly<Record<string, Readonly<Record<string, string>>>>;
|
|
5
5
|
/** Remembers the labels of filter values, for the chips of active filters. */
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { FilterControlProps, FilterEntry } from '../types';
|
|
1
|
+
import type { FilterControlProps, FilterEntry } from '../types.js';
|
|
2
2
|
/** A text filter: the list changes once the user stops typing. */
|
|
3
3
|
export declare function TextFilter({ label, value, onChange }: FilterControlProps): import("react").JSX.Element;
|
|
4
4
|
/** A choice among the options, or several with `multiple`. */
|
package/dist/filters/format.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { IntlShape } from 'react-intl';
|
|
2
2
|
import type { Field, Filter, Option } from '@panneau/protocol';
|
|
3
|
-
import type { ListColumn } from '../types';
|
|
3
|
+
import type { ListColumn } from '../types.js';
|
|
4
4
|
/** The label of a filter: its `label`, the label of its field, or its id. */
|
|
5
5
|
export declare function getFilterLabel(filter: Filter, columns: readonly ListColumn[], fields: readonly Field[]): string;
|
|
6
6
|
/** The field a filter filters, when a column or the list's fields have one with its id. */
|
package/dist/index.d.ts
CHANGED
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
export { type ListActions, getActionHref, groupListActions, isAllowedOn } from './actions/actions';
|
|
2
|
-
export { ConfirmDialog, type ConfirmDialogProps, type ConfirmPreview, } from './actions/ConfirmDialog';
|
|
3
|
-
export { type ActionIcons, getActionIcon } from './actions/icons';
|
|
4
|
-
export { BooleanDisplay, ColorDisplay, DateDisplay, DateTimeDisplay, DurationDisplay, EmailDisplay, EmbedDisplay, EmptyValue, JsonDisplay, LocationDisplay, MediaDisplay, NumberDisplay, RelationDisplay, RichTextDisplay, SelectDisplay, TagsDisplay, TelDisplay, TextDisplay, TimeDisplay, UrlDisplay, builtInDisplays, } from './displays/displays';
|
|
5
|
-
export { DateFilter, DateRangeFilter, RelationFilter, SelectFilter, TextFilter, ToggleFilter, builtInFilters, } from './filters/controls';
|
|
6
|
-
export { CardsLayout } from './layouts/CardsLayout';
|
|
7
|
-
export { TableLayout } from './layouts/TableLayout';
|
|
8
|
-
export { builtInLayouts } from './layouts/builtIn';
|
|
9
|
-
export { ItemDetails, type ItemDetailsProps } from './ItemDetails';
|
|
10
|
-
export { List, type ListProps } from './List';
|
|
11
|
-
export { ListView, type ListViewProps } from './ListView';
|
|
12
|
-
export { listsPlugin } from './plugin';
|
|
13
|
-
export { type LocalQueryOptions, type LocalQueryResult, applyListQuery } from './query';
|
|
14
|
-
export { countSelected, getPageSelection, isItemSelected } from './selection';
|
|
15
|
-
export { Pagination, type PaginationProps } from './toolbar/Pagination';
|
|
16
|
-
export { SearchField, type SearchFieldProps } from './toolbar/SearchField';
|
|
17
|
-
export type { DisplayEntry, DisplayProps, FilterControlProps, FilterEntry, ListActionEvent, ListActionHandler, ListActionPreview, ListActionPreviewer, ListColumn, ListItem, ListLayoutEntry, ListLayoutProps, } from './types';
|
|
18
|
-
export { useListState } from './useListState';
|
|
19
|
-
export { getLocalizedValue, toText } from './values';
|
|
1
|
+
export { type ListActions, getActionHref, groupListActions, isAllowedOn } from './actions/actions.js';
|
|
2
|
+
export { ConfirmDialog, type ConfirmDialogProps, type ConfirmPreview, } from './actions/ConfirmDialog.js';
|
|
3
|
+
export { type ActionIcons, getActionIcon } from './actions/icons.js';
|
|
4
|
+
export { BooleanDisplay, ColorDisplay, DateDisplay, DateTimeDisplay, DurationDisplay, EmailDisplay, EmbedDisplay, EmptyValue, JsonDisplay, LocationDisplay, MediaDisplay, NumberDisplay, RelationDisplay, RichTextDisplay, SelectDisplay, TagsDisplay, TelDisplay, TextDisplay, TimeDisplay, UrlDisplay, builtInDisplays, } from './displays/displays.js';
|
|
5
|
+
export { DateFilter, DateRangeFilter, RelationFilter, SelectFilter, TextFilter, ToggleFilter, builtInFilters, } from './filters/controls.js';
|
|
6
|
+
export { CardsLayout } from './layouts/CardsLayout.js';
|
|
7
|
+
export { TableLayout } from './layouts/TableLayout.js';
|
|
8
|
+
export { builtInLayouts } from './layouts/builtIn.js';
|
|
9
|
+
export { ItemDetails, type ItemDetailsProps } from './ItemDetails.js';
|
|
10
|
+
export { List, type ListProps } from './List.js';
|
|
11
|
+
export { ListView, type ListViewProps } from './ListView.js';
|
|
12
|
+
export { listsPlugin } from './plugin.js';
|
|
13
|
+
export { type LocalQueryOptions, type LocalQueryResult, applyListQuery } from './query.js';
|
|
14
|
+
export { countSelected, getPageSelection, isItemSelected } from './selection.js';
|
|
15
|
+
export { Pagination, type PaginationProps } from './toolbar/Pagination.js';
|
|
16
|
+
export { SearchField, type SearchFieldProps } from './toolbar/SearchField.js';
|
|
17
|
+
export type { DisplayEntry, DisplayProps, FilterControlProps, FilterEntry, ListActionEvent, ListActionHandler, ListActionPreview, ListActionPreviewer, ListColumn, ListItem, ListLayoutEntry, ListLayoutProps, } from './types.js';
|
|
18
|
+
export { useListState } from './useListState.js';
|
|
19
|
+
export { getLocalizedValue, toText } from './values.js';
|
|
20
20
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { ListLayoutProps } from '../types';
|
|
1
|
+
import type { ListLayoutProps } from '../types.js';
|
|
2
2
|
/** Items as cards: the first column is the title, the others are listed under it. */
|
|
3
3
|
export declare function CardsLayout({ items, columns, renderValue, getItemLabel, getItemHref, isCurrent, selectable, isSelected, onToggle, renderActions, label, pageSelection, }: ListLayoutProps): import("react").JSX.Element;
|
|
4
4
|
//# sourceMappingURL=CardsLayout.d.ts.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { ListColumn, ListLayoutProps } from '../types';
|
|
1
|
+
import type { ListColumn, ListLayoutProps } from '../types.js';
|
|
2
2
|
/** The sort direction of a column, from the first `sort` value. */
|
|
3
3
|
export declare function getSortDirection(sort: readonly string[], column: ListColumn): 'ascending' | 'descending' | null;
|
|
4
4
|
/**
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { ListLayoutEntry } from '../types';
|
|
1
|
+
import type { ListLayoutEntry } from '../types.js';
|
|
2
2
|
/** The built-in list layouts, by id. `gallery` and `calendar` come later. */
|
|
3
3
|
export declare const builtInLayouts: Readonly<Record<string, ListLayoutEntry>> & {
|
|
4
4
|
table: ListLayoutEntry;
|
package/dist/plugin.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { DisplayEntry, ListLayoutEntry } from './types';
|
|
1
|
+
import type { DisplayEntry, ListLayoutEntry } from './types.js';
|
|
2
2
|
/**
|
|
3
3
|
* The built-in displays and layouts as a `@panneau/core` plugin, with the French messages of every
|
|
4
4
|
* Panneau package (from `@panneau/intl`). Lists use the built-in displays and layouts without it:
|
package/dist/query.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { ListQuery } from '@panneau/protocol';
|
|
2
|
-
import type { ListColumn, ListItem } from './types';
|
|
2
|
+
import type { ListColumn, ListItem } from './types.js';
|
|
3
3
|
export interface LocalQueryOptions {
|
|
4
4
|
/** The columns: values of localized fields are compared in `locale`. */
|
|
5
5
|
columns?: readonly ListColumn[];
|
package/dist/selection.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { ListSelection } from '@panneau/core';
|
|
2
|
-
import type { ListItem } from './types';
|
|
2
|
+
import type { ListItem } from './types.js';
|
|
3
3
|
/** Whether an item is selected. */
|
|
4
4
|
export declare function isItemSelected(selection: ListSelection, id: string): boolean;
|
|
5
5
|
/** How many items are selected, given the total of the list (or the count of items without it). */
|
package/dist/useRenderValue.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { ReactNode } from 'react';
|
|
2
|
-
import type { DisplayEntry, ListColumn, ListItem } from './types';
|
|
2
|
+
import type { DisplayEntry, ListColumn, ListItem } from './types.js';
|
|
3
3
|
/**
|
|
4
4
|
* Renders the value of a column for an item with its display: those given, over those of the
|
|
5
5
|
* plugins, over the built-in ones. Columns without a known display show their value as text.
|
package/dist/values.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { Field, Option } from '@panneau/protocol';
|
|
2
|
-
import type { ListColumn, ListItem } from './types';
|
|
2
|
+
import type { ListColumn, ListItem } from './types.js';
|
|
3
3
|
/**
|
|
4
4
|
* The value of a localized field in a locale: the locale (`fr-CA`), its language (`fr`), then the
|
|
5
5
|
* first filled locale. Other values are returned as they are.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@panneau/lists",
|
|
3
|
-
"version": "5.0.0-alpha.
|
|
3
|
+
"version": "5.0.0-alpha.8",
|
|
4
4
|
"description": "Lists of Panneau: columns with displays, table and cards layouts, sorting, filters, search, pagination, selection and actions, driven by the list state of @panneau/core.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
@@ -24,9 +24,9 @@
|
|
|
24
24
|
"dist"
|
|
25
25
|
],
|
|
26
26
|
"scripts": {
|
|
27
|
-
"build": "vite build &&
|
|
27
|
+
"build": "vite build && node ../../scripts/declarations.js",
|
|
28
28
|
"typecheck": "tsc --noEmit",
|
|
29
|
-
"api": "
|
|
29
|
+
"api": "node ../../scripts/declarations.js && node ../../scripts/api-report.js"
|
|
30
30
|
},
|
|
31
31
|
"publishConfig": {
|
|
32
32
|
"access": "public"
|
|
@@ -37,14 +37,14 @@
|
|
|
37
37
|
"react-intl": "^12.0.0"
|
|
38
38
|
},
|
|
39
39
|
"dependencies": {
|
|
40
|
-
"@panneau/core": "5.0.0-alpha.
|
|
41
|
-
"@panneau/fields": "5.0.0-alpha.
|
|
42
|
-
"@panneau/intl": "5.0.0-alpha.
|
|
43
|
-
"@panneau/protocol": "5.0.0-alpha.
|
|
44
|
-
"@panneau/ui": "5.0.0-alpha.
|
|
40
|
+
"@panneau/core": "5.0.0-alpha.8",
|
|
41
|
+
"@panneau/fields": "5.0.0-alpha.8",
|
|
42
|
+
"@panneau/intl": "5.0.0-alpha.8",
|
|
43
|
+
"@panneau/protocol": "5.0.0-alpha.8",
|
|
44
|
+
"@panneau/ui": "5.0.0-alpha.8",
|
|
45
45
|
"lucide-react": "^1.57.0"
|
|
46
46
|
},
|
|
47
47
|
"devDependencies": {
|
|
48
|
-
"@panneau/data": "5.0.0-alpha.
|
|
48
|
+
"@panneau/data": "5.0.0-alpha.8"
|
|
49
49
|
}
|
|
50
50
|
}
|