@yuktishaalaa/yuktai 4.6.2 → 4.6.3
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 +10 -49
- package/dist/index.d.ts +10 -49
- package/dist/index.js +57 -55
- package/dist/index.mjs +38 -36
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -111,40 +111,16 @@ declare const voicePlugin: {
|
|
|
111
111
|
execute(input: string): Promise<string>;
|
|
112
112
|
};
|
|
113
113
|
|
|
114
|
-
interface YuktaiGridAIProps$1<T> {
|
|
115
|
-
data: T[];
|
|
116
|
-
columns: {
|
|
117
|
-
key: string;
|
|
118
|
-
label: string;
|
|
119
|
-
type?: "number" | "text" | "date";
|
|
120
|
-
}[];
|
|
121
|
-
onSearch: (query: string) => void;
|
|
122
|
-
onSort?: (key: string, dir: "asc" | "desc") => void;
|
|
123
|
-
theme?: "light" | "dark";
|
|
124
|
-
language?: "en-US" | "en-IN" | "hi-IN" | "te-IN";
|
|
125
|
-
}
|
|
126
|
-
declare function YuktaiGrid<T extends Record<string, unknown>>({ data, columns, onSearch, onSort, theme, language, }: YuktaiGridAIProps$1<T>): react_jsx_runtime.JSX.Element;
|
|
127
|
-
|
|
128
114
|
interface GridColumn<T = Record<string, unknown>> {
|
|
129
|
-
/** Unique key — must match a property in your data */
|
|
130
115
|
key: keyof T & string;
|
|
131
|
-
/** Display label for the header */
|
|
132
116
|
label: string;
|
|
133
|
-
/** Allow sorting on this column (default: true) */
|
|
134
117
|
sortable?: boolean;
|
|
135
|
-
/** Allow filtering on this column (default: true) */
|
|
136
118
|
filterable?: boolean;
|
|
137
|
-
/** Hide this column on mobile (default: false) */
|
|
138
119
|
hiddenOnMobile?: boolean;
|
|
139
|
-
/** Pin this column on tablet view */
|
|
140
120
|
pinned?: boolean;
|
|
141
|
-
/** Column width — number (px) or string (%, fr) */
|
|
142
121
|
width?: number | string;
|
|
143
|
-
/** Custom cell renderer */
|
|
144
122
|
render?: (value: T[keyof T], row: T, index: number) => ReactNode;
|
|
145
|
-
/** Cell alignment */
|
|
146
123
|
align?: "left" | "center" | "right";
|
|
147
|
-
/** Type — affects default formatting and filter UI */
|
|
148
124
|
type?: "text" | "number" | "date" | "boolean" | "badge";
|
|
149
125
|
}
|
|
150
126
|
type SortDirection = "asc" | "desc" | null;
|
|
@@ -162,23 +138,15 @@ type ViewMode = "table" | "card" | "auto";
|
|
|
162
138
|
type GridTheme = "default" | "high-contrast" | "dark" | "color-blind" | "dyslexia";
|
|
163
139
|
type GridLocale = "en-IN" | "en-US" | "te-IN" | "hi-IN" | "ta-IN" | "bn-IN" | "mr-IN" | "kn-IN" | "ml-IN" | "gu-IN" | "pa-IN" | "ur-IN";
|
|
164
140
|
interface AIFeatures {
|
|
165
|
-
/** Enable AI semantic search */
|
|
166
141
|
search?: boolean;
|
|
167
|
-
/** Enable AI row summary */
|
|
168
142
|
summary?: boolean;
|
|
169
|
-
/** Enable anomaly detection */
|
|
170
143
|
anomaly?: boolean;
|
|
171
|
-
/** Enable suggestions */
|
|
172
144
|
suggest?: boolean;
|
|
173
145
|
}
|
|
174
146
|
interface VoiceFeatures {
|
|
175
|
-
/** Voice commands for search/filter/sort */
|
|
176
147
|
control?: boolean;
|
|
177
|
-
/** Read rows aloud on focus */
|
|
178
148
|
speakOnFocus?: boolean;
|
|
179
|
-
/** Read filtered data summary aloud */
|
|
180
149
|
speakSummary?: boolean;
|
|
181
|
-
/** Voice language (defaults to locale) */
|
|
182
150
|
language?: string;
|
|
183
151
|
}
|
|
184
152
|
interface PaginationConfig {
|
|
@@ -203,44 +171,37 @@ interface GridTranslations {
|
|
|
203
171
|
ask: string;
|
|
204
172
|
}
|
|
205
173
|
interface YuktaiGridProps<T = Record<string, unknown>> {
|
|
206
|
-
/** The data to display */
|
|
207
174
|
data: T[];
|
|
208
|
-
/** Column definitions */
|
|
209
175
|
columns: GridColumn<T>[];
|
|
210
|
-
/** View mode — "auto" picks based on screen size */
|
|
211
176
|
view?: ViewMode;
|
|
212
|
-
/** Mobile breakpoint in pixels (default: 768) */
|
|
213
177
|
mobileBreakpoint?: number;
|
|
214
|
-
/** WCAG theme (default: "default") */
|
|
215
178
|
theme?: GridTheme;
|
|
216
|
-
/** Locale (default: "en-US") */
|
|
217
179
|
locale?: GridLocale;
|
|
218
|
-
/** AI features */
|
|
219
180
|
ai?: boolean | AIFeatures;
|
|
220
|
-
/** Voice features */
|
|
221
181
|
voice?: boolean | VoiceFeatures;
|
|
222
|
-
/** Pagination */
|
|
223
182
|
pagination?: boolean | PaginationConfig;
|
|
224
|
-
/** Show search bar */
|
|
225
183
|
search?: boolean;
|
|
226
|
-
/** Multi-row selection */
|
|
227
184
|
selectable?: boolean;
|
|
228
|
-
/** Selected row keys */
|
|
229
185
|
selectedKeys?: string[];
|
|
230
|
-
/** Row key field (default: "id") */
|
|
231
186
|
rowKey?: keyof T & string;
|
|
232
|
-
/** Loading state */
|
|
233
187
|
loading?: boolean;
|
|
234
|
-
/** Custom empty state */
|
|
235
188
|
empty?: ReactNode;
|
|
236
|
-
|
|
189
|
+
highlightIds?: (string | number)[];
|
|
190
|
+
highlightColor?: string;
|
|
191
|
+
autoScrollToHighlight?: boolean;
|
|
237
192
|
onSelectionChange?: (keys: string[]) => void;
|
|
238
193
|
onRowClick?: (row: T, index: number) => void;
|
|
239
194
|
onSortChange?: (sort: SortConfig | null) => void;
|
|
240
|
-
/** Custom className */
|
|
241
195
|
className?: string;
|
|
242
196
|
}
|
|
243
197
|
|
|
198
|
+
type YuktaiGridPropsWithHighlight<T extends Record<string, unknown>> = YuktaiGridProps<T> & {
|
|
199
|
+
highlightIds?: (string | number)[];
|
|
200
|
+
highlightColor?: string;
|
|
201
|
+
autoScrollToHighlight?: boolean;
|
|
202
|
+
};
|
|
203
|
+
declare function YuktaiGrid<T extends Record<string, unknown>>({ data, columns, rowKey, view, mobileBreakpoint, theme, locale, search, selectable, selectedKeys, onSelectionChange, pagination, loading, highlightIds, highlightColor, autoScrollToHighlight, onRowClick, onSortChange, empty, className, }: YuktaiGridPropsWithHighlight<T>): react_jsx_runtime.JSX.Element;
|
|
204
|
+
|
|
244
205
|
interface UseGridOptions<T> {
|
|
245
206
|
data: T[];
|
|
246
207
|
columns: GridColumn<T>[];
|
package/dist/index.d.ts
CHANGED
|
@@ -111,40 +111,16 @@ declare const voicePlugin: {
|
|
|
111
111
|
execute(input: string): Promise<string>;
|
|
112
112
|
};
|
|
113
113
|
|
|
114
|
-
interface YuktaiGridAIProps$1<T> {
|
|
115
|
-
data: T[];
|
|
116
|
-
columns: {
|
|
117
|
-
key: string;
|
|
118
|
-
label: string;
|
|
119
|
-
type?: "number" | "text" | "date";
|
|
120
|
-
}[];
|
|
121
|
-
onSearch: (query: string) => void;
|
|
122
|
-
onSort?: (key: string, dir: "asc" | "desc") => void;
|
|
123
|
-
theme?: "light" | "dark";
|
|
124
|
-
language?: "en-US" | "en-IN" | "hi-IN" | "te-IN";
|
|
125
|
-
}
|
|
126
|
-
declare function YuktaiGrid<T extends Record<string, unknown>>({ data, columns, onSearch, onSort, theme, language, }: YuktaiGridAIProps$1<T>): react_jsx_runtime.JSX.Element;
|
|
127
|
-
|
|
128
114
|
interface GridColumn<T = Record<string, unknown>> {
|
|
129
|
-
/** Unique key — must match a property in your data */
|
|
130
115
|
key: keyof T & string;
|
|
131
|
-
/** Display label for the header */
|
|
132
116
|
label: string;
|
|
133
|
-
/** Allow sorting on this column (default: true) */
|
|
134
117
|
sortable?: boolean;
|
|
135
|
-
/** Allow filtering on this column (default: true) */
|
|
136
118
|
filterable?: boolean;
|
|
137
|
-
/** Hide this column on mobile (default: false) */
|
|
138
119
|
hiddenOnMobile?: boolean;
|
|
139
|
-
/** Pin this column on tablet view */
|
|
140
120
|
pinned?: boolean;
|
|
141
|
-
/** Column width — number (px) or string (%, fr) */
|
|
142
121
|
width?: number | string;
|
|
143
|
-
/** Custom cell renderer */
|
|
144
122
|
render?: (value: T[keyof T], row: T, index: number) => ReactNode;
|
|
145
|
-
/** Cell alignment */
|
|
146
123
|
align?: "left" | "center" | "right";
|
|
147
|
-
/** Type — affects default formatting and filter UI */
|
|
148
124
|
type?: "text" | "number" | "date" | "boolean" | "badge";
|
|
149
125
|
}
|
|
150
126
|
type SortDirection = "asc" | "desc" | null;
|
|
@@ -162,23 +138,15 @@ type ViewMode = "table" | "card" | "auto";
|
|
|
162
138
|
type GridTheme = "default" | "high-contrast" | "dark" | "color-blind" | "dyslexia";
|
|
163
139
|
type GridLocale = "en-IN" | "en-US" | "te-IN" | "hi-IN" | "ta-IN" | "bn-IN" | "mr-IN" | "kn-IN" | "ml-IN" | "gu-IN" | "pa-IN" | "ur-IN";
|
|
164
140
|
interface AIFeatures {
|
|
165
|
-
/** Enable AI semantic search */
|
|
166
141
|
search?: boolean;
|
|
167
|
-
/** Enable AI row summary */
|
|
168
142
|
summary?: boolean;
|
|
169
|
-
/** Enable anomaly detection */
|
|
170
143
|
anomaly?: boolean;
|
|
171
|
-
/** Enable suggestions */
|
|
172
144
|
suggest?: boolean;
|
|
173
145
|
}
|
|
174
146
|
interface VoiceFeatures {
|
|
175
|
-
/** Voice commands for search/filter/sort */
|
|
176
147
|
control?: boolean;
|
|
177
|
-
/** Read rows aloud on focus */
|
|
178
148
|
speakOnFocus?: boolean;
|
|
179
|
-
/** Read filtered data summary aloud */
|
|
180
149
|
speakSummary?: boolean;
|
|
181
|
-
/** Voice language (defaults to locale) */
|
|
182
150
|
language?: string;
|
|
183
151
|
}
|
|
184
152
|
interface PaginationConfig {
|
|
@@ -203,44 +171,37 @@ interface GridTranslations {
|
|
|
203
171
|
ask: string;
|
|
204
172
|
}
|
|
205
173
|
interface YuktaiGridProps<T = Record<string, unknown>> {
|
|
206
|
-
/** The data to display */
|
|
207
174
|
data: T[];
|
|
208
|
-
/** Column definitions */
|
|
209
175
|
columns: GridColumn<T>[];
|
|
210
|
-
/** View mode — "auto" picks based on screen size */
|
|
211
176
|
view?: ViewMode;
|
|
212
|
-
/** Mobile breakpoint in pixels (default: 768) */
|
|
213
177
|
mobileBreakpoint?: number;
|
|
214
|
-
/** WCAG theme (default: "default") */
|
|
215
178
|
theme?: GridTheme;
|
|
216
|
-
/** Locale (default: "en-US") */
|
|
217
179
|
locale?: GridLocale;
|
|
218
|
-
/** AI features */
|
|
219
180
|
ai?: boolean | AIFeatures;
|
|
220
|
-
/** Voice features */
|
|
221
181
|
voice?: boolean | VoiceFeatures;
|
|
222
|
-
/** Pagination */
|
|
223
182
|
pagination?: boolean | PaginationConfig;
|
|
224
|
-
/** Show search bar */
|
|
225
183
|
search?: boolean;
|
|
226
|
-
/** Multi-row selection */
|
|
227
184
|
selectable?: boolean;
|
|
228
|
-
/** Selected row keys */
|
|
229
185
|
selectedKeys?: string[];
|
|
230
|
-
/** Row key field (default: "id") */
|
|
231
186
|
rowKey?: keyof T & string;
|
|
232
|
-
/** Loading state */
|
|
233
187
|
loading?: boolean;
|
|
234
|
-
/** Custom empty state */
|
|
235
188
|
empty?: ReactNode;
|
|
236
|
-
|
|
189
|
+
highlightIds?: (string | number)[];
|
|
190
|
+
highlightColor?: string;
|
|
191
|
+
autoScrollToHighlight?: boolean;
|
|
237
192
|
onSelectionChange?: (keys: string[]) => void;
|
|
238
193
|
onRowClick?: (row: T, index: number) => void;
|
|
239
194
|
onSortChange?: (sort: SortConfig | null) => void;
|
|
240
|
-
/** Custom className */
|
|
241
195
|
className?: string;
|
|
242
196
|
}
|
|
243
197
|
|
|
198
|
+
type YuktaiGridPropsWithHighlight<T extends Record<string, unknown>> = YuktaiGridProps<T> & {
|
|
199
|
+
highlightIds?: (string | number)[];
|
|
200
|
+
highlightColor?: string;
|
|
201
|
+
autoScrollToHighlight?: boolean;
|
|
202
|
+
};
|
|
203
|
+
declare function YuktaiGrid<T extends Record<string, unknown>>({ data, columns, rowKey, view, mobileBreakpoint, theme, locale, search, selectable, selectedKeys, onSelectionChange, pagination, loading, highlightIds, highlightColor, autoScrollToHighlight, onRowClick, onSortChange, empty, className, }: YuktaiGridPropsWithHighlight<T>): react_jsx_runtime.JSX.Element;
|
|
204
|
+
|
|
244
205
|
interface UseGridOptions<T> {
|
|
245
206
|
data: T[];
|
|
246
207
|
columns: GridColumn<T>[];
|