@nivaro/react 0.1.225 → 0.1.226
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/full.css +1 -1
- package/dist/index.d.ts +36 -0
- package/dist/index.js +16736 -16535
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -54,6 +54,10 @@ export declare const ACTIVE_USER_OPTION_FILTER: {
|
|
|
54
54
|
})[];
|
|
55
55
|
};
|
|
56
56
|
|
|
57
|
+
/** A status whose expiry has passed reads as no status (the server does the
|
|
58
|
+
* same on /presence/online — the row is only cleared lazily). */
|
|
59
|
+
export declare function activeCustomStatus(raw: unknown): CustomStatus | null;
|
|
60
|
+
|
|
57
61
|
declare interface ActiveFilter {
|
|
58
62
|
id: string;
|
|
59
63
|
path: string[];
|
|
@@ -854,6 +858,36 @@ export declare function CustomActionButtons({ collection, itemId, draft }: {
|
|
|
854
858
|
draft: Record<string, unknown>;
|
|
855
859
|
}): JSX.Element | null;
|
|
856
860
|
|
|
861
|
+
/** `nivaro_users.preferences.custom_status` — free text + emoji beside the
|
|
862
|
+
* presence state, self-clearing at `expires_at`. */
|
|
863
|
+
export declare type CustomStatus = {
|
|
864
|
+
text: string;
|
|
865
|
+
emoji: string | null;
|
|
866
|
+
expires_at?: string | null;
|
|
867
|
+
};
|
|
868
|
+
|
|
869
|
+
/**
|
|
870
|
+
* The ONE editor for a user's own custom status — the chat panel's Online tab
|
|
871
|
+
* and the profile header both render it, so the two can never disagree.
|
|
872
|
+
* Saves through PATCH /users/me/preferences and invalidates the presence
|
|
873
|
+
* roster plus any query keys the host names (`invalidate`).
|
|
874
|
+
*/
|
|
875
|
+
export declare function CustomStatusEditor({ status, invalidate, theme, showExpiry, className }: {
|
|
876
|
+
status: CustomStatus | null;
|
|
877
|
+
/** Extra query-key prefixes to invalidate after a save (the host's own
|
|
878
|
+
* "me" query). ['presence-online'] is always included. */
|
|
879
|
+
invalidate?: ReadonlyArray<readonly unknown[]>;
|
|
880
|
+
/** Class slots (chat theme) — defaults use the brand tokens. */
|
|
881
|
+
theme?: {
|
|
882
|
+
accentSoft?: string;
|
|
883
|
+
input?: string;
|
|
884
|
+
action?: string;
|
|
885
|
+
};
|
|
886
|
+
/** Profile variant: show "until 3:00 PM" beside the status. */
|
|
887
|
+
showExpiry?: boolean;
|
|
888
|
+
className?: string;
|
|
889
|
+
}): JSX.Element;
|
|
890
|
+
|
|
857
891
|
export declare function DataTable<T = Record<string, unknown>>({ columns, rows, rowKey, total, page, limit, isLoading, isError, errorMessage, sort, onSortChange, onPageChange, onRowClick, onRowContextMenu, searchValue, onSearchChange, searchPlaceholder, filterDefs, filterValues, onFilterChange, toolbarRight, emptyMessage, minBodyHeight, fillHeight, hideFilterRow, nowrapCells, density, pinFirstColumn, columnPins, onColumnPinChange, columnFilterRow, hScrollProxy, selectedIds, onSelectionChange, rowClassName, enterKey, rowGroups, collapsedGroups, onToggleGroup }: DataTableProps<T>): React_2.JSX.Element;
|
|
858
892
|
|
|
859
893
|
export declare interface DataTableProps<T = Record<string, unknown>> {
|
|
@@ -1365,6 +1399,8 @@ export declare function formatNumber(n: number | null | undefined): string;
|
|
|
1365
1399
|
|
|
1366
1400
|
export declare function formatRelative(date: string | Date): string;
|
|
1367
1401
|
|
|
1402
|
+
export declare function formatStatusExpiry(expiresAt: string | null | undefined): string | null;
|
|
1403
|
+
|
|
1368
1404
|
export declare function formatValue(raw: string, cfg: ColumnFormatConfig): string;
|
|
1369
1405
|
|
|
1370
1406
|
export declare type FormDirtyState = {
|