@mshuja288/aksuicore 0.4.0 → 0.4.2
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 +11 -0
- package/dist/aksui.css +270 -26
- package/dist/index.cjs +548 -271
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +20 -2
- package/dist/index.d.ts +20 -2
- package/dist/index.js +548 -271
- package/dist/index.js.map +1 -1
- package/package.json +1 -2
- package/src/patterns/RecordWorkspace.tsx +574 -252
- package/src/patterns/index.ts +3 -0
- package/src/theme/patterns.css +267 -25
- package/src/theme/primitives.css +3 -1
package/dist/index.d.cts
CHANGED
|
@@ -196,7 +196,20 @@ type ExportColumnRef = {
|
|
|
196
196
|
key: string;
|
|
197
197
|
header: string;
|
|
198
198
|
};
|
|
199
|
-
|
|
199
|
+
type BulkImportMode = "insert" | "update" | "upsert";
|
|
200
|
+
type BulkImportError = {
|
|
201
|
+
row: number;
|
|
202
|
+
field?: string | null;
|
|
203
|
+
code: string;
|
|
204
|
+
message: string;
|
|
205
|
+
};
|
|
206
|
+
type BulkImportResult = {
|
|
207
|
+
totalRows: number;
|
|
208
|
+
failed: number;
|
|
209
|
+
applied: boolean;
|
|
210
|
+
errors: BulkImportError[];
|
|
211
|
+
};
|
|
212
|
+
declare function RecordWorkspace<T>({ title, columns, items, rowKey, empty, onAdd, addLabel, canAdd, onView, onUpdate, onDelete, canUpdate, canDelete, onDownload, canDownload, canExport, downloadBusy, onBulkImport, canImport, importBusy, showColumnPicker, columnPrefsKey, visibleColumnKeys, defaultVisibleColumnKeys, onVisibleColumnKeysChange, toolbar, form, }: {
|
|
200
213
|
title: string;
|
|
201
214
|
columns: TableColumn<T>[];
|
|
202
215
|
items: T[];
|
|
@@ -215,8 +228,13 @@ declare function RecordWorkspace<T>({ title, columns, items, rowKey, empty, onAd
|
|
|
215
228
|
* Second argument lists currently visible columns (exportKey ?? key).
|
|
216
229
|
*/
|
|
217
230
|
onDownload?: (format: ExportDownloadFormat, columns: ExportColumnRef[]) => void;
|
|
231
|
+
/** Alias for `canDownload` (RBAC). When set, export requires this and `canDownload` to be true. */
|
|
232
|
+
canExport?: boolean;
|
|
218
233
|
canDownload?: boolean;
|
|
219
234
|
downloadBusy?: boolean;
|
|
235
|
+
onBulkImport?: (mode: BulkImportMode, file: File) => Promise<BulkImportResult>;
|
|
236
|
+
canImport?: boolean;
|
|
237
|
+
importBusy?: boolean;
|
|
220
238
|
/** Column checklist in the side rail. Default true. */
|
|
221
239
|
showColumnPicker?: boolean;
|
|
222
240
|
/** Persist visible column keys in localStorage under this key. */
|
|
@@ -233,4 +251,4 @@ declare function RecordWorkspace<T>({ title, columns, items, rowKey, empty, onAd
|
|
|
233
251
|
/** @deprecated Prefer RecordWorkspace — alias kept for configurator migration */
|
|
234
252
|
declare const RecordTable: typeof RecordWorkspace;
|
|
235
253
|
|
|
236
|
-
export { type AksuiTokenName, AppSelect, type AppSelectOption, AppShell, type AppShellProps, Button, type ButtonVariant, ConfirmDeleteDialog, DateField, Dialog, type ExportColumnRef, type ExportDownloadFormat, FormActions, FormDialog, type MobileNavMode, type PageSizeOption, Pagination, RecordTable, RecordWorkspace, Select, type SelectOption, SideNav, type SideNavItem, Snackbar, StatusMessage, type TableColumn, Topbar, aksuiThemeVersion, aksuiTokens };
|
|
254
|
+
export { type AksuiTokenName, AppSelect, type AppSelectOption, AppShell, type AppShellProps, type BulkImportError, type BulkImportMode, type BulkImportResult, Button, type ButtonVariant, ConfirmDeleteDialog, DateField, Dialog, type ExportColumnRef, type ExportDownloadFormat, FormActions, FormDialog, type MobileNavMode, type PageSizeOption, Pagination, RecordTable, RecordWorkspace, Select, type SelectOption, SideNav, type SideNavItem, Snackbar, StatusMessage, type TableColumn, Topbar, aksuiThemeVersion, aksuiTokens };
|
package/dist/index.d.ts
CHANGED
|
@@ -196,7 +196,20 @@ type ExportColumnRef = {
|
|
|
196
196
|
key: string;
|
|
197
197
|
header: string;
|
|
198
198
|
};
|
|
199
|
-
|
|
199
|
+
type BulkImportMode = "insert" | "update" | "upsert";
|
|
200
|
+
type BulkImportError = {
|
|
201
|
+
row: number;
|
|
202
|
+
field?: string | null;
|
|
203
|
+
code: string;
|
|
204
|
+
message: string;
|
|
205
|
+
};
|
|
206
|
+
type BulkImportResult = {
|
|
207
|
+
totalRows: number;
|
|
208
|
+
failed: number;
|
|
209
|
+
applied: boolean;
|
|
210
|
+
errors: BulkImportError[];
|
|
211
|
+
};
|
|
212
|
+
declare function RecordWorkspace<T>({ title, columns, items, rowKey, empty, onAdd, addLabel, canAdd, onView, onUpdate, onDelete, canUpdate, canDelete, onDownload, canDownload, canExport, downloadBusy, onBulkImport, canImport, importBusy, showColumnPicker, columnPrefsKey, visibleColumnKeys, defaultVisibleColumnKeys, onVisibleColumnKeysChange, toolbar, form, }: {
|
|
200
213
|
title: string;
|
|
201
214
|
columns: TableColumn<T>[];
|
|
202
215
|
items: T[];
|
|
@@ -215,8 +228,13 @@ declare function RecordWorkspace<T>({ title, columns, items, rowKey, empty, onAd
|
|
|
215
228
|
* Second argument lists currently visible columns (exportKey ?? key).
|
|
216
229
|
*/
|
|
217
230
|
onDownload?: (format: ExportDownloadFormat, columns: ExportColumnRef[]) => void;
|
|
231
|
+
/** Alias for `canDownload` (RBAC). When set, export requires this and `canDownload` to be true. */
|
|
232
|
+
canExport?: boolean;
|
|
218
233
|
canDownload?: boolean;
|
|
219
234
|
downloadBusy?: boolean;
|
|
235
|
+
onBulkImport?: (mode: BulkImportMode, file: File) => Promise<BulkImportResult>;
|
|
236
|
+
canImport?: boolean;
|
|
237
|
+
importBusy?: boolean;
|
|
220
238
|
/** Column checklist in the side rail. Default true. */
|
|
221
239
|
showColumnPicker?: boolean;
|
|
222
240
|
/** Persist visible column keys in localStorage under this key. */
|
|
@@ -233,4 +251,4 @@ declare function RecordWorkspace<T>({ title, columns, items, rowKey, empty, onAd
|
|
|
233
251
|
/** @deprecated Prefer RecordWorkspace — alias kept for configurator migration */
|
|
234
252
|
declare const RecordTable: typeof RecordWorkspace;
|
|
235
253
|
|
|
236
|
-
export { type AksuiTokenName, AppSelect, type AppSelectOption, AppShell, type AppShellProps, Button, type ButtonVariant, ConfirmDeleteDialog, DateField, Dialog, type ExportColumnRef, type ExportDownloadFormat, FormActions, FormDialog, type MobileNavMode, type PageSizeOption, Pagination, RecordTable, RecordWorkspace, Select, type SelectOption, SideNav, type SideNavItem, Snackbar, StatusMessage, type TableColumn, Topbar, aksuiThemeVersion, aksuiTokens };
|
|
254
|
+
export { type AksuiTokenName, AppSelect, type AppSelectOption, AppShell, type AppShellProps, type BulkImportError, type BulkImportMode, type BulkImportResult, Button, type ButtonVariant, ConfirmDeleteDialog, DateField, Dialog, type ExportColumnRef, type ExportDownloadFormat, FormActions, FormDialog, type MobileNavMode, type PageSizeOption, Pagination, RecordTable, RecordWorkspace, Select, type SelectOption, SideNav, type SideNavItem, Snackbar, StatusMessage, type TableColumn, Topbar, aksuiThemeVersion, aksuiTokens };
|