@abpjs/ui 0.2.0-next.35 → 0.2.0-next.37

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 CHANGED
@@ -1,5 +1,35 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.2.0-next.37
4
+
5
+ A prerelease under npm's `next` tag.
6
+
7
+ - The `storage` area (`@abpjs/ui/storage`), AbpCluster.Storage's screen on AbpCluster.Storage.HttpApi 0.6.0 or later:
8
+ where the site keeps its files (the provider and its place, never a key) and what's kept there, a test of each store
9
+ with its time and the storage's own reason when it fails, and, while a previous storage is being left, the copy from
10
+ it, read again every second while it runs, with its counts and first problems. Starting the copy is the one sensitive
11
+ action: a host's step-up answers its 403 through the host's request. `storagePages({ section, href, ... })` gives the
12
+ settings page (one component per address), `StorageScreen` the page itself; the right is `storage.site.admin`, the
13
+ slot `storage.page.actions`, and a host names its stores with the words `storeNames.<store>` or `storeName`. Words in
14
+ English and Arabic, counts with plurals; the store list joins in the reader's language.
15
+
16
+ ## 0.2.0-next.36
17
+
18
+ A prerelease under npm's `next` tag.
19
+
20
+ - `WidgetBoard`, the design canvas's dashboard widget container and layout, beside `DashboardGrid` (which is unchanged,
21
+ 12 columns by default). Widgets lie on 60 tracks counted from the start edge, each as tall as its content, packed in
22
+ order as high as they fit; `y` is only their order and comes back renumbered 0, 1, 2…. Every widget gets one
23
+ container: its title, then a move grip, Expand / Restore width and the ⋯ menu (grip and Expand show on hover, focus
24
+ or touch, their space kept). Expand stretches it across the board in place and isn't saved. A handle on the end edge
25
+ sets the width (pointer, arrow keys, Home and End), never under the widget's readable minimum (`minWidth`). Dragging
26
+ from the grip moves a ghost and a dashed slot, snapped to neighbours' edges within 2 tracks; over a widget's top half
27
+ it takes that place; Escape cancels. With the grip focused, Left and Right move 5 tracks (Shift 1), Up and Down past
28
+ the neighbour above or below, Home to the top, End to the end, mirrored right to left; each move is announced. The
29
+ ⋯ menu has the host's items, the width presets (half, two-thirds, full) and Move up / down, then the host's red items.
30
+ Below 720 px every widget is full width in order, without handles. `onLayoutChange` fires once per finished gesture.
31
+ `fromTwelve` reads a 12-column layout on 60 tracks; `appendAt` places a new widget.
32
+
3
33
  ## 0.2.0-next.35
4
34
 
5
35
  A prerelease under npm's `next` tag.
