@abpjs/ui 0.2.0-next.30 → 0.2.0-next.32

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
@@ -72,6 +72,11 @@ interface AbpLabels {
72
72
  typeToConfirm?: string;
73
73
  /** A wide form dialog's aside, what the form makes as it's filled in. Optional: English by default. */
74
74
  preview?: string;
75
+ /** A page edited in place with unsaved changes (`SaveBar`): its question, the waiting changes (`{count}`, ICU plural), Discard and Save. Optional: English by default. */
76
+ saveBar?: string;
77
+ unsavedChanges?: string;
78
+ discard?: string;
79
+ save?: string;
75
80
  retry: string;
76
81
  loading: string;
77
82
  noData: string;
@@ -222,6 +227,23 @@ interface QueryListLabels {
222
227
  exporting: string;
223
228
  /** "The file holds {rows} of {total} rows: an export stops at {limit}." */
224
229
  exportCut: string;
230
+ /** The export dialog (UI round 10 step 76). Optional: English by default. `exportFound` takes `{count}`. */
231
+ exportTitleCsv?: string;
232
+ exportTitleExcel?: string;
233
+ exportRows?: string;
234
+ exportFound?: string;
235
+ exportAll?: string;
236
+ exportColumns?: string;
237
+ exportSeparator?: string;
238
+ exportComma?: string;
239
+ exportSemicolon?: string;
240
+ exportTab?: string;
241
+ exportPreview?: string;
242
+ exportRun?: string;
243
+ exportCancel?: string;
244
+ /** The toast while the file is made, and once it's downloaded. */
245
+ exportPreparing?: string;
246
+ exportReady?: string;
225
247
  exportFailed: string;
226
248
  dismiss: string;
227
249
  /** Operator names by JSON-form op: eq, ne, in, notIn, contains… */
@@ -1134,8 +1156,15 @@ interface AppShellNavItem {
1134
1156
  icon?: ReactNode;
1135
1157
  /** Marks the item as the current page (aria-current). */
1136
1158
  current?: boolean;
1137
- /** Pages under this one (a person's favourite views under Views), indented below it; hidden in the rail. */
1159
+ /**
1160
+ * Pages under this one (a person's favourite views under Views), indented below it; hidden in the rail. In the top bar
1161
+ * they open from a small menu beside its name.
1162
+ */
1138
1163
  children?: AppShellNavItem[];
1164
+ /** The heading over the pages under it in the top bar's menu ("Starred"). */
1165
+ childrenTitle?: string;
1166
+ /** The top bar's menu button, named for screen readers ("Starred projects"); the item's name unless given. */
1167
+ childrenLabel?: string;
1139
1168
  }
1140
1169
  interface AppShellNavSection {
1141
1170
  id: string;
@@ -2049,6 +2078,32 @@ interface PreviewCardProps {
2049
2078
  /** What a form makes, in a `FormDialog`'s preview: a head (media, name, sub-line) and its values in a list. */
2050
2079
  declare function PreviewCard({ media, title, subtitle, items }: PreviewCardProps): react.JSX.Element;
2051
2080
 
2081
+ interface SaveBarProps {
2082
+ /** Whether there's something to save: the bar rises at the foot of the window while there is, and goes when not. */
2083
+ open: boolean;
2084
+ onSave: () => void;
2085
+ /** Puts the form back as it was saved. */
2086
+ onDiscard: () => void;
2087
+ /** How many changes wait, for the line under the question ("1 change isn't saved yet"); 1 unless given. */
2088
+ count?: number;
2089
+ /** The line under the question in the host's words, instead of the count's. */
2090
+ message?: ReactNode;
2091
+ /** The question: the `saveBar` label ("Save your changes?") unless given. */
2092
+ title?: ReactNode;
2093
+ /** The save button: the `save` label ("Save") unless given. */
2094
+ saveLabel?: ReactNode;
2095
+ /** Saving: the save button spins and Discard waits. */
2096
+ busy?: boolean;
2097
+ /** Save is off (what's typed can't be saved yet); Discard still works. */
2098
+ saveDisabled?: boolean;
2099
+ }
2100
+ /**
2101
+ * A settings page's unsaved changes: a bar on the selected tint floating at the foot of the window, centred, with the
2102
+ * question, how many changes wait, Discard and Save. For a page edited in place (sign-up, a portal's settings), where
2103
+ * there's no dialog to save from; a form in a dialog saves from its own footer.
2104
+ */
2105
+ declare function SaveBar({ open, onSave, onDiscard, count, message, title, saveLabel, busy, saveDisabled }: SaveBarProps): react.JSX.Element;
2106
+
2052
2107
  /** A section of a settings area (Administration, a project's settings): the host's own, or one a package or plugin adds. */
2053
2108
  interface SettingsSection {
2054
2109
  key: string;
@@ -2464,6 +2519,19 @@ interface PanelProps extends Omit<HTMLChakraProps<'section'>, 'title'> {
2464
2519
  loading?: boolean;
2465
2520
  /** `card` (the bordered surface) or `section` (a heading over a rule, no box); the nearest `PanelTone`'s when not given. */
2466
2521
  tone?: 'card' | 'section';
2522
+ /**
2523
+ * The header folds and unfolds the panel: it becomes a button with a chevron before the title (pointing to the end
2524
+ * when folded, down when open). The actions stay where they are and work while it's folded; the description, the
2525
+ * body and the footer go.
2526
+ */
2527
+ collapsible?: boolean;
2528
+ /** Folded when it first draws (`collapsible`, not controlled). */
2529
+ defaultCollapsed?: boolean;
2530
+ /** Folded or open, when the host keeps it (`collapsible`); with `onCollapsedChange`. */
2531
+ collapsed?: boolean;
2532
+ onCollapsedChange?: (collapsed: boolean) => void;
2533
+ /** A line of what's inside, shown in the header while it's folded ("Arabic · Riyadh", "2 groups"); hidden on narrow screens. */
2534
+ summary?: ReactNode;
2467
2535
  }
2468
2536
  /** The look of every Panel inside it that doesn't ask for its own (the record page's main column: `section`). */
2469
2537
  declare function PanelTone({ tone, children }: {
@@ -2588,6 +2656,18 @@ interface QueryableListView {
2588
2656
  }
2589
2657
  /** The files an export can be: CSV, or an Excel workbook. */
2590
2658
  type QueryExportFormat = 'csv' | 'xlsx';
2659
+ /** A CSV's separator (UI round 10 step 76's export dialog). */
2660
+ type QueryExportSeparator = 'comma' | 'semicolon' | 'tab';
2661
+ /** What the person chose in the export dialog, and the signal that their Cancel aborts. */
2662
+ interface QueryExportOptions {
2663
+ /** The columns to write, in order. */
2664
+ columns: string[];
2665
+ /** Every row the list reaches, not only those its query finds. */
2666
+ all: boolean;
2667
+ /** A CSV's separator; Excel ignores it. */
2668
+ separator: QueryExportSeparator;
2669
+ signal: AbortSignal;
2670
+ }
2591
2671
  /** What an export held (from the response's headers): rows in the file, rows that matched, and the limit that cut it. */
2592
2672
  interface QueryableListExport {
2593
2673
  rows: number;
@@ -2671,10 +2751,12 @@ interface QueryableListProps {
2671
2751
  onSaveView?: (name: string, replaceId: string | null) => void;
2672
2752
  onDeleteView?: (id: string) => void;
2673
2753
  /**
2674
- * Downloads what the list shows (its query and columns, every page) as a file; without it there's no Export menu.
2675
- * Resolves with what the file held, so the list can say when it was cut short; a rejection is shown as an error.
2754
+ * Downloads what the list shows as a file; without it there's no Export menu. The menu's format opens a dialog where
2755
+ * the person picks the rows (what the query finds, or all), the columns and a CSV's separator, then this runs with
2756
+ * their choice; their Cancel aborts `options.signal`. Resolves with what the file held, so the list can say when it
2757
+ * was cut short; a rejection is shown as an error.
2676
2758
  */
2677
- onExport?: (format: QueryExportFormat) => Promise<QueryableListExport | void>;
2759
+ onExport?: (format: QueryExportFormat, options?: QueryExportOptions) => Promise<QueryableListExport | void>;
2678
2760
  /** Extra buttons on the toolbar (e.g. "Create record"). */
2679
2761
  actions?: ReactNode;
2680
2762
  empty?: ReactNode;
@@ -3245,4 +3327,4 @@ interface TooltipProps extends Omit<Tooltip$1.RootProps, 'children'> {
3245
3327
  */
3246
3328
  declare const Tooltip: react.ForwardRefExoticComponent<TooltipProps & react.RefAttributes<HTMLDivElement>>;
3247
3329
 
3248
- 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, type EmptyArt, EmptyArtDrawing, type EmptyIllustration, 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, PageIllustration, 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, PreviewCard, type PreviewCardProps, 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, RowMenu, type RowMenuEntry, type RowMenuItem, type RowMenuProps, 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 };
3330
+ 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, type EmptyArt, EmptyArtDrawing, type EmptyIllustration, 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, PageIllustration, 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, PreviewCard, type PreviewCardProps, PriorityMark, type PriorityMarkProps, type PropertyItem, PropertyList, type PropertyListProps, type QueryConditionJson, type QueryExportFormat, type QueryExportOptions, type QueryExportSeparator, 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, RowMenu, type RowMenuEntry, type RowMenuItem, type RowMenuProps, SHOWN, STEP_UP_REQUIRED, STRONG_FACTOR_REQUIRED, SaveBar, type SaveBarProps, 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 };