@abpjs/ui 0.2.0-next.22 → 0.2.0-next.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
@@ -209,6 +209,8 @@ interface QueryListLabels {
209
209
  /** The pagination's name, and a page button's: "Page {page}". */
210
210
  pages: string;
211
211
  page: string;
212
+ /** The compact pagination's "Page {page} of {pages}". */
213
+ pageOf: string;
212
214
  empty: string;
213
215
  export: string;
214
216
  exportCsv: string;
@@ -681,11 +683,28 @@ declare function useListState<T>(source: ListSource<T>, options?: {
681
683
  declare function useAreaListSource<T>(area: string, path: string, options?: AbpListOptions): ListSource<T>;
682
684
 
683
685
  /**
684
- * A paged list's foot (`useListState`): its pages, and which rows of how many show ("26–50 of 112"), in the labels'
685
- * `queryList` words. Nothing until the first page comes, or when the list is empty.
686
+ * How a pagination reads (UI round 10, step 73): `simple` (the default for lists: which rows of how many, then previous
687
+ * and next; people narrow a long list with search and filters, not by jumping to a page), `numbered` (the pages
688
+ * themselves, for long reports) or `compact` ("Page 3 of 200" between previous and next, for narrow places).
686
689
  */
687
- declare function ListFooter<T>({ list }: {
690
+ type PaginationForm = 'simple' | 'numbered' | 'compact';
691
+ /** The page buttons a form shows between its arrows: only the numbered form has any. */
692
+ declare function pagesShown(form: PaginationForm, page: number, pages: number): (number | 'gap')[];
693
+ /**
694
+ * The pages a pagination shows (UI round 9, step 67): the first and the last, the current one and its neighbours, and
695
+ * near either end the first or last four, in order, with 'gap' where pages are left out.
696
+ */
697
+ declare function pageList(page: number, pages: number): (number | 'gap')[];
698
+
699
+ /**
700
+ * A paged list's foot (`useListState`): which rows of how many show ("26–50 of 112") and the way to the others, in the
701
+ * labels' `queryList` words. `form` is `Pagination`'s, `simple` when left out (the range, then previous and next,
702
+ * centred); `numbered` puts the pages at the start and the range at the end. Nothing until the first page comes, or
703
+ * when the list is empty.
704
+ */
705
+ declare function ListFooter<T>({ list, form }: {
688
706
  list: ListState<T>;
707
+ form?: PaginationForm;
689
708
  }): react.JSX.Element | null;
690
709
 
691
710
  /** A value that follows another once it has stood still for `ms` (what's typed in a search box, before it asks). */
@@ -1195,12 +1214,19 @@ interface PaginationProps {
1195
1214
  /** A page button's name: "Page 4". */
1196
1215
  pageLabel: (page: number) => string;
1197
1216
  disabled?: boolean;
1217
+ /** How it reads; `numbered` when left out (step 67's pages). */
1218
+ form?: PaginationForm;
1219
+ /** Which rows of how many ("26–50 of 112"), drawn before the arrows in the simple form. */
1220
+ range?: string;
1221
+ /** "Page 3 of 200", drawn between the arrows in the compact form. */
1222
+ pageOf?: string;
1198
1223
  }
1199
1224
  /**
1200
- * Pages of a list, centred under it (the canvas's v12, UI round 9 step 67): previous, the first and last pages and the
1201
- * ones around the current one (gaps as "…"), next. The current page is filled. One page: nothing to show.
1225
+ * Pages of a list, centred under it (the canvas's v12). Numbered (UI round 9 step 67): previous, the first and last pages
1226
+ * and the ones around the current one (gaps as "…"), next, the current page filled. Simple (round 10 step 73): the
1227
+ * range, then previous and next. Compact: "Page 3 of 200" between them. One page: only the simple form's range, if any.
1202
1228
  */
1203
- declare function Pagination({ page, pages, onPage, label, previous, next, pageLabel, disabled }: PaginationProps): react.JSX.Element | null;
1229
+ declare function Pagination({ page, pages, onPage, label, previous, next, pageLabel, disabled, form, range, pageOf }: PaginationProps): react.JSX.Element | null;
1204
1230
 
1205
1231
  interface CommandItem {
1206
1232
  id: string;
@@ -1244,12 +1270,6 @@ declare function HighlightText({ text, query }: {
1244
1270
  */
1245
1271
  declare function CommandPalette({ open, onOpenChange, search, labels }: CommandPaletteProps): react.JSX.Element;
1246
1272
 
1247
- /**
1248
- * The pages a pagination shows (UI round 9, step 67): the first and the last, the current one and its neighbours, and
1249
- * near either end the first or last four, in order, with 'gap' where pages are left out.
1250
- */
1251
- declare function pageList(page: number, pages: number): (number | 'gap')[];
1252
-
1253
1273
  interface AvatarPerson {
1254
1274
  id: string;
1255
1275
  name: string;
@@ -1305,12 +1325,26 @@ type ButtonProps = Omit<ButtonProps$1, 'variant' | 'size' | 'colorPalette'> & Ab
1305
1325
  * `loading` is Chakra's: an action is running.
1306
1326
  */
1307
1327
  declare const Button: react.ForwardRefExoticComponent<Omit<ButtonProps$1, "colorPalette" | "size" | "variant"> & AbpButtonProps & react.RefAttributes<HTMLButtonElement>>;
1328
+ type AddButtonProps = Omit<ButtonProps, 'variant' | 'danger'>;
1329
+ /**
1330
+ * The one look for every add action (Add filter, Add column, Add condition, Add member, a create row): link-coloured
1331
+ * bold text after a plus, no fill, no border, no chevron, underlined on hover. A page's one main action stays a
1332
+ * `primary` Button; this is for the adds inside a page, a panel or a dialog.
1333
+ */
1334
+ declare const AddButton: react.ForwardRefExoticComponent<AddButtonProps & react.RefAttributes<HTMLButtonElement>>;
1308
1335
  type IconButtonProps = Omit<IconButtonProps$1, 'variant' | 'size' | 'colorPalette'> & AbpButtonProps & {
1309
1336
  'aria-label': string;
1337
+ /** Removing something from a list or a form (not deleting it): gray at rest, red only on hover. */
1338
+ remove?: boolean;
1310
1339
  };
1311
- /** Square icon-only button. `aria-label` is required; it is also shown as the native tooltip. */
1340
+ /**
1341
+ * Square icon-only button. `aria-label` is required; it is also shown as the native tooltip. A delete (trash) icon is
1342
+ * `danger`, red at all times; taking a row out of a list is `remove`, gray until hovered.
1343
+ */
1312
1344
  declare const IconButton: react.ForwardRefExoticComponent<Omit<IconButtonProps$1, "colorPalette" | "size" | "variant"> & AbpButtonProps & {
1313
1345
  'aria-label': string;
1346
+ /** Removing something from a list or a form (not deleting it): gray at rest, red only on hover. */
1347
+ remove?: boolean;
1314
1348
  } & react.RefAttributes<HTMLButtonElement>>;
1315
1349
 
1316
1350
  interface ConfirmOptions {
@@ -2506,6 +2540,11 @@ interface QueryableListProps {
2506
2540
  skip: number;
2507
2541
  take: number;
2508
2542
  onSkipChange: (skip: number) => void;
2543
+ /**
2544
+ * How its pages read (`Pagination`'s form): `simple` when left out (the range, then previous and next, centred);
2545
+ * `numbered` for a long report people page through; `compact` for a narrow place.
2546
+ */
2547
+ pagination?: PaginationForm;
2509
2548
  views?: QueryableListView[];
2510
2549
  activeViewId?: string | null;
2511
2550
  onSelectView?: (id: string | null) => void;
@@ -2590,7 +2629,7 @@ declare function basicConditions(where: QueryNodeJson | null | undefined): Query
2590
2629
  * counts, saved views and paging, over any entity the query engine serves. Controlled: the host runs the query and
2591
2630
  * keeps the state in the URL.
2592
2631
  */
2593
- declare function QueryableList({ 'aria-label': ariaLabel, fields, state, onStateChange, result, loading: own, error, renderCell, renderRow, selection, leadingColumn, toolbarFooter, countMatches, suggest, renderValueEditor, skip, take, onSkipChange, views, activeViewId, onSelectView, onSaveView, onDeleteView, onExport, actions, empty, loadFailed, leading, attention, search, renderGroupFooter, renderGroupAside, moveToGroup, tree, columnLabels, exportTarget, }: QueryableListProps): react.JSX.Element;
2632
+ declare function QueryableList({ 'aria-label': ariaLabel, fields, state, onStateChange, result, loading: own, error, renderCell, renderRow, selection, leadingColumn, toolbarFooter, countMatches, suggest, renderValueEditor, skip, take, onSkipChange, pagination, views, activeViewId, onSelectView, onSaveView, onDeleteView, onExport, actions, empty, loadFailed, leading, attention, search, renderGroupFooter, renderGroupAside, moveToGroup, tree, columnLabels, exportTarget, }: QueryableListProps): react.JSX.Element;
2594
2633
 
2595
2634
  interface RecordKeyProps extends Omit<HTMLChakraProps<'span'>, 'children'> {
2596
2635
  /** The key, e.g. "PAY-41". Children win when both are given. */
@@ -3086,4 +3125,4 @@ interface TooltipProps extends Omit<Tooltip$1.RootProps, 'children'> {
3086
3125
  */
3087
3126
  declare const Tooltip: react.ForwardRefExoticComponent<TooltipProps & react.RefAttributes<HTMLDivElement>>;
3088
3127
 
3089
- export { ABP_UI_VERSION, AbpApiError, type AbpBrand, type AbpHost, type AbpLabels, type AbpLabelsInput, type AbpListOptions, AbpProvider, type AbpProviderProps, type AbpSystemOptions, type ApiQuery, AppLink, type AppLinkProps, AppShell, type AppShellBrand, type AppShellNavItem, type AppShellNavSection, type AppShellPlace, type AppShellProps, type AppShellSidebar, type AreaTexts, type Arrival, ArriveOnChange, type ArriveOnChangeProps, AttentionChip, type AttentionChipProps, type AvatarPerson, AvatarStack, type AvatarStackProps, Bone, type BoneProps, type BreadcrumbItem, Breadcrumbs, Button, type ButtonProps, type ButtonSize, type ButtonVariant, CalendarGrid, type CalendarGridProps, type CalendarItem, type CardDates, CategoryProgress, type CategoryProgressProps, type CelebrateTarget, Chart, type ChartProps, type ChartSeries, CheckboxField, type CheckboxFieldProps, Collapse, type CollapseProps, type ColorMode, ColorModeProvider, ColorModeToggle, type CommandGroup, type CommandItem, CommandPalette, type CommandPaletteProps, ConfirmDialog, type ConfirmDialogProps, type ConfirmOptions, ConfirmProvider, CountBadge, type CountBadgeProps, Counter, type CounterProps, DEFAULT_PAGE_SIZE, DashboardGrid, type DashboardGridProps, DataTable, type DataTableColumn, type DataTableProps, type DataTableSelection, type DataTableSort, type Direction, DirectionalIcon, DropHint, type DropHintProps, type DropZoneOptions, type DropZoneState, type DroppedFile, EMPTY_VALUE, EmotionRegistry, EmptyState, type EmptyStateProps, FadeIn, type FadeInProps, Field, type FieldProps, FileDropArea, type FileDropAreaProps, FormDialog, type FormDialogProps, FormField, type GridItem, GroupPicker, Highlight, HighlightText, type HostEventHandler, type HostEvents, type HostFile, type HostLanguage, HostProvider, type HostRequest, type HostRequestInit, type HostRequestOptions, type HostScope, HostSlot, IconButton, type IconButtonProps, IconTile, type IconTileProps, Indicator, type IndicatorProps, InlineAlert, type InlineAlertProps, KanbanBoard, type KanbanBoardProps, type KanbanColumn, type KanbanItem, type KanbanLane, type KanbanMove, type LinkComponent, ListFooter, type ListPage, type ListQuery, type ListSource, type ListState, Loading, type LoadingProps, LoadingState, MotionProvider, type MotionSetting, type MotionState, type NameSuggestion, type NamesValue, Nudge, type NudgeProps, PageHeader, type PageHeaderProps, PageTitleProvider, Pagination, type PaginationProps, Panel, type PanelProps, PanelTone, type Particle, PathChips, type PathChipsProps, PersonChip, type PersonChipProps, PersonPicker, type PickerGroup, type PickerLabels, type PickerPerson, type PlacedCard, PluginTextsProvider, type Pose, Presence, PresenceItem, type PresenceItemProps, PresenceList, type PresenceListProps, type PresenceProps, Pressable, type PressableProps, PriorityMark, type PriorityMarkProps, type PropertyItem, PropertyList, type PropertyListProps, type QueryConditionJson, type QueryExportFormat, type QueryField, type QueryGroup, type QueryJson, type QueryListLabels, type QueryNodeJson, type QueryRow, type QuerySuggestion, type QuerySuggestions, type QueryValueEditor, QueryableList, type QueryableListError, type QueryableListExport, type QueryableListProps, type QueryableListState, type QueryableListView, type QueueProgress, RecordKey, type RecordKeyProps, type RegisterSlotSave, Reveal, RevealItem, type RevealItemProps, type RevealProps, SHOWN, STEP_UP_REQUIRED, STRONG_FACTOR_REQUIRED, type Scale, SearchInput, type SearchInputProps, SearchPicker, type SearchPickerMessages, type SearchPickerProps, type SectionMove, SegmentedControl, type SegmentedControlProps, type SegmentedItem, SelectField, type SelectFieldProps, type SelectOption, type ServerInsertedHTML, type SettingsArea, SettingsLayout, type SettingsLayoutProps, type SettingsPage, type SettingsSection, SlideItem, type SlideItemProps, SlideList, type SlideListProps, type SlotSave, type SortDirection, type SortableSection, SortableSections, type SortableSectionsProps, type StatusCategory, StatusPill, type StatusPillProps, type StatusTone, StepUpDialog, type StepUpHandler, type StepUpNeed, Swap, type SwapProps, SwitchField, type SwitchFieldProps, TITLE_SEPARATOR, TextBone, type TextBoneProps, TextSlot, type TextSlotProps, type TimelineCardItem, TimelineCards, type TimelineCardsProps, TimelineChart, type TimelineChartProps, type TimelineItem, type TimelineRow, type TimelineScale, type TitleParts, Toaster, Tooltip, type TooltipProps, TranslatedInput, type TranslatedInputProps, type TranslationsLabels, UPLOADS_AT_ONCE, type UploadJob, UploadList, type UploadListProps, type UploadRow, type UploadState, abpConfig, abpListParams, abpListSource, arriveCss, asMotionSetting, avatarPalette, basicConditions, boneWidth, burst, compactLayout, compareOrdinal, composeTitle, covers, createAbpSystem, createAreaTexts, createHostEvents, createHostRequest, createPasskey, curves, defaultBrand, defaultLabels, defaultPickerLabels, defaultQueryListLabels, defaultTranslationsLabels, directionOf, droppedFiles, emptyQuery, errorText, fileNameOf, findSettingsPage, folderOf, foldersFor, formatDateTime, formatMessage, formatNumber, getPasskey, ghostCss, groupKey, heavierFirst, hiddenPose, inSections, isStepUp, looksLikeCode, durations as motionDurations, needsStepUp, notify, pageCount, pageList, partsOf, passkeysSupported, pastedName, personLabel, placeCards, placeItem, priorityLevel, progressOf, readAbpError, readEvents, refusal, requestStepUp, setStepUpHandler, settingsArea, shineCss, springs, staggerDelay, stepUpNeedOf, targetOf, toStart, toaster, useAbpLabels, useAbpLocale, useAbpTimeZone, useApiAction, useApiDownload, useApiQuery, useAreaEvents, useAreaListSource, useAreaRequest, useArriving, useCan, useCelebrate, useColorMode, useConfirm, useDropZone, useFilesOverPage, useFormatters, useHost, useHostLanguages, useLinkComponent, useListState, useLoading, useMe, useMotionSetting, useNames, useNavigate, useOptionalHost, usePageDrop, usePageTitle, usePageTitleParts, usePageTitleSite, usePastedFiles, usePluginTexts, useProductName, useSettledValue, useSlotSaves, useTokenVar };
3128
+ export { ABP_UI_VERSION, AbpApiError, type AbpBrand, type AbpHost, type AbpLabels, type AbpLabelsInput, type AbpListOptions, AbpProvider, type AbpProviderProps, type AbpSystemOptions, AddButton, type AddButtonProps, type ApiQuery, AppLink, type AppLinkProps, AppShell, type AppShellBrand, type AppShellNavItem, type AppShellNavSection, type AppShellPlace, type AppShellProps, type AppShellSidebar, type AreaTexts, type Arrival, ArriveOnChange, type ArriveOnChangeProps, AttentionChip, type AttentionChipProps, type AvatarPerson, AvatarStack, type AvatarStackProps, Bone, type BoneProps, type BreadcrumbItem, Breadcrumbs, Button, type ButtonProps, type ButtonSize, type ButtonVariant, CalendarGrid, type CalendarGridProps, type CalendarItem, type CardDates, CategoryProgress, type CategoryProgressProps, type CelebrateTarget, Chart, type ChartProps, type ChartSeries, CheckboxField, type CheckboxFieldProps, Collapse, type CollapseProps, type ColorMode, ColorModeProvider, ColorModeToggle, type CommandGroup, type CommandItem, CommandPalette, type CommandPaletteProps, ConfirmDialog, type ConfirmDialogProps, type ConfirmOptions, ConfirmProvider, CountBadge, type CountBadgeProps, Counter, type CounterProps, DEFAULT_PAGE_SIZE, DashboardGrid, type DashboardGridProps, DataTable, type DataTableColumn, type DataTableProps, type DataTableSelection, type DataTableSort, type Direction, DirectionalIcon, DropHint, type DropHintProps, type DropZoneOptions, type DropZoneState, type DroppedFile, EMPTY_VALUE, EmotionRegistry, EmptyState, type EmptyStateProps, FadeIn, type FadeInProps, Field, type FieldProps, FileDropArea, type FileDropAreaProps, FormDialog, type FormDialogProps, FormField, type GridItem, GroupPicker, Highlight, HighlightText, type HostEventHandler, type HostEvents, type HostFile, type HostLanguage, HostProvider, type HostRequest, type HostRequestInit, type HostRequestOptions, type HostScope, HostSlot, IconButton, type IconButtonProps, IconTile, type IconTileProps, Indicator, type IndicatorProps, InlineAlert, type InlineAlertProps, KanbanBoard, type KanbanBoardProps, type KanbanColumn, type KanbanItem, type KanbanLane, type KanbanMove, type LinkComponent, ListFooter, type ListPage, type ListQuery, type ListSource, type ListState, Loading, type LoadingProps, LoadingState, MotionProvider, type MotionSetting, type MotionState, type NameSuggestion, type NamesValue, Nudge, type NudgeProps, PageHeader, type PageHeaderProps, PageTitleProvider, Pagination, type PaginationForm, type PaginationProps, Panel, type PanelProps, PanelTone, type Particle, PathChips, type PathChipsProps, PersonChip, type PersonChipProps, PersonPicker, type PickerGroup, type PickerLabels, type PickerPerson, type PlacedCard, PluginTextsProvider, type Pose, Presence, PresenceItem, type PresenceItemProps, PresenceList, type PresenceListProps, type PresenceProps, Pressable, type PressableProps, PriorityMark, type PriorityMarkProps, type PropertyItem, PropertyList, type PropertyListProps, type QueryConditionJson, type QueryExportFormat, type QueryField, type QueryGroup, type QueryJson, type QueryListLabels, type QueryNodeJson, type QueryRow, type QuerySuggestion, type QuerySuggestions, type QueryValueEditor, QueryableList, type QueryableListError, type QueryableListExport, type QueryableListProps, type QueryableListState, type QueryableListView, type QueueProgress, RecordKey, type RecordKeyProps, type RegisterSlotSave, Reveal, RevealItem, type RevealItemProps, type RevealProps, SHOWN, STEP_UP_REQUIRED, STRONG_FACTOR_REQUIRED, type Scale, SearchInput, type SearchInputProps, SearchPicker, type SearchPickerMessages, type SearchPickerProps, type SectionMove, SegmentedControl, type SegmentedControlProps, type SegmentedItem, SelectField, type SelectFieldProps, type SelectOption, type ServerInsertedHTML, type SettingsArea, SettingsLayout, type SettingsLayoutProps, type SettingsPage, type SettingsSection, SlideItem, type SlideItemProps, SlideList, type SlideListProps, type SlotSave, type SortDirection, type SortableSection, SortableSections, type SortableSectionsProps, type StatusCategory, StatusPill, type StatusPillProps, type StatusTone, StepUpDialog, type StepUpHandler, type StepUpNeed, Swap, type SwapProps, SwitchField, type SwitchFieldProps, TITLE_SEPARATOR, TextBone, type TextBoneProps, TextSlot, type TextSlotProps, type TimelineCardItem, TimelineCards, type TimelineCardsProps, TimelineChart, type TimelineChartProps, type TimelineItem, type TimelineRow, type TimelineScale, type TitleParts, Toaster, Tooltip, type TooltipProps, TranslatedInput, type TranslatedInputProps, type TranslationsLabels, UPLOADS_AT_ONCE, type UploadJob, UploadList, type UploadListProps, type UploadRow, type UploadState, abpConfig, abpListParams, abpListSource, arriveCss, asMotionSetting, avatarPalette, basicConditions, boneWidth, burst, compactLayout, compareOrdinal, composeTitle, covers, createAbpSystem, createAreaTexts, createHostEvents, createHostRequest, createPasskey, curves, defaultBrand, defaultLabels, defaultPickerLabels, defaultQueryListLabels, defaultTranslationsLabels, directionOf, droppedFiles, emptyQuery, errorText, fileNameOf, findSettingsPage, folderOf, foldersFor, formatDateTime, formatMessage, formatNumber, getPasskey, ghostCss, groupKey, heavierFirst, hiddenPose, inSections, isStepUp, looksLikeCode, durations as motionDurations, needsStepUp, notify, pageCount, pageList, pagesShown, partsOf, passkeysSupported, pastedName, personLabel, placeCards, placeItem, priorityLevel, progressOf, readAbpError, readEvents, refusal, requestStepUp, setStepUpHandler, settingsArea, shineCss, springs, staggerDelay, stepUpNeedOf, targetOf, toStart, toaster, useAbpLabels, useAbpLocale, useAbpTimeZone, useApiAction, useApiDownload, useApiQuery, useAreaEvents, useAreaListSource, useAreaRequest, useArriving, useCan, useCelebrate, useColorMode, useConfirm, useDropZone, useFilesOverPage, useFormatters, useHost, useHostLanguages, useLinkComponent, useListState, useLoading, useMe, useMotionSetting, useNames, useNavigate, useOptionalHost, usePageDrop, usePageTitle, usePageTitleParts, usePageTitleSite, usePastedFiles, usePluginTexts, useProductName, useSettledValue, useSlotSaves, useTokenVar };