package/dist/index.d.ts CHANGED
@@ -1730,6 +1730,94 @@ declare function placeItem(items: GridItem[], w: number, h: number, columns?: nu
1730
1730
  */
1731
1731
  declare function DashboardGrid<T extends GridItem>({ items, columns, rowHeight, editing, onLayoutChange, renderItem, labels, 'aria-label': ariaLabel, loading: own, }: DashboardGridProps<T>): react.JSX.Element;
1732
1732
 
1733
+ declare const TRACKS = 60;
1734
+ /** Width presets in tracks: half, two-thirds, full. */
1735
+ declare const PRESETS: {
1736
+ readonly half: 30;
1737
+ readonly two: 40;
1738
+ readonly full: 60;
1739
+ };
1740
+ interface BoardItem {
1741
+ id: string;
1742
+ x: number;
1743
+ y: number;
1744
+ w: number;
1745
+ }
1746
+ /**
1747
+ * The items with `y` renumbered 0, 1, 2… in (y, x) order, no gaps and no halves, so a stored layout never drifts.
1748
+ * Widths and starts are kept (an expanded or narrow view isn't saved). The items keep their order in the array.
1749
+ */
1750
+ declare function renumber<T extends BoardItem>(items: T[]): T[];
1751
+ /** Where a new item `w` tracks wide goes: after everything, beside the last one when it fits there, else at the start. */
1752
+ declare function appendAt(items: BoardItem[], w?: number): {
1753
+ x: number;
1754
+ y: number;
1755
+ };
1756
+ /** A 12-column layout (DashboardGrid's) read on 60 tracks: five tracks a column, its (y, x) order kept. */
1757
+ declare function fromTwelve<T extends BoardItem>(items: T[]): T[];
1758
+
1759
+ interface WidgetBoardLabels {
1760
+ /** The grip's name: "Move Open bugs". */
1761
+ move: (title: string) => string;
1762
+ /** The resize handle's name: "Width of Open bugs". */
1763
+ resize: (title: string) => string;
1764
+ /** The ⋯ menu's name: "Actions for Open bugs". */
1765
+ actions: (title: string) => string;
1766
+ expand: string;
1767
+ restore: string;
1768
+ half: string;
1769
+ twoThirds: string;
1770
+ full: string;
1771
+ moveUp: string;
1772
+ moveDown: string;
1773
+ /** How to use the grip and the handle from the keyboard, read with them. */
1774
+ instructions: string;
1775
+ /** Said after a move: "Open bugs moved: 2 of 5, column 1". */
1776
+ moved: (title: string, place: number, count: number, column: number) => string;
1777
+ /** Said after a width change: "Open bugs: 40 of 60 tracks". */
1778
+ resized: (title: string, tracks: number) => string;
1779
+ }
1780
+ interface WidgetBoardProps<T extends BoardItem> {
1781
+ /**
1782
+ * The widgets: `x` the start column and `w` the width, in 60 tracks counted from the start edge (right to left
1783
+ * mirrors itself); `y` only their place in the order (0, 1, 2…), never a height: each widget is as tall as its
1784
+ * content, and the board packs them in (y, x) order as high as they fit.
1785
+ */
1786
+ items: T[];
1787
+ /** Whether the layout may change: the grip, the resize handle, the width presets and Move up / down. Expand is for everyone. */
1788
+ editable?: boolean;
1789
+ /**
1790
+ * The layout after a finished gesture: a drop, the end of a resize, one keyboard move or a menu choice; never on each
1791
+ * pointer move, so a host can save it as it comes. `y` comes renumbered 0, 1, 2… with no gaps.
1792
+ */
1793
+ onLayoutChange?: (items: T[]) => void;
1794
+ /** A widget's title, at the start of its header. */
1795
+ title: (item: T) => string;
1796
+ /** A widget's body. `expanded` while it's stretched across the board. */
1797
+ renderItem: (item: T, state: {
1798
+ expanded: boolean;
1799
+ }) => ReactNode;
1800
+ /** The host's own ⋯ items (Edit settings, Duplicate, Remove); the board adds the width presets and moves when editable. */
1801
+ menu?: (item: T) => RowMenuEntry[];
1802
+ /** The narrowest a widget may be made, in px (its readable minimum); 200 when not given. */
1803
+ minWidth?: (item: T) => number;
1804
+ labels: WidgetBoardLabels;
1805
+ 'aria-label': string;
1806
+ /** Its widgets are coming (ADR 0061): placeholder tiles. The nearest `Loading` scope's when not given. */
1807
+ loading?: boolean;
1808
+ }
1809
+ /**
1810
+ * A dashboard's widgets on 60 tracks (the design canvas's shared widget container and its rules). Every widget sits in
1811
+ * one container: its title at the start, then a move grip, Expand / Restore width and the ⋯ menu (grip and Expand show
1812
+ * on hover, focus, touch or while moving; their space is kept). Expand stretches it across the board in place, for as
1813
+ * long as the page is open. A handle on the end edge sets its width, with the pointer or the arrow keys, Home and End.
1814
+ * Dragging from the grip shows the widget following the pointer and a dashed slot where it will land, snapped to its
1815
+ * neighbours' edges; Escape cancels. With the grip focused, Left and Right move it 5 tracks (Shift: 1), Up and Down past
1816
+ * the neighbour above or below, Home to the top, End to the end; each move is announced. Below 720 px every widget is
1817
+ * full width, in order, without handles, and the saved layout is left alone.
1818
+ */
1819
+ declare function WidgetBoard<T extends BoardItem>({ items, editable, onLayoutChange, title, renderItem, menu, minWidth, labels, 'aria-label': ariaLabel, loading: own, }: WidgetBoardProps<T>): react.JSX.Element;
1820
+
1733
1821
  interface CategoryProgressProps {
1734
1822
  todo: number;
1735
1823
  inProgress: number;
@@ -3329,4 +3417,4 @@ interface TooltipProps extends Omit<Tooltip$1.RootProps, 'children'> {
3329
3417
  */
3330
3418
  declare const Tooltip: react.ForwardRefExoticComponent<TooltipProps & react.RefAttributes<HTMLDivElement>>;
3331
3419
 
3332
- 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 };
3420
+ 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, type BoardItem, 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, TRACKS as WIDGET_TRACKS, PRESETS as WIDGET_WIDTHS, WidgetBoard, type WidgetBoardLabels, type WidgetBoardProps, abpConfig, abpListParams, abpListSource, appendAt, 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, fromTwelve, 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, renumber, 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 };