warqadui 0.0.30 → 0.0.31
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.mts +35 -4
- package/dist/index.d.ts +35 -4
- package/dist/index.js +282 -138
- package/dist/index.mjs +283 -140
- package/dist/styles.js +17 -30
- package/dist/styles.mjs +17 -30
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -421,9 +421,10 @@ interface DataTableProps<TData, TValue> {
|
|
|
421
421
|
}) => void;
|
|
422
422
|
selectable?: boolean;
|
|
423
423
|
filterables?: boolean;
|
|
424
|
+
emptyState?: React__default.ReactNode;
|
|
424
425
|
}
|
|
425
426
|
declare function DataTable<TData, TValue>({ columns: userColumns, data, isLoading, pageRows, searchPlaceholder, className, verticalLines, rowPadding, index, renderSubComponent, hasSubComponent, // default to true
|
|
426
|
-
defaultExpanded, onChange, selectable, filterables, }: DataTableProps<TData, TValue>): react_jsx_runtime.JSX.Element;
|
|
427
|
+
defaultExpanded, onChange, selectable, filterables, emptyState, }: DataTableProps<TData, TValue>): react_jsx_runtime.JSX.Element;
|
|
427
428
|
|
|
428
429
|
declare module "@tanstack/react-table" {
|
|
429
430
|
interface ColumnMeta<TData extends RowData, TValue> {
|
|
@@ -464,9 +465,10 @@ interface PostTableProps<TData> {
|
|
|
464
465
|
}) => React__default.ReactNode;
|
|
465
466
|
hasSubComponent?: (row: TData) => boolean;
|
|
466
467
|
defaultExpanded?: boolean;
|
|
468
|
+
submitLoading?: boolean;
|
|
467
469
|
}
|
|
468
470
|
declare function PostTable<TData extends Record<string, any>>({ columns: userColumns, data: controlledData, onChange, isLoading, className, verticalLines, rowPadding, index, renderAddButton, renderSubComponent, hasSubComponent, // default to true if renderSubComponent is provided
|
|
469
|
-
defaultExpanded, }: PostTableProps<TData>): react_jsx_runtime.JSX.Element;
|
|
471
|
+
defaultExpanded, submitLoading, }: PostTableProps<TData>): react_jsx_runtime.JSX.Element;
|
|
470
472
|
|
|
471
473
|
type SimpleTableColumn<TData> = ColumnDef<TData, any> & {
|
|
472
474
|
key?: string;
|
|
@@ -491,8 +493,9 @@ interface SimpleTableProps<TData> {
|
|
|
491
493
|
isLoading?: boolean;
|
|
492
494
|
title?: string;
|
|
493
495
|
enableSearch?: boolean;
|
|
496
|
+
emptyState?: React__default.ReactNode;
|
|
494
497
|
}
|
|
495
|
-
declare function SimpleTable<TData>({ columns: userColumns, data, className, renderFooter: componentFooter, rowPadding, verticalLines, index, startIndex, isLoading, title, enableSearch, }: SimpleTableProps<TData>): react_jsx_runtime.JSX.Element;
|
|
498
|
+
declare function SimpleTable<TData>({ columns: userColumns, data, className, renderFooter: componentFooter, rowPadding, verticalLines, index, startIndex, isLoading, title, enableSearch, emptyState, }: SimpleTableProps<TData>): react_jsx_runtime.JSX.Element;
|
|
496
499
|
|
|
497
500
|
interface BadgeProps extends HTMLAttributes<HTMLSpanElement> {
|
|
498
501
|
variant?: "primary" | "danger" | "warning" | "success";
|
|
@@ -672,4 +675,32 @@ interface PdfOptions {
|
|
|
672
675
|
*/
|
|
673
676
|
declare const generatePdf: (elementId: string, options?: PdfOptions) => Promise<void>;
|
|
674
677
|
|
|
675
|
-
|
|
678
|
+
/**
|
|
679
|
+
* A robust localStorage manager utility with TypeScript support.
|
|
680
|
+
* Suitable for production environments and reusable frontend packages.
|
|
681
|
+
*/
|
|
682
|
+
/**
|
|
683
|
+
* Interface for the storage utility to support method overloads.
|
|
684
|
+
*/
|
|
685
|
+
interface StorageManager {
|
|
686
|
+
/** Saves a value to localStorage using JSON.stringify. */
|
|
687
|
+
set<T>(key: string, value: T): void;
|
|
688
|
+
/** Retrieves a parsed value from localStorage. */
|
|
689
|
+
get<T>(key: string): T | null;
|
|
690
|
+
/** Retrieves all items from localStorage as an object. */
|
|
691
|
+
get(): Record<string, any>;
|
|
692
|
+
/** Removes a specific key from localStorage. */
|
|
693
|
+
remove(key: string): void;
|
|
694
|
+
/** Clears all localStorage. */
|
|
695
|
+
clear(): void;
|
|
696
|
+
/** Returns true if the key exists. */
|
|
697
|
+
has(key: string): boolean;
|
|
698
|
+
/** Returns all localStorage keys. */
|
|
699
|
+
keys(): string[];
|
|
700
|
+
}
|
|
701
|
+
/**
|
|
702
|
+
* Storage utility to manage browser localStorage with type safety and error handling.
|
|
703
|
+
*/
|
|
704
|
+
declare const storage: StorageManager;
|
|
705
|
+
|
|
706
|
+
export { A4DataView, Badge, type BadgeProps, Branding, type BrandingProps, Button, type ButtonProps, Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, ClassicSpin, CodeBlock, DashboardLayout, DataTable, type DataTableColumn, DateInput, type DateInputProps, type DeleteFunction, type FetchFunction, type FetchProps, Fields, InfoGrid, Input, type InputProps, LoadingBox, LoadingSpin, Modal, type ModalProps, type NavItem, type NavItems, type Option, OverlaySpin, PageA4, PageHeader, type PdfOptions, PhoneInput, type PhoneInputProps, type PostFunction, PostTable, type PostTableActions, type PutFunction, SearchApi, SearchApiContent, SearchApiInput, SearchApiItem, type SearchApiProps, SearchApiTrigger, Select, SelectContent, SelectItem, type SelectProps, SelectTrigger, SimpleTable, type SimpleTableColumn, type StorageManager, type StoreConfig, Textarea, type TextareaProps, type ThemeConfig, ThemeProvider, ThemeToggle, type UseModalReturn, type WarqadConfig, type WarqadConfigContextType, WarqadProvider, generatePdf, storage, useA4StatementView, useApi, useModal, useSearchApiContext, useSelectContext, useTheme, useTransaction, useWarqadConfig };
|
package/dist/index.d.ts
CHANGED
|
@@ -421,9 +421,10 @@ interface DataTableProps<TData, TValue> {
|
|
|
421
421
|
}) => void;
|
|
422
422
|
selectable?: boolean;
|
|
423
423
|
filterables?: boolean;
|
|
424
|
+
emptyState?: React__default.ReactNode;
|
|
424
425
|
}
|
|
425
426
|
declare function DataTable<TData, TValue>({ columns: userColumns, data, isLoading, pageRows, searchPlaceholder, className, verticalLines, rowPadding, index, renderSubComponent, hasSubComponent, // default to true
|
|
426
|
-
defaultExpanded, onChange, selectable, filterables, }: DataTableProps<TData, TValue>): react_jsx_runtime.JSX.Element;
|
|
427
|
+
defaultExpanded, onChange, selectable, filterables, emptyState, }: DataTableProps<TData, TValue>): react_jsx_runtime.JSX.Element;
|
|
427
428
|
|
|
428
429
|
declare module "@tanstack/react-table" {
|
|
429
430
|
interface ColumnMeta<TData extends RowData, TValue> {
|
|
@@ -464,9 +465,10 @@ interface PostTableProps<TData> {
|
|
|
464
465
|
}) => React__default.ReactNode;
|
|
465
466
|
hasSubComponent?: (row: TData) => boolean;
|
|
466
467
|
defaultExpanded?: boolean;
|
|
468
|
+
submitLoading?: boolean;
|
|
467
469
|
}
|
|
468
470
|
declare function PostTable<TData extends Record<string, any>>({ columns: userColumns, data: controlledData, onChange, isLoading, className, verticalLines, rowPadding, index, renderAddButton, renderSubComponent, hasSubComponent, // default to true if renderSubComponent is provided
|
|
469
|
-
defaultExpanded, }: PostTableProps<TData>): react_jsx_runtime.JSX.Element;
|
|
471
|
+
defaultExpanded, submitLoading, }: PostTableProps<TData>): react_jsx_runtime.JSX.Element;
|
|
470
472
|
|
|
471
473
|
type SimpleTableColumn<TData> = ColumnDef<TData, any> & {
|
|
472
474
|
key?: string;
|
|
@@ -491,8 +493,9 @@ interface SimpleTableProps<TData> {
|
|
|
491
493
|
isLoading?: boolean;
|
|
492
494
|
title?: string;
|
|
493
495
|
enableSearch?: boolean;
|
|
496
|
+
emptyState?: React__default.ReactNode;
|
|
494
497
|
}
|
|
495
|
-
declare function SimpleTable<TData>({ columns: userColumns, data, className, renderFooter: componentFooter, rowPadding, verticalLines, index, startIndex, isLoading, title, enableSearch, }: SimpleTableProps<TData>): react_jsx_runtime.JSX.Element;
|
|
498
|
+
declare function SimpleTable<TData>({ columns: userColumns, data, className, renderFooter: componentFooter, rowPadding, verticalLines, index, startIndex, isLoading, title, enableSearch, emptyState, }: SimpleTableProps<TData>): react_jsx_runtime.JSX.Element;
|
|
496
499
|
|
|
497
500
|
interface BadgeProps extends HTMLAttributes<HTMLSpanElement> {
|
|
498
501
|
variant?: "primary" | "danger" | "warning" | "success";
|
|
@@ -672,4 +675,32 @@ interface PdfOptions {
|
|
|
672
675
|
*/
|
|
673
676
|
declare const generatePdf: (elementId: string, options?: PdfOptions) => Promise<void>;
|
|
674
677
|
|
|
675
|
-
|
|
678
|
+
/**
|
|
679
|
+
* A robust localStorage manager utility with TypeScript support.
|
|
680
|
+
* Suitable for production environments and reusable frontend packages.
|
|
681
|
+
*/
|
|
682
|
+
/**
|
|
683
|
+
* Interface for the storage utility to support method overloads.
|
|
684
|
+
*/
|
|
685
|
+
interface StorageManager {
|
|
686
|
+
/** Saves a value to localStorage using JSON.stringify. */
|
|
687
|
+
set<T>(key: string, value: T): void;
|
|
688
|
+
/** Retrieves a parsed value from localStorage. */
|
|
689
|
+
get<T>(key: string): T | null;
|
|
690
|
+
/** Retrieves all items from localStorage as an object. */
|
|
691
|
+
get(): Record<string, any>;
|
|
692
|
+
/** Removes a specific key from localStorage. */
|
|
693
|
+
remove(key: string): void;
|
|
694
|
+
/** Clears all localStorage. */
|
|
695
|
+
clear(): void;
|
|
696
|
+
/** Returns true if the key exists. */
|
|
697
|
+
has(key: string): boolean;
|
|
698
|
+
/** Returns all localStorage keys. */
|
|
699
|
+
keys(): string[];
|
|
700
|
+
}
|
|
701
|
+
/**
|
|
702
|
+
* Storage utility to manage browser localStorage with type safety and error handling.
|
|
703
|
+
*/
|
|
704
|
+
declare const storage: StorageManager;
|
|
705
|
+
|
|
706
|
+
export { A4DataView, Badge, type BadgeProps, Branding, type BrandingProps, Button, type ButtonProps, Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, ClassicSpin, CodeBlock, DashboardLayout, DataTable, type DataTableColumn, DateInput, type DateInputProps, type DeleteFunction, type FetchFunction, type FetchProps, Fields, InfoGrid, Input, type InputProps, LoadingBox, LoadingSpin, Modal, type ModalProps, type NavItem, type NavItems, type Option, OverlaySpin, PageA4, PageHeader, type PdfOptions, PhoneInput, type PhoneInputProps, type PostFunction, PostTable, type PostTableActions, type PutFunction, SearchApi, SearchApiContent, SearchApiInput, SearchApiItem, type SearchApiProps, SearchApiTrigger, Select, SelectContent, SelectItem, type SelectProps, SelectTrigger, SimpleTable, type SimpleTableColumn, type StorageManager, type StoreConfig, Textarea, type TextareaProps, type ThemeConfig, ThemeProvider, ThemeToggle, type UseModalReturn, type WarqadConfig, type WarqadConfigContextType, WarqadProvider, generatePdf, storage, useA4StatementView, useApi, useModal, useSearchApiContext, useSelectContext, useTheme, useTransaction, useWarqadConfig };
|