alepha 0.11.2 → 0.11.4
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/api/files.d.ts +1 -439
- package/api/jobs.d.ts +1 -218
- package/api/notifications.d.ts +1 -264
- package/api/users.d.ts +1 -924
- package/batch.d.ts +1 -585
- package/bucket.d.ts +1 -507
- package/cache/redis.d.ts +1 -40
- package/cache.d.ts +1 -288
- package/command.d.ts +1 -238
- package/core.d.ts +1 -1563
- package/datetime.d.ts +5 -3
- package/devtools.d.ts +1 -368
- package/email.d.ts +1 -144
- package/fake.cjs +8 -0
- package/fake.d.ts +1 -0
- package/fake.js +1 -0
- package/file.d.ts +1 -53
- package/lock/redis.d.ts +1 -24
- package/lock.d.ts +1 -552
- package/logger.d.ts +1 -284
- package/package.json +57 -50
- package/postgres.d.ts +1 -1931
- package/queue/redis.d.ts +1 -29
- package/queue.d.ts +1 -760
- package/react/auth.d.ts +1 -499
- package/react/form.d.ts +1 -188
- package/react/head.d.ts +1 -120
- package/react/i18n.d.ts +1 -118
- package/react.d.ts +1 -929
- package/redis.d.ts +1 -82
- package/scheduler.d.ts +1 -145
- package/security.d.ts +1 -586
- package/server/cache.d.ts +1 -163
- package/server/compress.d.ts +1 -32
- package/server/cookies.d.ts +1 -144
- package/server/cors.d.ts +1 -27
- package/server/health.d.ts +1 -59
- package/server/helmet.d.ts +1 -69
- package/server/links.d.ts +1 -316
- package/server/metrics.d.ts +1 -35
- package/server/multipart.d.ts +1 -42
- package/server/proxy.d.ts +1 -234
- package/server/security.d.ts +1 -87
- package/server/static.d.ts +1 -119
- package/server/swagger.d.ts +1 -148
- package/server.d.ts +1 -849
- package/topic/redis.d.ts +1 -42
- package/topic.d.ts +1 -819
- package/ui.d.ts +1 -619
- package/vite.d.ts +1 -197
package/ui.d.ts
CHANGED
|
@@ -1,619 +1 @@
|
|
|
1
|
-
|
|
2
|
-
import { TObject } from "alepha";
|
|
3
|
-
import * as _alepha_react0 from "alepha/react";
|
|
4
|
-
import { RouterGoOptions, UseActiveOptions } from "alepha/react";
|
|
5
|
-
import { ModalsProviderProps } from "@mantine/modals";
|
|
6
|
-
import { AutocompleteProps, ButtonProps, ColorInputProps, ColorSchemeScriptProps, FileInputProps, Flex, MantineProviderProps, ModalProps, MultiSelectProps, NumberInputProps, PasswordInputProps, SegmentedControlProps, SelectProps, SwitchProps, TableProps, TagsInputProps, TextInputProps, TextareaProps, TooltipProps } from "@mantine/core";
|
|
7
|
-
import * as react_jsx_runtime2 from "react/jsx-runtime";
|
|
8
|
-
import React$1, { ComponentType, FC, ReactNode } from "react";
|
|
9
|
-
import * as _mantine_notifications0 from "@mantine/notifications";
|
|
10
|
-
import { NotificationData, NotificationsProps } from "@mantine/notifications";
|
|
11
|
-
import { FormModel, InputField } from "alepha/react/form";
|
|
12
|
-
import { NavigationProgressProps } from "@mantine/nprogress";
|
|
13
|
-
import { SpotlightActionData } from "@mantine/spotlight";
|
|
14
|
-
import { DateInputProps, DateTimePickerProps, TimeInputProps } from "@mantine/dates";
|
|
15
|
-
|
|
16
|
-
//#region src/utils/parseInput.d.ts
|
|
17
|
-
interface GenericControlProps {
|
|
18
|
-
input: InputField;
|
|
19
|
-
title?: string;
|
|
20
|
-
description?: string;
|
|
21
|
-
icon?: ReactNode;
|
|
22
|
-
}
|
|
23
|
-
//#endregion
|
|
24
|
-
//#region src/components/ControlSelect.d.ts
|
|
25
|
-
type SelectValueLabel = string | {
|
|
26
|
-
value: string;
|
|
27
|
-
label: string;
|
|
28
|
-
icon?: string;
|
|
29
|
-
};
|
|
30
|
-
interface ControlSelectProps extends GenericControlProps {
|
|
31
|
-
select?: boolean | SelectProps;
|
|
32
|
-
multi?: boolean | MultiSelectProps;
|
|
33
|
-
tags?: boolean | TagsInputProps;
|
|
34
|
-
autocomplete?: boolean | AutocompleteProps;
|
|
35
|
-
segmented?: boolean | Partial<SegmentedControlProps>;
|
|
36
|
-
loader?: () => Promise<SelectValueLabel[]>;
|
|
37
|
-
}
|
|
38
|
-
/**
|
|
39
|
-
* ControlSelect component for handling Select, MultiSelect, and TagsInput.
|
|
40
|
-
*
|
|
41
|
-
* Features:
|
|
42
|
-
* - Basic Select with enum support
|
|
43
|
-
* - MultiSelect for array of enums
|
|
44
|
-
* - TagsInput for array of strings (no enum)
|
|
45
|
-
* - Future: Lazy loading
|
|
46
|
-
* - Future: Searchable/filterable options
|
|
47
|
-
* - Future: Custom option rendering
|
|
48
|
-
*
|
|
49
|
-
* Automatically detects enum values and array types from schema.
|
|
50
|
-
*/
|
|
51
|
-
declare const ControlSelect: (props: ControlSelectProps) => react_jsx_runtime2.JSX.Element | null;
|
|
52
|
-
//#endregion
|
|
53
|
-
//#region src/components/Control.d.ts
|
|
54
|
-
interface ControlProps extends GenericControlProps {
|
|
55
|
-
text?: TextInputProps;
|
|
56
|
-
area?: boolean | TextareaProps;
|
|
57
|
-
select?: boolean | Partial<ControlSelectProps>;
|
|
58
|
-
password?: boolean | PasswordInputProps;
|
|
59
|
-
switch?: boolean | SwitchProps;
|
|
60
|
-
number?: boolean | NumberInputProps;
|
|
61
|
-
file?: boolean | FileInputProps;
|
|
62
|
-
color?: boolean | ColorInputProps;
|
|
63
|
-
date?: boolean | DateInputProps;
|
|
64
|
-
datetime?: boolean | DateTimePickerProps;
|
|
65
|
-
time?: boolean | TimeInputProps;
|
|
66
|
-
custom?: ComponentType<CustomControlProps>;
|
|
67
|
-
}
|
|
68
|
-
/**
|
|
69
|
-
* Generic form control that renders the appropriate input based on the schema and props.
|
|
70
|
-
*
|
|
71
|
-
* Supports:
|
|
72
|
-
* - TextInput (with format detection: email, url, tel)
|
|
73
|
-
* - Textarea
|
|
74
|
-
* - NumberInput (for number/integer types)
|
|
75
|
-
* - FileInput
|
|
76
|
-
* - ColorInput (for color format)
|
|
77
|
-
* - Select (for enum types)
|
|
78
|
-
* - Autocomplete
|
|
79
|
-
* - PasswordInput
|
|
80
|
-
* - Switch (for boolean types)
|
|
81
|
-
* - SegmentedControl (for enum types)
|
|
82
|
-
* - DateInput (for date format)
|
|
83
|
-
* - DateTimePicker (for date-time format)
|
|
84
|
-
* - TimeInput (for time format)
|
|
85
|
-
* - Custom component
|
|
86
|
-
*
|
|
87
|
-
* Automatically handles labels, descriptions, error messages, required state, and default icons.
|
|
88
|
-
*/
|
|
89
|
-
declare const Control: (_props: ControlProps) => react_jsx_runtime2.JSX.Element | null;
|
|
90
|
-
type CustomControlProps = {
|
|
91
|
-
defaultValue: any;
|
|
92
|
-
onChange: (value: any) => void;
|
|
93
|
-
};
|
|
94
|
-
//#endregion
|
|
95
|
-
//#region src/components/Action.d.ts
|
|
96
|
-
interface ActionMenuItem {
|
|
97
|
-
/**
|
|
98
|
-
* Menu item type
|
|
99
|
-
*/
|
|
100
|
-
type?: "item" | "divider" | "label";
|
|
101
|
-
/**
|
|
102
|
-
* Label text for the menu item
|
|
103
|
-
*/
|
|
104
|
-
label?: string;
|
|
105
|
-
/**
|
|
106
|
-
* Icon element to display before the label
|
|
107
|
-
*/
|
|
108
|
-
icon?: ReactNode;
|
|
109
|
-
/**
|
|
110
|
-
* Click handler for menu items
|
|
111
|
-
*/
|
|
112
|
-
onClick?: () => void;
|
|
113
|
-
/**
|
|
114
|
-
* Color for the menu item (e.g., "red" for danger actions)
|
|
115
|
-
*/
|
|
116
|
-
color?: string;
|
|
117
|
-
/**
|
|
118
|
-
* Nested submenu items
|
|
119
|
-
*/
|
|
120
|
-
children?: ActionMenuItem[];
|
|
121
|
-
}
|
|
122
|
-
interface ActionMenuConfig {
|
|
123
|
-
/**
|
|
124
|
-
* Array of menu items to display
|
|
125
|
-
*/
|
|
126
|
-
items: ActionMenuItem[];
|
|
127
|
-
/**
|
|
128
|
-
* Menu position relative to the button
|
|
129
|
-
*/
|
|
130
|
-
position?: "bottom" | "bottom-start" | "bottom-end" | "top" | "top-start" | "top-end" | "left" | "right";
|
|
131
|
-
/**
|
|
132
|
-
* Menu width
|
|
133
|
-
*/
|
|
134
|
-
width?: number | string;
|
|
135
|
-
/**
|
|
136
|
-
* Menu shadow
|
|
137
|
-
*/
|
|
138
|
-
shadow?: "xs" | "sm" | "md" | "lg" | "xl";
|
|
139
|
-
}
|
|
140
|
-
interface ActionCommonProps extends ButtonProps {
|
|
141
|
-
children?: ReactNode;
|
|
142
|
-
textVisibleFrom?: "xs" | "sm" | "md" | "lg" | "xl";
|
|
143
|
-
/**
|
|
144
|
-
* Tooltip to display on hover. Can be a string for simple tooltips
|
|
145
|
-
* or a TooltipProps object for advanced configuration.
|
|
146
|
-
*/
|
|
147
|
-
tooltip?: string | TooltipProps;
|
|
148
|
-
/**
|
|
149
|
-
* Menu configuration. When provided, the action will display a dropdown menu.
|
|
150
|
-
*/
|
|
151
|
-
menu?: ActionMenuConfig;
|
|
152
|
-
/**
|
|
153
|
-
* If set, a confirmation dialog will be shown before performing the action.
|
|
154
|
-
* If `true`, a default title and message will be used.
|
|
155
|
-
* If a string, it will be used as the message with a default title.
|
|
156
|
-
* If an object, it can contain `title` and `message` properties to customize the dialog.
|
|
157
|
-
*/
|
|
158
|
-
confirm?: boolean | string | {
|
|
159
|
-
title?: string;
|
|
160
|
-
message: string;
|
|
161
|
-
};
|
|
162
|
-
}
|
|
163
|
-
type ActionProps = ActionCommonProps & (ActiveHrefProps | ActionClickProps | ActionSubmitProps | {});
|
|
164
|
-
declare const Action: (_props: ActionProps) => react_jsx_runtime2.JSX.Element;
|
|
165
|
-
interface ActionSubmitProps extends ButtonProps {
|
|
166
|
-
form: FormModel<any>;
|
|
167
|
-
}
|
|
168
|
-
interface ActionClickProps extends ButtonProps {
|
|
169
|
-
onClick: (e: any) => any;
|
|
170
|
-
}
|
|
171
|
-
interface ActiveHrefProps extends ButtonProps {
|
|
172
|
-
href: string;
|
|
173
|
-
active?: Partial<UseActiveOptions> | false;
|
|
174
|
-
routerGoOptions?: RouterGoOptions;
|
|
175
|
-
}
|
|
176
|
-
//#endregion
|
|
177
|
-
//#region src/components/Omnibar.d.ts
|
|
178
|
-
interface OmnibarProps {
|
|
179
|
-
actions?: SpotlightActionData[];
|
|
180
|
-
shortcut?: string | string[];
|
|
181
|
-
searchPlaceholder?: string;
|
|
182
|
-
nothingFound?: ReactNode;
|
|
183
|
-
}
|
|
184
|
-
declare const Omnibar: (props: OmnibarProps) => react_jsx_runtime2.JSX.Element;
|
|
185
|
-
//#endregion
|
|
186
|
-
//#region src/components/AlephaMantineProvider.d.ts
|
|
187
|
-
interface AlephaMantineProviderProps {
|
|
188
|
-
children?: ReactNode;
|
|
189
|
-
mantine?: MantineProviderProps;
|
|
190
|
-
colorSchemeScript?: ColorSchemeScriptProps;
|
|
191
|
-
navigationProgress?: NavigationProgressProps;
|
|
192
|
-
notifications?: NotificationsProps;
|
|
193
|
-
modals?: ModalsProviderProps;
|
|
194
|
-
omnibar?: OmnibarProps;
|
|
195
|
-
}
|
|
196
|
-
declare const AlephaMantineProvider: (props: AlephaMantineProviderProps) => react_jsx_runtime2.JSX.Element;
|
|
197
|
-
//#endregion
|
|
198
|
-
//#region src/components/ControlDate.d.ts
|
|
199
|
-
interface ControlDateProps extends GenericControlProps {
|
|
200
|
-
date?: boolean | DateInputProps;
|
|
201
|
-
datetime?: boolean | DateTimePickerProps;
|
|
202
|
-
time?: boolean | TimeInputProps;
|
|
203
|
-
}
|
|
204
|
-
/**
|
|
205
|
-
* ControlDate component for handling date, datetime, and time inputs.
|
|
206
|
-
*
|
|
207
|
-
* Features:
|
|
208
|
-
* - DateInput for date format
|
|
209
|
-
* - DateTimePicker for date-time format
|
|
210
|
-
* - TimeInput for time format
|
|
211
|
-
*
|
|
212
|
-
* Automatically detects date formats from schema and renders appropriate picker.
|
|
213
|
-
*/
|
|
214
|
-
declare const ControlDate: (props: ControlDateProps) => react_jsx_runtime2.JSX.Element | null;
|
|
215
|
-
//#endregion
|
|
216
|
-
//#region src/components/DarkModeButton.d.ts
|
|
217
|
-
interface DarkModeButtonProps {
|
|
218
|
-
mode?: "minimal" | "segmented";
|
|
219
|
-
size?: string | number;
|
|
220
|
-
variant?: "filled" | "light" | "outline" | "default" | "subtle" | "transparent";
|
|
221
|
-
}
|
|
222
|
-
declare const DarkModeButton: (props: DarkModeButtonProps) => react_jsx_runtime2.JSX.Element;
|
|
223
|
-
//#endregion
|
|
224
|
-
//#region src/components/DataTable.d.ts
|
|
225
|
-
type SortDirection = "asc" | "desc" | null;
|
|
226
|
-
interface DataTableColumn<T = any> {
|
|
227
|
-
accessor: keyof T | string;
|
|
228
|
-
title?: string;
|
|
229
|
-
width?: number | string;
|
|
230
|
-
sortable?: boolean;
|
|
231
|
-
filterable?: boolean;
|
|
232
|
-
hidden?: boolean;
|
|
233
|
-
render?: (value: any, record: T, index: number) => React$1.ReactNode;
|
|
234
|
-
renderHeader?: () => React$1.ReactNode;
|
|
235
|
-
align?: "left" | "center" | "right";
|
|
236
|
-
ellipsis?: boolean;
|
|
237
|
-
className?: string;
|
|
238
|
-
headerClassName?: string;
|
|
239
|
-
}
|
|
240
|
-
interface DataTableSort {
|
|
241
|
-
column: string;
|
|
242
|
-
direction: SortDirection;
|
|
243
|
-
}
|
|
244
|
-
interface DataTableFilter {
|
|
245
|
-
column: string;
|
|
246
|
-
value: string;
|
|
247
|
-
operator?: "contains" | "equals" | "startsWith" | "endsWith";
|
|
248
|
-
}
|
|
249
|
-
interface DataTableProps<T = any> extends Omit<TableProps, "data"> {
|
|
250
|
-
data: T[];
|
|
251
|
-
columns: DataTableColumn<T>[];
|
|
252
|
-
loading?: boolean;
|
|
253
|
-
emptyMessage?: string;
|
|
254
|
-
selectable?: boolean;
|
|
255
|
-
selectedRows?: T[];
|
|
256
|
-
onRowSelect?: (rows: T[]) => void;
|
|
257
|
-
sortable?: boolean;
|
|
258
|
-
sort?: DataTableSort;
|
|
259
|
-
onSortChange?: (sort: DataTableSort) => void;
|
|
260
|
-
filterable?: boolean;
|
|
261
|
-
filters?: DataTableFilter[];
|
|
262
|
-
onFiltersChange?: (filters: DataTableFilter[]) => void;
|
|
263
|
-
filterPlaceholder?: string;
|
|
264
|
-
paginate?: boolean;
|
|
265
|
-
page?: number;
|
|
266
|
-
pageSize?: number;
|
|
267
|
-
totalRecords?: number;
|
|
268
|
-
pageSizeOptions?: number[];
|
|
269
|
-
onPageChange?: (page: number) => void;
|
|
270
|
-
onPageSizeChange?: (size: number) => void;
|
|
271
|
-
rowActions?: (record: T, index: number) => React$1.ReactNode;
|
|
272
|
-
onRowClick?: (record: T, index: number) => void;
|
|
273
|
-
rowClassName?: (record: T, index: number) => string;
|
|
274
|
-
showHeader?: boolean;
|
|
275
|
-
showFooter?: boolean;
|
|
276
|
-
stickyHeader?: boolean;
|
|
277
|
-
striped?: boolean;
|
|
278
|
-
highlightOnHover?: boolean;
|
|
279
|
-
showToolbar?: boolean;
|
|
280
|
-
title?: string;
|
|
281
|
-
actions?: React$1.ReactNode;
|
|
282
|
-
showColumnToggle?: boolean;
|
|
283
|
-
showRefresh?: boolean;
|
|
284
|
-
onRefresh?: () => void;
|
|
285
|
-
showExport?: boolean;
|
|
286
|
-
onExport?: () => void;
|
|
287
|
-
height?: number | string;
|
|
288
|
-
minHeight?: number | string;
|
|
289
|
-
maxHeight?: number | string;
|
|
290
|
-
}
|
|
291
|
-
declare function DataTable<T = any>({
|
|
292
|
-
data,
|
|
293
|
-
columns: initialColumns,
|
|
294
|
-
loading,
|
|
295
|
-
emptyMessage,
|
|
296
|
-
selectable,
|
|
297
|
-
selectedRows,
|
|
298
|
-
onRowSelect,
|
|
299
|
-
sortable,
|
|
300
|
-
sort,
|
|
301
|
-
onSortChange,
|
|
302
|
-
filterable,
|
|
303
|
-
filters,
|
|
304
|
-
onFiltersChange,
|
|
305
|
-
filterPlaceholder,
|
|
306
|
-
paginate,
|
|
307
|
-
page,
|
|
308
|
-
pageSize,
|
|
309
|
-
totalRecords,
|
|
310
|
-
pageSizeOptions,
|
|
311
|
-
onPageChange,
|
|
312
|
-
onPageSizeChange,
|
|
313
|
-
rowActions,
|
|
314
|
-
onRowClick,
|
|
315
|
-
rowClassName,
|
|
316
|
-
showHeader,
|
|
317
|
-
showFooter,
|
|
318
|
-
stickyHeader,
|
|
319
|
-
striped,
|
|
320
|
-
highlightOnHover,
|
|
321
|
-
showToolbar,
|
|
322
|
-
title,
|
|
323
|
-
actions,
|
|
324
|
-
showColumnToggle,
|
|
325
|
-
showRefresh,
|
|
326
|
-
onRefresh,
|
|
327
|
-
showExport,
|
|
328
|
-
onExport,
|
|
329
|
-
height,
|
|
330
|
-
minHeight,
|
|
331
|
-
maxHeight,
|
|
332
|
-
...tableProps
|
|
333
|
-
}: DataTableProps<T>): react_jsx_runtime2.JSX.Element;
|
|
334
|
-
//#endregion
|
|
335
|
-
//#region src/services/DialogService.d.ts
|
|
336
|
-
interface BaseDialogOptions extends Partial<ModalProps> {
|
|
337
|
-
title?: ReactNode;
|
|
338
|
-
message?: ReactNode;
|
|
339
|
-
content?: any;
|
|
340
|
-
}
|
|
341
|
-
interface AlertDialogOptions extends BaseDialogOptions {
|
|
342
|
-
okLabel?: string;
|
|
343
|
-
}
|
|
344
|
-
interface ConfirmDialogOptions extends BaseDialogOptions {
|
|
345
|
-
confirmLabel?: string;
|
|
346
|
-
cancelLabel?: string;
|
|
347
|
-
confirmColor?: string;
|
|
348
|
-
}
|
|
349
|
-
interface PromptDialogOptions extends BaseDialogOptions {
|
|
350
|
-
placeholder?: string;
|
|
351
|
-
defaultValue?: string;
|
|
352
|
-
label?: string;
|
|
353
|
-
required?: boolean;
|
|
354
|
-
submitLabel?: string;
|
|
355
|
-
cancelLabel?: string;
|
|
356
|
-
}
|
|
357
|
-
interface AlertDialogProps {
|
|
358
|
-
options?: AlertDialogOptions;
|
|
359
|
-
onClose: () => void;
|
|
360
|
-
}
|
|
361
|
-
interface ConfirmDialogProps {
|
|
362
|
-
options?: ConfirmDialogOptions;
|
|
363
|
-
onConfirm: (confirmed: boolean) => void;
|
|
364
|
-
}
|
|
365
|
-
interface PromptDialogProps {
|
|
366
|
-
options?: PromptDialogOptions;
|
|
367
|
-
onSubmit: (value: string | null) => void;
|
|
368
|
-
}
|
|
369
|
-
interface DialogServiceOptions {
|
|
370
|
-
default?: Partial<BaseDialogOptions>;
|
|
371
|
-
}
|
|
372
|
-
declare class DialogService {
|
|
373
|
-
readonly options: DialogServiceOptions;
|
|
374
|
-
/**
|
|
375
|
-
* Show an alert dialog with a message
|
|
376
|
-
*/
|
|
377
|
-
alert(options?: AlertDialogOptions): Promise<void>;
|
|
378
|
-
/**
|
|
379
|
-
* Show a confirmation dialog that returns a promise
|
|
380
|
-
*/
|
|
381
|
-
confirm(options?: ConfirmDialogOptions): Promise<boolean>;
|
|
382
|
-
/**
|
|
383
|
-
* Show a prompt dialog to get user input
|
|
384
|
-
*/
|
|
385
|
-
prompt(options?: PromptDialogOptions): Promise<string | null>;
|
|
386
|
-
/**
|
|
387
|
-
* Open a custom dialog with provided content
|
|
388
|
-
*/
|
|
389
|
-
open(options?: BaseDialogOptions): string;
|
|
390
|
-
/**
|
|
391
|
-
* Show a JSON editor/viewer dialog
|
|
392
|
-
*/
|
|
393
|
-
json(data?: any, options?: BaseDialogOptions): void;
|
|
394
|
-
/**
|
|
395
|
-
* Show a form dialog for structured input
|
|
396
|
-
*/
|
|
397
|
-
form(options?: BaseDialogOptions): Promise<any>;
|
|
398
|
-
/**
|
|
399
|
-
* Close the currently open dialog or a specific dialog by ID
|
|
400
|
-
*/
|
|
401
|
-
close(modalId?: string): void;
|
|
402
|
-
/**
|
|
403
|
-
* Show a loading/progress dialog with optional progress percentage
|
|
404
|
-
*/
|
|
405
|
-
loading(options?: BaseDialogOptions & {
|
|
406
|
-
progress?: number;
|
|
407
|
-
}): void;
|
|
408
|
-
/**
|
|
409
|
-
* Show an image viewer/gallery dialog
|
|
410
|
-
*/
|
|
411
|
-
image(src: string | string[], options?: BaseDialogOptions): void;
|
|
412
|
-
/**
|
|
413
|
-
* Show a table/data grid dialog for displaying tabular data
|
|
414
|
-
*/
|
|
415
|
-
table(data: any[], options?: BaseDialogOptions & {
|
|
416
|
-
columns?: any[];
|
|
417
|
-
}): void;
|
|
418
|
-
/**
|
|
419
|
-
* Show a multi-step wizard dialog
|
|
420
|
-
*/
|
|
421
|
-
wizard(steps: any[], options?: BaseDialogOptions): Promise<any>;
|
|
422
|
-
}
|
|
423
|
-
//#endregion
|
|
424
|
-
//#region src/components/dialogs/AlertDialog.d.ts
|
|
425
|
-
declare function AlertDialog({
|
|
426
|
-
options,
|
|
427
|
-
onClose
|
|
428
|
-
}: AlertDialogProps): react_jsx_runtime2.JSX.Element;
|
|
429
|
-
//#endregion
|
|
430
|
-
//#region src/components/dialogs/ConfirmDialog.d.ts
|
|
431
|
-
declare function ConfirmDialog({
|
|
432
|
-
options,
|
|
433
|
-
onConfirm
|
|
434
|
-
}: ConfirmDialogProps): react_jsx_runtime2.JSX.Element;
|
|
435
|
-
//#endregion
|
|
436
|
-
//#region src/components/dialogs/PromptDialog.d.ts
|
|
437
|
-
declare function PromptDialog({
|
|
438
|
-
options,
|
|
439
|
-
onSubmit
|
|
440
|
-
}: PromptDialogProps): react_jsx_runtime2.JSX.Element;
|
|
441
|
-
//#endregion
|
|
442
|
-
//#region src/components/Sidebar.d.ts
|
|
443
|
-
interface MenuItem {
|
|
444
|
-
id: string;
|
|
445
|
-
label: string;
|
|
446
|
-
icon?: ReactNode;
|
|
447
|
-
href?: string;
|
|
448
|
-
activeStartsWith?: boolean;
|
|
449
|
-
onClick?: () => void;
|
|
450
|
-
children?: MenuItem[];
|
|
451
|
-
}
|
|
452
|
-
interface SidebarProps {
|
|
453
|
-
menu: MenuItem[];
|
|
454
|
-
defaultOpenIds?: string[];
|
|
455
|
-
onItemClick?: (item: MenuItem) => void;
|
|
456
|
-
showSearchButton?: boolean;
|
|
457
|
-
onSearchClick?: () => void;
|
|
458
|
-
}
|
|
459
|
-
declare const Sidebar: FC<SidebarProps>;
|
|
460
|
-
interface SidebarItemProps {
|
|
461
|
-
item: MenuItem;
|
|
462
|
-
level: number;
|
|
463
|
-
openIds: Set<string>;
|
|
464
|
-
onToggle: (id: string) => void;
|
|
465
|
-
onItemClick?: (item: MenuItem) => void;
|
|
466
|
-
}
|
|
467
|
-
declare const SidebarItem: React.FC<SidebarItemProps>;
|
|
468
|
-
//#endregion
|
|
469
|
-
//#region src/components/TypeForm.d.ts
|
|
470
|
-
interface TypeFormProps<T extends TObject> {
|
|
471
|
-
form: FormModel<T>;
|
|
472
|
-
columns?: number | {
|
|
473
|
-
base?: number;
|
|
474
|
-
xs?: number;
|
|
475
|
-
sm?: number;
|
|
476
|
-
md?: number;
|
|
477
|
-
lg?: number;
|
|
478
|
-
xl?: number;
|
|
479
|
-
};
|
|
480
|
-
children?: (input: FormModel<T>["input"]) => ReactNode;
|
|
481
|
-
controlProps?: Partial<Omit<ControlProps, "input">>;
|
|
482
|
-
skipFormElement?: boolean;
|
|
483
|
-
skipSubmitButton?: boolean;
|
|
484
|
-
submitButtonProps?: Partial<Omit<ActionSubmitProps, "form">>;
|
|
485
|
-
resetButtonProps?: Partial<Omit<ActionSubmitProps, "form">>;
|
|
486
|
-
}
|
|
487
|
-
/**
|
|
488
|
-
* TypeForm component that automatically renders all form inputs based on schema.
|
|
489
|
-
* Uses the Control component to render individual fields and Mantine Grid for responsive layout.
|
|
490
|
-
*
|
|
491
|
-
* @example
|
|
492
|
-
* ```tsx
|
|
493
|
-
* import { t } from "alepha";
|
|
494
|
-
* import { useForm } from "alepha/react/form";
|
|
495
|
-
* import { TypeForm } from "alepha/ui";
|
|
496
|
-
*
|
|
497
|
-
* const form = useForm({
|
|
498
|
-
* schema: t.object({
|
|
499
|
-
* username: t.text(),
|
|
500
|
-
* email: t.text(),
|
|
501
|
-
* age: t.integer(),
|
|
502
|
-
* subscribe: t.boolean(),
|
|
503
|
-
* }),
|
|
504
|
-
* handler: (values) => {
|
|
505
|
-
* console.log(values);
|
|
506
|
-
* },
|
|
507
|
-
* });
|
|
508
|
-
*
|
|
509
|
-
* return <TypeForm form={form} columns={2} />;
|
|
510
|
-
* ```
|
|
511
|
-
*/
|
|
512
|
-
declare const TypeForm: <T extends TObject>(props: TypeFormProps<T>) => react_jsx_runtime2.JSX.Element | null;
|
|
513
|
-
//#endregion
|
|
514
|
-
//#region src/hooks/useDialog.d.ts
|
|
515
|
-
/**
|
|
516
|
-
* Use this hook to access the Dialog Service for showing various dialog types.
|
|
517
|
-
*
|
|
518
|
-
* @example
|
|
519
|
-
* const dialog = useDialog();
|
|
520
|
-
* await dialog.alert({ title: "Alert", message: "This is an alert message" });
|
|
521
|
-
* const confirmed = await dialog.confirm({ title: "Confirm", message: "Are you sure?" });
|
|
522
|
-
* const input = await dialog.prompt({ title: "Input", message: "Enter your name:" });
|
|
523
|
-
*/
|
|
524
|
-
declare const useDialog: () => DialogService;
|
|
525
|
-
//#endregion
|
|
526
|
-
//#region src/services/ToastService.d.ts
|
|
527
|
-
interface ToastServiceOptions {
|
|
528
|
-
default?: Partial<NotificationData>;
|
|
529
|
-
}
|
|
530
|
-
declare class ToastService {
|
|
531
|
-
protected readonly raw: {
|
|
532
|
-
readonly show: typeof _mantine_notifications0.showNotification;
|
|
533
|
-
readonly hide: typeof _mantine_notifications0.hideNotification;
|
|
534
|
-
readonly update: typeof _mantine_notifications0.updateNotification;
|
|
535
|
-
readonly clean: typeof _mantine_notifications0.cleanNotifications;
|
|
536
|
-
readonly cleanQueue: typeof _mantine_notifications0.cleanNotificationsQueue;
|
|
537
|
-
readonly updateState: typeof _mantine_notifications0.updateNotificationsState;
|
|
538
|
-
};
|
|
539
|
-
readonly options: ToastServiceOptions;
|
|
540
|
-
show(options: NotificationData): void;
|
|
541
|
-
info(options: Partial<NotificationData>): void;
|
|
542
|
-
success(options: Partial<NotificationData>): void;
|
|
543
|
-
warning(options: Partial<NotificationData>): void;
|
|
544
|
-
danger(options: Partial<NotificationData>): void;
|
|
545
|
-
}
|
|
546
|
-
//#endregion
|
|
547
|
-
//#region src/hooks/useToast.d.ts
|
|
548
|
-
/**
|
|
549
|
-
* Use this hook to access the Toast Service for showing notifications.
|
|
550
|
-
*
|
|
551
|
-
* @example
|
|
552
|
-
* const toast = useToast();
|
|
553
|
-
* toast.success({ message: "Operation completed successfully!" });
|
|
554
|
-
* toast.error({ title: "Error", message: "Something went wrong" });
|
|
555
|
-
*/
|
|
556
|
-
declare const useToast: () => ToastService;
|
|
557
|
-
//#endregion
|
|
558
|
-
//#region src/RootRouter.d.ts
|
|
559
|
-
declare class RootRouter {
|
|
560
|
-
readonly root: _alepha_react0.PageDescriptor<_alepha_react0.PageConfigSchema, any, _alepha_react0.TPropsParentDefault>;
|
|
561
|
-
}
|
|
562
|
-
//#endregion
|
|
563
|
-
//#region src/utils/icons.d.ts
|
|
564
|
-
/**
|
|
565
|
-
* Icon size presets following Mantine's size conventions
|
|
566
|
-
*/
|
|
567
|
-
declare const ICON_SIZES: {
|
|
568
|
-
readonly xs: 12;
|
|
569
|
-
readonly sm: 16;
|
|
570
|
-
readonly md: 20;
|
|
571
|
-
readonly lg: 24;
|
|
572
|
-
readonly xl: 28;
|
|
573
|
-
};
|
|
574
|
-
type IconSize = keyof typeof ICON_SIZES;
|
|
575
|
-
/**
|
|
576
|
-
* Get the default icon for an input based on its type, format, or name.
|
|
577
|
-
*/
|
|
578
|
-
declare const getDefaultIcon: (params: {
|
|
579
|
-
type?: string;
|
|
580
|
-
format?: string;
|
|
581
|
-
name?: string;
|
|
582
|
-
isEnum?: boolean;
|
|
583
|
-
isArray?: boolean;
|
|
584
|
-
size?: IconSize;
|
|
585
|
-
}) => ReactNode;
|
|
586
|
-
//#endregion
|
|
587
|
-
//#region src/utils/string.d.ts
|
|
588
|
-
/**
|
|
589
|
-
* Capitalizes the first letter of a string.
|
|
590
|
-
*
|
|
591
|
-
* @example
|
|
592
|
-
* capitalize("hello") // "Hello"
|
|
593
|
-
*/
|
|
594
|
-
declare const capitalize: (str: string) => string;
|
|
595
|
-
/**
|
|
596
|
-
* Converts a path or identifier string into a pretty display name.
|
|
597
|
-
* Removes slashes and capitalizes the first letter.
|
|
598
|
-
*
|
|
599
|
-
* @example
|
|
600
|
-
* prettyName("/userName") // "UserName"
|
|
601
|
-
* prettyName("email") // "Email"
|
|
602
|
-
*/
|
|
603
|
-
declare const prettyName: (name: string) => string;
|
|
604
|
-
//#endregion
|
|
605
|
-
//#region src/index.d.ts
|
|
606
|
-
declare module "typebox" {
|
|
607
|
-
interface TSchemaOptions {
|
|
608
|
-
$control?: Omit<ControlProps, "input">;
|
|
609
|
-
}
|
|
610
|
-
}
|
|
611
|
-
/**
|
|
612
|
-
* Mantine
|
|
613
|
-
*
|
|
614
|
-
* @module alepha.ui
|
|
615
|
-
*/
|
|
616
|
-
declare const AlephaUI: _alepha_core0.Service<_alepha_core0.Module<{}>>;
|
|
617
|
-
//#endregion
|
|
618
|
-
export { Action, AlephaMantineProvider, AlephaUI, AlertDialog, type AlertDialogOptions, type AlertDialogProps, type BaseDialogOptions, ConfirmDialog, type ConfirmDialogOptions, type ConfirmDialogProps, Control, ControlDate, ControlSelect, DarkModeButton, DataTable, type DataTableColumn, type DataTableFilter, type DataTableProps, type DataTableSort, DialogService, Flex, ICON_SIZES, IconSize, type MenuItem, Omnibar, PromptDialog, type PromptDialogOptions, type PromptDialogProps, RootRouter, Sidebar, SidebarItem, type SidebarItemProps, type SidebarProps, ToastService, TypeForm, capitalize, getDefaultIcon, prettyName, useDialog, useToast };
|
|
619
|
-
//# sourceMappingURL=index.d.ts.map
|
|
1
|
+
export * from '@alepha/ui';
|