@starasia/admin 8.4.2 → 8.5.0

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.
@@ -9,6 +9,7 @@ import { FilterBarProps } from './types';
9
9
  * storage adapter. Successor to `AdvanceFilterBar`.
10
10
  *
11
11
  * Layout — left: Add Filter + pills + Reset; right: result count + page size +
12
- * pager + search + saved views + columns.
12
+ * pager + search + saved views + columns. `searchPosition='left'` moves the
13
+ * search control into the left cluster (after Add Filter) instead of the right.
13
14
  */
14
15
  export declare const FilterBar: React.FC<FilterBarProps>;
@@ -126,6 +126,13 @@ export interface FilterBarProps {
126
126
  searchPlaceholder?: string;
127
127
  /** Single-key shortcut that focuses search. Default `'/'`. */
128
128
  searchShortcut?: string;
129
+ /**
130
+ * Posisi SearchBox di layout desktop. `'left'` = tepat setelah Add Filter
131
+ * (sebelum pills), berguna saat halaman hanya pakai search sehingga cluster
132
+ * kiri tidak kosong. Default `'right'`. Tidak berpengaruh di mobile (search
133
+ * selalu di kiri toolbar).
134
+ */
135
+ searchPosition?: 'left' | 'right';
129
136
  /** Pagination meta from the API (drives result count + pager). */
130
137
  pagination?: Pagination;
131
138
  /** URL param for page size. Default `'perPage'`. */
@@ -1,4 +1,4 @@
1
1
  import { default as React } from 'react';
2
2
  import { TableLayoutProps } from './types';
3
3
 
4
- export declare const TableLayout: <T>({ columns, data, getRowKey, size, resizable, widthStorageKey, columnState, onColumnStateChange, columnMenu, sort, defaultSort, onSortChange, height, mobileLayout, mobileBreakpoint, groupSeparator, summary, emptyState, rowActions, }: TableLayoutProps<T>) => React.JSX.Element;
4
+ export declare const TableLayout: <T>({ columns, data, getRowKey, size, resizable, widthStorageKey, columnState, onColumnStateChange, columnMenu, sort, defaultSort, onSortChange, height, mobileLayout, mobileBreakpoint, groupSeparator, summary, emptyState, loading, loadingRows, rowActions, }: TableLayoutProps<T>) => React.JSX.Element;
@@ -177,6 +177,23 @@ export interface TableLayoutProps<T> {
177
177
  groupSeparator?: (row: T, index: number, prevRow: T | undefined) => ReactNode | null;
178
178
  /** baris summary/total full-width di paling bawah body */
179
179
  summary?: ReactNode;
180
- /** ditampilkan saat `data` kosong */
181
- emptyState?: ReactNode;
180
+ /**
181
+ * Tampilan saat `data` kosong.
182
+ * - `content`: node yang dirender (terpusat secara vertikal & horizontal).
183
+ * - `minHeight`: tinggi minimum kontainer (default 320). number (px) atau
184
+ * string CSS (mis. '50vh' | '240px').
185
+ */
186
+ emptyState?: {
187
+ content?: ReactNode;
188
+ minHeight?: number | string;
189
+ };
190
+ /**
191
+ * Saat `true`, body menampilkan placeholder Skeleton (bukan data / emptyState).
192
+ * Pakai ini selama request berlangsung supaya tidak ada flicker "data kosong"
193
+ * saat `data` masih `[]` padahal sedang fetch. Mengikuti `columns`, `mobileLayout`,
194
+ * dan `rowActions` yang aktif.
195
+ */
196
+ loading?: boolean;
197
+ /** jumlah baris/kartu skeleton yang dirender saat `loading` (default 8) */
198
+ loadingRows?: number;
182
199
  }