@alepha/ui 0.14.4 → 0.15.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.
- package/dist/admin/index.d.ts.map +1 -1
- package/dist/auth/Login-Cjxv3EDi.js.map +1 -1
- package/dist/auth/{Register-BKBIpHhW.js → Register-CGlbQ50l.js} +5 -2
- package/dist/auth/Register-CGlbQ50l.js.map +1 -0
- package/dist/auth/Register-CWdkXWkc.js +4 -0
- package/dist/auth/ResetPassword-DvqD_1SJ.js.map +1 -1
- package/dist/auth/index.d.ts +24 -20
- package/dist/auth/index.d.ts.map +1 -1
- package/dist/auth/index.js +6 -6
- package/dist/auth/index.js.map +1 -1
- package/dist/core/index.d.ts +186 -186
- package/dist/core/index.d.ts.map +1 -1
- package/dist/demo/{DemoLogin--wE44i23.js → DemoLogin-DvltFTER.js} +2 -1
- package/dist/demo/DemoLogin-DvltFTER.js.map +1 -0
- package/dist/demo/{DemoRegister-BtrMksx6.js → DemoRegister-Vu6ZPWib.js} +6 -2
- package/dist/demo/DemoRegister-Vu6ZPWib.js.map +1 -0
- package/dist/demo/{DemoResetPassword-DVXiiiX7.js → DemoResetPassword-BFwmqwec.js} +2 -1
- package/dist/demo/DemoResetPassword-BFwmqwec.js.map +1 -0
- package/dist/demo/index.d.ts +12 -12
- package/dist/demo/index.d.ts.map +1 -1
- package/dist/demo/index.js +3 -3
- package/dist/json/index.d.ts +18 -19
- package/dist/json/index.d.ts.map +1 -1
- package/package.json +11 -11
- package/src/auth/AuthRouter.ts +6 -6
- package/src/auth/components/Login.tsx +2 -2
- package/src/auth/components/Register.tsx +8 -3
- package/src/auth/components/ResetPassword.tsx +2 -2
- package/src/demo/components/auth/DemoLogin.tsx +4 -3
- package/src/demo/components/auth/DemoRegister.tsx +4 -3
- package/src/demo/components/auth/DemoResetPassword.tsx +3 -2
- package/dist/auth/Register-BKBIpHhW.js.map +0 -1
- package/dist/auth/Register-CtdvihIM.js +0 -4
- package/dist/demo/DemoLogin--wE44i23.js.map +0 -1
- package/dist/demo/DemoRegister-BtrMksx6.js.map +0 -1
- package/dist/demo/DemoResetPassword-DVXiiiX7.js.map +0 -1
package/dist/core/index.d.ts
CHANGED
|
@@ -11,7 +11,7 @@ import { ModalsProviderProps } from "@mantine/modals";
|
|
|
11
11
|
import * as _mantine_notifications0 from "@mantine/notifications";
|
|
12
12
|
import { NotificationData, NotificationsProps } from "@mantine/notifications";
|
|
13
13
|
import { NavigationProgressProps } from "@mantine/nprogress";
|
|
14
|
-
import * as
|
|
14
|
+
import * as react_jsx_runtime12 from "react/jsx-runtime";
|
|
15
15
|
import { ComponentType, ReactElement, ReactNode } from "react";
|
|
16
16
|
import { DateInputProps, DateTimePickerProps, TimeInputProps } from "@mantine/dates";
|
|
17
17
|
import { DurationLike } from "alepha/datetime";
|
|
@@ -35,45 +35,45 @@ interface GenericControlProps {
|
|
|
35
35
|
//#region ../../src/core/components/form/ControlArray.d.ts
|
|
36
36
|
interface ControlArrayProps extends GenericControlProps {
|
|
37
37
|
/**
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
38
|
+
* Minimum number of items allowed.
|
|
39
|
+
* @default 0
|
|
40
|
+
*/
|
|
41
41
|
min?: number;
|
|
42
42
|
/**
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
43
|
+
* Maximum number of items allowed.
|
|
44
|
+
* @default Infinity
|
|
45
|
+
*/
|
|
46
46
|
max?: number;
|
|
47
47
|
/**
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
48
|
+
* Label for the add button.
|
|
49
|
+
* @default "Add item"
|
|
50
|
+
*/
|
|
51
51
|
addLabel?: string;
|
|
52
52
|
/**
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
53
|
+
* Number of columns for object item fields.
|
|
54
|
+
* @default 1
|
|
55
|
+
*/
|
|
56
56
|
columns?: number;
|
|
57
57
|
/**
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
58
|
+
* Variant for the container.
|
|
59
|
+
* - "fieldset": Uses Mantine Fieldset with legend
|
|
60
|
+
* - "plain": No container, just renders items
|
|
61
|
+
* @default "fieldset"
|
|
62
|
+
*/
|
|
63
63
|
variant?: "fieldset" | "plain";
|
|
64
64
|
/**
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
65
|
+
* Per-field control props override for object items.
|
|
66
|
+
* Keys are field names from the item schema.
|
|
67
|
+
*/
|
|
68
68
|
controlProps?: Record<string, Partial<Omit<ControlProps, "input">>>;
|
|
69
69
|
/**
|
|
70
|
-
|
|
71
|
-
|
|
70
|
+
* Control props for primitive items.
|
|
71
|
+
*/
|
|
72
72
|
itemControlProps?: Partial<Omit<ControlProps, "input">>;
|
|
73
73
|
/**
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
74
|
+
* Show drag handle for reordering.
|
|
75
|
+
* @default false
|
|
76
|
+
*/
|
|
77
77
|
sortable?: boolean;
|
|
78
78
|
}
|
|
79
79
|
/**
|
|
@@ -106,7 +106,7 @@ interface ControlArrayProps extends GenericControlProps {
|
|
|
106
106
|
* />
|
|
107
107
|
* ```
|
|
108
108
|
*/
|
|
109
|
-
declare const ControlArray: (props: ControlArrayProps) =>
|
|
109
|
+
declare const ControlArray: (props: ControlArrayProps) => react_jsx_runtime12.JSX.Element | null;
|
|
110
110
|
//#endregion
|
|
111
111
|
//#region ../../src/core/components/form/ControlNumber.d.ts
|
|
112
112
|
interface ControlNumberProps extends GenericControlProps {
|
|
@@ -116,26 +116,26 @@ interface ControlNumberProps extends GenericControlProps {
|
|
|
116
116
|
/**
|
|
117
117
|
*
|
|
118
118
|
*/
|
|
119
|
-
declare const ControlNumber: (props: ControlNumberProps) =>
|
|
119
|
+
declare const ControlNumber: (props: ControlNumberProps) => react_jsx_runtime12.JSX.Element | null;
|
|
120
120
|
//#endregion
|
|
121
121
|
//#region ../../src/core/components/form/ControlObject.d.ts
|
|
122
122
|
interface ControlObjectProps extends GenericControlProps {
|
|
123
123
|
/**
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
124
|
+
* Number of columns for the grid layout.
|
|
125
|
+
* @default 1
|
|
126
|
+
*/
|
|
127
127
|
columns?: number;
|
|
128
128
|
/**
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
129
|
+
* Variant for the container.
|
|
130
|
+
* - "fieldset": Uses Mantine Fieldset with legend
|
|
131
|
+
* - "plain": No container, just renders fields
|
|
132
|
+
* @default "fieldset"
|
|
133
|
+
*/
|
|
134
134
|
variant?: "fieldset" | "plain";
|
|
135
135
|
/**
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
136
|
+
* Per-field control props override.
|
|
137
|
+
* Keys are field names from the schema.
|
|
138
|
+
*/
|
|
139
139
|
controlProps?: Record<string, Partial<Omit<ControlProps, "input">>>;
|
|
140
140
|
}
|
|
141
141
|
/**
|
|
@@ -170,7 +170,7 @@ interface ControlObjectProps extends GenericControlProps {
|
|
|
170
170
|
* />
|
|
171
171
|
* ```
|
|
172
172
|
*/
|
|
173
|
-
declare const ControlObject: (props: ControlObjectProps) =>
|
|
173
|
+
declare const ControlObject: (props: ControlObjectProps) => react_jsx_runtime12.JSX.Element | null;
|
|
174
174
|
//#endregion
|
|
175
175
|
//#region ../../src/core/components/form/ControlSelect.d.ts
|
|
176
176
|
type SelectValueLabel = string | {
|
|
@@ -199,7 +199,7 @@ interface ControlSelectProps extends GenericControlProps {
|
|
|
199
199
|
*
|
|
200
200
|
* Automatically detects enum values and array types from schema.
|
|
201
201
|
*/
|
|
202
|
-
declare const ControlSelect: (props: ControlSelectProps) =>
|
|
202
|
+
declare const ControlSelect: (props: ControlSelectProps) => react_jsx_runtime12.JSX.Element | null;
|
|
203
203
|
//#endregion
|
|
204
204
|
//#region ../../src/core/components/form/Control.d.ts
|
|
205
205
|
interface ControlProps extends GenericControlProps {
|
|
@@ -245,7 +245,7 @@ interface ControlProps extends GenericControlProps {
|
|
|
245
245
|
*
|
|
246
246
|
* Automatically handles labels, descriptions, error messages, required state, and default icons.
|
|
247
247
|
*/
|
|
248
|
-
declare const Control: (_props: ControlProps) =>
|
|
248
|
+
declare const Control: (_props: ControlProps) => react_jsx_runtime12.JSX.Element | null;
|
|
249
249
|
type CustomControlProps = {
|
|
250
250
|
defaultValue: any;
|
|
251
251
|
onChange: (value: any) => void;
|
|
@@ -270,54 +270,54 @@ declare const midnightTheme: AlephaTheme;
|
|
|
270
270
|
//#region ../../src/core/components/buttons/ActionButton.d.ts
|
|
271
271
|
interface ActionMenuItem {
|
|
272
272
|
/**
|
|
273
|
-
|
|
274
|
-
|
|
273
|
+
* Menu item type
|
|
274
|
+
*/
|
|
275
275
|
type?: "item" | "divider" | "label";
|
|
276
276
|
/**
|
|
277
|
-
|
|
278
|
-
|
|
277
|
+
* Label text for the menu item
|
|
278
|
+
*/
|
|
279
279
|
label?: string | ReactNode;
|
|
280
280
|
/**
|
|
281
|
-
|
|
282
|
-
|
|
281
|
+
* Icon element to display before the label
|
|
282
|
+
*/
|
|
283
283
|
icon?: ReactNode;
|
|
284
284
|
/**
|
|
285
|
-
|
|
286
|
-
|
|
285
|
+
* Click handler for menu items
|
|
286
|
+
*/
|
|
287
287
|
onClick?: () => void;
|
|
288
288
|
/**
|
|
289
|
-
|
|
290
|
-
|
|
289
|
+
* Href for navigation menu items
|
|
290
|
+
*/
|
|
291
291
|
href?: string;
|
|
292
292
|
/**
|
|
293
|
-
|
|
294
|
-
|
|
293
|
+
* Color for the menu item (e.g., "red" for danger actions)
|
|
294
|
+
*/
|
|
295
295
|
color?: string;
|
|
296
296
|
/**
|
|
297
|
-
|
|
298
|
-
|
|
297
|
+
* Nested submenu items
|
|
298
|
+
*/
|
|
299
299
|
children?: ActionMenuItem[];
|
|
300
300
|
/**
|
|
301
|
-
|
|
302
|
-
|
|
301
|
+
* Whether the menu item is active
|
|
302
|
+
*/
|
|
303
303
|
active?: boolean;
|
|
304
304
|
}
|
|
305
305
|
interface ActionMenuConfig {
|
|
306
306
|
/**
|
|
307
|
-
|
|
308
|
-
|
|
307
|
+
* Array of menu items to display
|
|
308
|
+
*/
|
|
309
309
|
items: ActionMenuItem[];
|
|
310
310
|
/**
|
|
311
|
-
|
|
312
|
-
|
|
311
|
+
* Menu position relative to the button
|
|
312
|
+
*/
|
|
313
313
|
position?: "bottom" | "bottom-start" | "bottom-end" | "top" | "top-start" | "top-end" | "left" | "right";
|
|
314
314
|
/**
|
|
315
|
-
|
|
316
|
-
|
|
315
|
+
* Menu width
|
|
316
|
+
*/
|
|
317
317
|
width?: number | string;
|
|
318
318
|
/**
|
|
319
|
-
|
|
320
|
-
|
|
319
|
+
* Menu shadow
|
|
320
|
+
*/
|
|
321
321
|
shadow?: "xs" | "sm" | "md" | "lg" | "xl";
|
|
322
322
|
on?: "hover" | "click";
|
|
323
323
|
targetProps?: MenuTargetProps;
|
|
@@ -327,40 +327,40 @@ interface ActionCommonProps extends ButtonProps {
|
|
|
327
327
|
children?: ReactNode;
|
|
328
328
|
textVisibleFrom?: "xs" | "sm" | "md" | "lg" | "xl";
|
|
329
329
|
/**
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
330
|
+
* Tooltip to display on hover. Can be a string for simple tooltips
|
|
331
|
+
* or a TooltipProps object for advanced configuration.
|
|
332
|
+
*/
|
|
333
333
|
tooltip?: string | number | TooltipProps;
|
|
334
334
|
/**
|
|
335
|
-
|
|
336
|
-
|
|
335
|
+
* Menu configuration. When provided, the action will display a dropdown menu.
|
|
336
|
+
*/
|
|
337
337
|
menu?: ActionMenuConfig;
|
|
338
338
|
/**
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
339
|
+
* If set, a confirmation dialog will be shown before performing the action.
|
|
340
|
+
* If `true`, a default title and message will be used.
|
|
341
|
+
* If a string, it will be used as the message with a default title.
|
|
342
|
+
* If an object, it can contain `title` and `message` properties to customize the dialog.
|
|
343
|
+
*/
|
|
344
344
|
confirm?: boolean | string | {
|
|
345
345
|
title?: string;
|
|
346
346
|
message: string;
|
|
347
347
|
};
|
|
348
348
|
/**
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
349
|
+
* Icon to display on the left side of the button.
|
|
350
|
+
* If no children are provided, the button will be styled as an icon-only button.
|
|
351
|
+
*/
|
|
352
352
|
icon?: ReactNode | ComponentType;
|
|
353
353
|
/**
|
|
354
|
-
|
|
355
|
-
|
|
354
|
+
* Additional props to pass to the ThemeIcon wrapping the icon.
|
|
355
|
+
*/
|
|
356
356
|
themeIconProps?: ThemeIconProps;
|
|
357
357
|
/**
|
|
358
|
-
|
|
359
|
-
|
|
358
|
+
* Visual intent of the action button.
|
|
359
|
+
*/
|
|
360
360
|
intent?: "primary" | "success" | "danger" | "warning" | "info" | "none";
|
|
361
361
|
}
|
|
362
362
|
type ActionProps = ActionCommonProps & (ActionNavigationButtonProps | ActionClickButtonProps | ActionSubmitButtonProps | ActionHookButtonProps | {});
|
|
363
|
-
declare const ActionButton: (_props: ActionProps) =>
|
|
363
|
+
declare const ActionButton: (_props: ActionProps) => react_jsx_runtime12.JSX.Element;
|
|
364
364
|
interface ActionSubmitButtonProps extends ButtonProps {
|
|
365
365
|
form: FormModel<any>;
|
|
366
366
|
type?: "submit" | "reset";
|
|
@@ -383,28 +383,28 @@ interface ActionNavigationButtonProps extends ButtonProps {
|
|
|
383
383
|
//#endregion
|
|
384
384
|
//#region ../../src/core/components/buttons/BurgerButton.d.ts
|
|
385
385
|
interface BurgerButtonProps extends BurgerProps {}
|
|
386
|
-
declare const BurgerButton: (props: BurgerButtonProps) =>
|
|
386
|
+
declare const BurgerButton: (props: BurgerButtonProps) => react_jsx_runtime12.JSX.Element;
|
|
387
387
|
//#endregion
|
|
388
388
|
//#region ../../src/core/components/buttons/ClipboardButton.d.ts
|
|
389
389
|
interface ClipboardButtonProps extends Omit<ActionCommonProps, "onClick" | "icon"> {
|
|
390
390
|
/**
|
|
391
|
-
|
|
392
|
-
|
|
391
|
+
* The value to copy to the clipboard
|
|
392
|
+
*/
|
|
393
393
|
value: string;
|
|
394
394
|
/**
|
|
395
|
-
|
|
396
|
-
|
|
395
|
+
* Timeout in ms to show the "Copied" state (default: 2000)
|
|
396
|
+
*/
|
|
397
397
|
timeout?: number;
|
|
398
398
|
/**
|
|
399
|
-
|
|
400
|
-
|
|
399
|
+
* Label to show in tooltip when not copied (default: "Copy")
|
|
400
|
+
*/
|
|
401
401
|
copyLabel?: string;
|
|
402
402
|
/**
|
|
403
|
-
|
|
404
|
-
|
|
403
|
+
* Label to show in tooltip when copied (default: "Copied")
|
|
404
|
+
*/
|
|
405
405
|
copiedLabel?: string;
|
|
406
406
|
}
|
|
407
|
-
declare const ClipboardButton: (props: ClipboardButtonProps) =>
|
|
407
|
+
declare const ClipboardButton: (props: ClipboardButtonProps) => react_jsx_runtime12.JSX.Element;
|
|
408
408
|
//#endregion
|
|
409
409
|
//#region ../../src/core/components/buttons/DarkModeButton.d.ts
|
|
410
410
|
interface DarkModeButtonProps {
|
|
@@ -415,27 +415,27 @@ interface DarkModeButtonProps {
|
|
|
415
415
|
segmentedProps?: Partial<SegmentedControlProps>;
|
|
416
416
|
actionProps?: Partial<ActionProps>;
|
|
417
417
|
}
|
|
418
|
-
declare const DarkModeButton: (props: DarkModeButtonProps) =>
|
|
418
|
+
declare const DarkModeButton: (props: DarkModeButtonProps) => react_jsx_runtime12.JSX.Element;
|
|
419
419
|
//#endregion
|
|
420
420
|
//#region ../../src/core/components/buttons/LanguageButton.d.ts
|
|
421
421
|
interface LanguageButtonProps {
|
|
422
422
|
languages?: string[];
|
|
423
423
|
actionProps?: ActionProps;
|
|
424
424
|
}
|
|
425
|
-
declare const LanguageButton: (props: LanguageButtonProps) =>
|
|
425
|
+
declare const LanguageButton: (props: LanguageButtonProps) => react_jsx_runtime12.JSX.Element;
|
|
426
426
|
//#endregion
|
|
427
427
|
//#region ../../src/core/components/buttons/OmnibarButton.d.ts
|
|
428
428
|
interface OmnibarButtonProps {
|
|
429
429
|
actionProps?: ActionProps;
|
|
430
430
|
collapsed?: boolean;
|
|
431
431
|
}
|
|
432
|
-
declare const OmnibarButton: (props: OmnibarButtonProps) =>
|
|
432
|
+
declare const OmnibarButton: (props: OmnibarButtonProps) => react_jsx_runtime12.JSX.Element;
|
|
433
433
|
//#endregion
|
|
434
434
|
//#region ../../src/core/components/buttons/ThemeButton.d.ts
|
|
435
435
|
interface ThemeButtonProps {
|
|
436
436
|
actionProps?: Partial<ActionProps>;
|
|
437
437
|
}
|
|
438
|
-
declare const ThemeButton: (props: ThemeButtonProps) =>
|
|
438
|
+
declare const ThemeButton: (props: ThemeButtonProps) => react_jsx_runtime12.JSX.Element;
|
|
439
439
|
//#endregion
|
|
440
440
|
//#region ../../src/core/services/DialogService.d.ts
|
|
441
441
|
interface BaseDialogOptions extends Partial<ModalProps> {
|
|
@@ -477,44 +477,44 @@ interface DialogServiceOptions {
|
|
|
477
477
|
declare class DialogService {
|
|
478
478
|
readonly options: DialogServiceOptions;
|
|
479
479
|
/**
|
|
480
|
-
|
|
481
|
-
|
|
480
|
+
* Show an alert dialog with a message
|
|
481
|
+
*/
|
|
482
482
|
alert(options?: AlertDialogOptions): Promise<void>;
|
|
483
483
|
/**
|
|
484
|
-
|
|
485
|
-
|
|
484
|
+
* Show a confirmation dialog that returns a promise
|
|
485
|
+
*/
|
|
486
486
|
confirm(options?: ConfirmDialogOptions): Promise<boolean>;
|
|
487
487
|
/**
|
|
488
|
-
|
|
489
|
-
|
|
488
|
+
* Show a prompt dialog to get user input
|
|
489
|
+
*/
|
|
490
490
|
prompt(options?: PromptDialogOptions): Promise<string | null>;
|
|
491
491
|
/**
|
|
492
|
-
|
|
493
|
-
|
|
492
|
+
* Open a custom dialog with provided content
|
|
493
|
+
*/
|
|
494
494
|
open(options?: BaseDialogOptions): string;
|
|
495
495
|
/**
|
|
496
|
-
|
|
497
|
-
|
|
496
|
+
* Close the currently open dialog or a specific dialog by ID
|
|
497
|
+
*/
|
|
498
498
|
close(modalId?: string): void;
|
|
499
499
|
/**
|
|
500
|
-
|
|
501
|
-
|
|
500
|
+
* Show an error viewer dialog
|
|
501
|
+
*/
|
|
502
502
|
error(error: Error | unknown, options?: BaseDialogOptions & {
|
|
503
503
|
showStack?: boolean;
|
|
504
504
|
}): void;
|
|
505
505
|
/**
|
|
506
|
-
|
|
507
|
-
|
|
506
|
+
* Show a form dialog for structured input
|
|
507
|
+
*/
|
|
508
508
|
form(options?: BaseDialogOptions): Promise<any>;
|
|
509
509
|
/**
|
|
510
|
-
|
|
511
|
-
|
|
510
|
+
* Show a loading/progress dialog with optional progress percentage
|
|
511
|
+
*/
|
|
512
512
|
loading(options?: BaseDialogOptions & {
|
|
513
513
|
progress?: number;
|
|
514
514
|
}): void;
|
|
515
515
|
/**
|
|
516
|
-
|
|
517
|
-
|
|
516
|
+
* Show an image viewer/gallery dialog
|
|
517
|
+
*/
|
|
518
518
|
image(src: string | string[], options?: BaseDialogOptions): void;
|
|
519
519
|
}
|
|
520
520
|
//#endregion
|
|
@@ -522,19 +522,19 @@ declare class DialogService {
|
|
|
522
522
|
declare const AlertDialog: ({
|
|
523
523
|
options,
|
|
524
524
|
onClose
|
|
525
|
-
}: AlertDialogProps) =>
|
|
525
|
+
}: AlertDialogProps) => react_jsx_runtime12.JSX.Element;
|
|
526
526
|
//#endregion
|
|
527
527
|
//#region ../../src/core/components/dialogs/ConfirmDialog.d.ts
|
|
528
528
|
declare const ConfirmDialog: ({
|
|
529
529
|
options,
|
|
530
530
|
onConfirm
|
|
531
|
-
}: ConfirmDialogProps) =>
|
|
531
|
+
}: ConfirmDialogProps) => react_jsx_runtime12.JSX.Element;
|
|
532
532
|
//#endregion
|
|
533
533
|
//#region ../../src/core/components/dialogs/PromptDialog.d.ts
|
|
534
534
|
declare const PromptDialog: ({
|
|
535
535
|
options,
|
|
536
536
|
onSubmit
|
|
537
|
-
}: PromptDialogProps) =>
|
|
537
|
+
}: PromptDialogProps) => react_jsx_runtime12.JSX.Element;
|
|
538
538
|
//#endregion
|
|
539
539
|
//#region ../../src/core/components/form/ControlDate.d.ts
|
|
540
540
|
interface ControlDateProps extends GenericControlProps {
|
|
@@ -552,7 +552,7 @@ interface ControlDateProps extends GenericControlProps {
|
|
|
552
552
|
*
|
|
553
553
|
* Automatically detects date formats from schema and renders appropriate picker.
|
|
554
554
|
*/
|
|
555
|
-
declare const ControlDate: (props: ControlDateProps) =>
|
|
555
|
+
declare const ControlDate: (props: ControlDateProps) => react_jsx_runtime12.JSX.Element | null;
|
|
556
556
|
//#endregion
|
|
557
557
|
//#region ../../src/core/components/form/ControlQueryBuilder.d.ts
|
|
558
558
|
interface ControlQueryBuilderProps extends Omit<TextInputProps, "value" | "onChange"> {
|
|
@@ -571,7 +571,7 @@ declare const ControlQueryBuilder: ({
|
|
|
571
571
|
onChange,
|
|
572
572
|
placeholder,
|
|
573
573
|
...textInputProps
|
|
574
|
-
}: ControlQueryBuilderProps) =>
|
|
574
|
+
}: ControlQueryBuilderProps) => react_jsx_runtime12.JSX.Element;
|
|
575
575
|
//#endregion
|
|
576
576
|
//#region ../../src/core/components/form/TypeForm.d.ts
|
|
577
577
|
interface TypeFormProps<T extends TObject> {
|
|
@@ -587,13 +587,13 @@ interface TypeFormProps<T extends TObject> {
|
|
|
587
587
|
schema?: TObject;
|
|
588
588
|
children?: (input: FormModel<T>["input"]) => ReactNode;
|
|
589
589
|
/**
|
|
590
|
-
|
|
591
|
-
|
|
590
|
+
* Control props applied to all fields.
|
|
591
|
+
*/
|
|
592
592
|
controlProps?: Partial<Omit<ControlProps, "input">>;
|
|
593
593
|
/**
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
594
|
+
* Per-field control props override.
|
|
595
|
+
* Keys are field names from the schema.
|
|
596
|
+
*/
|
|
597
597
|
fieldControlProps?: Record<string, Partial<Omit<ControlProps, "input">>>;
|
|
598
598
|
skipFormElement?: boolean;
|
|
599
599
|
skipSubmitButton?: boolean;
|
|
@@ -643,7 +643,7 @@ interface TypeFormProps<T extends TObject> {
|
|
|
643
643
|
* return <TypeForm form={form} columns={2} />;
|
|
644
644
|
* ```
|
|
645
645
|
*/
|
|
646
|
-
declare const TypeForm: <T extends TObject>(props: TypeFormProps<T>) =>
|
|
646
|
+
declare const TypeForm: <T extends TObject>(props: TypeFormProps<T>) => react_jsx_runtime12.JSX.Element | null;
|
|
647
647
|
//#endregion
|
|
648
648
|
//#region ../../src/core/components/layout/AppBar.d.ts
|
|
649
649
|
type AppBarItem = AppBarElement | AppBarBurger | AppBarDark | AppBarSearch | AppBarLang | AppBarSpacer | AppBarDivider;
|
|
@@ -682,7 +682,7 @@ interface AppBarProps {
|
|
|
682
682
|
flexProps?: FlexProps;
|
|
683
683
|
items?: AppBarItem[];
|
|
684
684
|
}
|
|
685
|
-
declare const AppBar: (props: AppBarProps) =>
|
|
685
|
+
declare const AppBar: (props: AppBarProps) => react_jsx_runtime12.JSX.Element;
|
|
686
686
|
//#endregion
|
|
687
687
|
//#region ../../src/core/components/layout/Sidebar.d.ts
|
|
688
688
|
interface SidebarProps {
|
|
@@ -697,13 +697,13 @@ interface SidebarProps {
|
|
|
697
697
|
paths?: string[];
|
|
698
698
|
};
|
|
699
699
|
/**
|
|
700
|
-
|
|
701
|
-
|
|
700
|
+
* Automatically populate the menu from the router's pages.
|
|
701
|
+
*/
|
|
702
702
|
autoPopulateMenu?: boolean | {
|
|
703
703
|
startsWith: string;
|
|
704
704
|
};
|
|
705
705
|
}
|
|
706
|
-
declare const Sidebar: (props: SidebarProps) =>
|
|
706
|
+
declare const Sidebar: (props: SidebarProps) => react_jsx_runtime12.JSX.Element;
|
|
707
707
|
interface SidebarItemProps {
|
|
708
708
|
item: SidebarMenuItem;
|
|
709
709
|
level: number;
|
|
@@ -777,24 +777,24 @@ interface AdminShellProps {
|
|
|
777
777
|
children?: ReactNode;
|
|
778
778
|
noSidebarWhen?: {
|
|
779
779
|
/**
|
|
780
|
-
|
|
781
|
-
|
|
780
|
+
* Paths where the sidebar should be hidden.
|
|
781
|
+
*/
|
|
782
782
|
paths?: string[];
|
|
783
783
|
};
|
|
784
784
|
}
|
|
785
785
|
declare module "alepha" {
|
|
786
786
|
interface State {
|
|
787
787
|
/**
|
|
788
|
-
|
|
789
|
-
|
|
788
|
+
* Whether the sidebar is opened or closed.
|
|
789
|
+
*/
|
|
790
790
|
"alepha.ui.sidebar.opened"?: boolean;
|
|
791
791
|
/**
|
|
792
|
-
|
|
793
|
-
|
|
792
|
+
* Whether the sidebar is collapsed (narrow) or expanded (wide).
|
|
793
|
+
*/
|
|
794
794
|
"alepha.ui.sidebar.collapsed"?: boolean;
|
|
795
795
|
}
|
|
796
796
|
}
|
|
797
|
-
declare const AdminShell: (props: AdminShellProps) =>
|
|
797
|
+
declare const AdminShell: (props: AdminShellProps) => react_jsx_runtime12.JSX.Element;
|
|
798
798
|
//#endregion
|
|
799
799
|
//#region ../../src/core/components/layout/Omnibar.d.ts
|
|
800
800
|
interface OmnibarProps {
|
|
@@ -802,7 +802,7 @@ interface OmnibarProps {
|
|
|
802
802
|
searchPlaceholder?: string;
|
|
803
803
|
nothingFound?: ReactNode;
|
|
804
804
|
}
|
|
805
|
-
declare const Omnibar: (props: OmnibarProps) =>
|
|
805
|
+
declare const Omnibar: (props: OmnibarProps) => react_jsx_runtime12.JSX.Element;
|
|
806
806
|
//#endregion
|
|
807
807
|
//#region ../../src/core/components/layout/AlephaMantineProvider.d.ts
|
|
808
808
|
interface AlephaMantineProviderProps {
|
|
@@ -814,7 +814,7 @@ interface AlephaMantineProviderProps {
|
|
|
814
814
|
modals?: ModalsProviderProps;
|
|
815
815
|
omnibar?: OmnibarProps | false;
|
|
816
816
|
}
|
|
817
|
-
declare const AlephaMantineProvider: (props: AlephaMantineProviderProps) =>
|
|
817
|
+
declare const AlephaMantineProvider: (props: AlephaMantineProviderProps) => react_jsx_runtime12.JSX.Element;
|
|
818
818
|
//#endregion
|
|
819
819
|
//#region ../../src/core/components/table/types.d.ts
|
|
820
820
|
interface ColumnVisibility {
|
|
@@ -833,13 +833,13 @@ interface DataTableColumn<T extends object, Filters extends TObject> {
|
|
|
833
833
|
value: (item: T, ctx: DataTableColumnContext<Filters>) => ReactNode;
|
|
834
834
|
fit?: boolean;
|
|
835
835
|
/**
|
|
836
|
-
|
|
837
|
-
|
|
836
|
+
* Enable sorting for this column. When true, clicking the header will sort by this column.
|
|
837
|
+
*/
|
|
838
838
|
sortable?: boolean;
|
|
839
839
|
/**
|
|
840
|
-
|
|
841
|
-
|
|
842
|
-
|
|
840
|
+
* The field name to use for sorting. If not provided, the column key is used.
|
|
841
|
+
* Follows Alepha sort convention: 'field' for ASC, '-field' for DESC.
|
|
842
|
+
*/
|
|
843
843
|
sortKey?: string;
|
|
844
844
|
}
|
|
845
845
|
type MaybePage<T> = Omit<Page<T>, "page"> & {
|
|
@@ -860,16 +860,16 @@ interface CheckboxAction<T extends object> {
|
|
|
860
860
|
}
|
|
861
861
|
interface DataTableProps<T extends object, Filters extends TObject> {
|
|
862
862
|
/**
|
|
863
|
-
|
|
864
|
-
|
|
863
|
+
* The items to display in the table. Can be a static page of items or a function that returns a promise resolving to a page of items.
|
|
864
|
+
*/
|
|
865
865
|
items: MaybePage<T> | ((filters: Static<Filters> & {
|
|
866
866
|
page: number;
|
|
867
867
|
size: number;
|
|
868
868
|
sort?: string;
|
|
869
869
|
}, ctx: DataTableSubmitContext<T>) => Async<MaybePage<T>>);
|
|
870
870
|
/**
|
|
871
|
-
|
|
872
|
-
|
|
871
|
+
* The columns to display in the table. Each column is defined by a key and a DataTableColumn object.
|
|
872
|
+
*/
|
|
873
873
|
columns: {
|
|
874
874
|
[key: string]: DataTableColumn<T, Filters>;
|
|
875
875
|
};
|
|
@@ -877,8 +877,8 @@ interface DataTableProps<T extends object, Filters extends TObject> {
|
|
|
877
877
|
typeFormProps?: Partial<Omit<TypeFormProps<Filters>, "form">>;
|
|
878
878
|
onFilterChange?: (key: string, value: unknown, form: FormModel<Filters>) => void;
|
|
879
879
|
/**
|
|
880
|
-
|
|
881
|
-
|
|
880
|
+
* Optional filters to apply to the data.
|
|
881
|
+
*/
|
|
882
882
|
filters?: TObject;
|
|
883
883
|
panel?: (item: T) => ReactNode;
|
|
884
884
|
canPanel?: (item: T) => boolean;
|
|
@@ -886,57 +886,57 @@ interface DataTableProps<T extends object, Filters extends TObject> {
|
|
|
886
886
|
submitEvery?: DurationLike;
|
|
887
887
|
withLineNumbers?: boolean;
|
|
888
888
|
/**
|
|
889
|
-
|
|
890
|
-
|
|
889
|
+
* Enable row selection with checkboxes. When true, a checkbox column is added as the first column.
|
|
890
|
+
*/
|
|
891
891
|
withCheckbox?: boolean;
|
|
892
892
|
/**
|
|
893
|
-
|
|
894
|
-
|
|
895
|
-
|
|
893
|
+
* Function to get a unique key for each item. Required when withCheckbox is true.
|
|
894
|
+
* Used to track selected items across pagination.
|
|
895
|
+
*/
|
|
896
896
|
getItemKey?: (item: T) => string;
|
|
897
897
|
/**
|
|
898
|
-
|
|
899
|
-
|
|
898
|
+
* Actions to display when items are selected. Each action receives the selected items.
|
|
899
|
+
*/
|
|
900
900
|
checkboxActions?: Array<CheckboxAction<T>>;
|
|
901
901
|
actions?: Array<ActionProps & {
|
|
902
902
|
label?: ReactNode;
|
|
903
903
|
}>;
|
|
904
904
|
/**
|
|
905
|
-
|
|
906
|
-
|
|
905
|
+
* Enable infinity scroll mode. When true, pagination controls are hidden and new items are loaded automatically when scrolling to the bottom.
|
|
906
|
+
*/
|
|
907
907
|
infinityScroll?: boolean;
|
|
908
908
|
/**
|
|
909
|
-
|
|
910
|
-
|
|
909
|
+
* Initial column visibility state. By default, first 10 columns are visible.
|
|
910
|
+
*/
|
|
911
911
|
defaultColumnVisibility?: ColumnVisibility;
|
|
912
912
|
/**
|
|
913
|
-
|
|
914
|
-
|
|
913
|
+
* Maximum number of columns to show by default. Default is 10.
|
|
914
|
+
*/
|
|
915
915
|
defaultVisibleColumnCount?: number;
|
|
916
916
|
/**
|
|
917
|
-
|
|
918
|
-
|
|
917
|
+
* Callback when column visibility changes.
|
|
918
|
+
*/
|
|
919
919
|
onColumnVisibilityChange?: (visibility: ColumnVisibility) => void;
|
|
920
920
|
/**
|
|
921
|
-
|
|
922
|
-
|
|
921
|
+
* Initial filter visibility state. By default, all filters are visible.
|
|
922
|
+
*/
|
|
923
923
|
defaultFilterVisibility?: FilterVisibility;
|
|
924
924
|
/**
|
|
925
|
-
|
|
926
|
-
|
|
925
|
+
* Callback when filter visibility changes.
|
|
926
|
+
*/
|
|
927
927
|
onFilterVisibilityChange?: (visibility: FilterVisibility) => void;
|
|
928
928
|
/**
|
|
929
|
-
|
|
930
|
-
|
|
929
|
+
* Props to pass to the Mantine Table component.
|
|
930
|
+
*/
|
|
931
931
|
tableProps?: TableProps;
|
|
932
932
|
/**
|
|
933
|
-
|
|
934
|
-
|
|
933
|
+
* Function to generate props for each table row based on the item.
|
|
934
|
+
*/
|
|
935
935
|
tableTrProps?: (item: T) => TableTrProps;
|
|
936
936
|
}
|
|
937
937
|
//#endregion
|
|
938
938
|
//#region ../../src/core/components/table/DataTable.d.ts
|
|
939
|
-
declare const DataTable: <T extends object, Filters extends TObject>(props: DataTableProps<T, Filters>) =>
|
|
939
|
+
declare const DataTable: <T extends object, Filters extends TObject>(props: DataTableProps<T, Filters>) => react_jsx_runtime12.JSX.Element;
|
|
940
940
|
//#endregion
|
|
941
941
|
//#region ../../src/core/constants/ui.d.ts
|
|
942
942
|
declare const ui: {
|
|
@@ -1097,21 +1097,21 @@ declare module "alepha" {
|
|
|
1097
1097
|
declare module "@alepha/react/router" {
|
|
1098
1098
|
interface PagePrimitiveOptions {
|
|
1099
1099
|
/**
|
|
1100
|
-
|
|
1101
|
-
|
|
1102
|
-
|
|
1103
|
-
|
|
1104
|
-
|
|
1105
|
-
|
|
1106
|
-
|
|
1100
|
+
* Human-readable title for the page.
|
|
1101
|
+
* - for Sidebar navigation
|
|
1102
|
+
* - for Omnibar navigation
|
|
1103
|
+
* (soon)
|
|
1104
|
+
* - for Breadcrumbs
|
|
1105
|
+
* - for document title (with AlephaReactHead)
|
|
1106
|
+
*/
|
|
1107
1107
|
label?: string;
|
|
1108
1108
|
/**
|
|
1109
|
-
|
|
1110
|
-
|
|
1109
|
+
* Optional description of the page.
|
|
1110
|
+
*/
|
|
1111
1111
|
description?: string;
|
|
1112
1112
|
/**
|
|
1113
|
-
|
|
1114
|
-
|
|
1113
|
+
* Optional icon for the page.
|
|
1114
|
+
*/
|
|
1115
1115
|
icon?: ReactNode | ComponentType;
|
|
1116
1116
|
}
|
|
1117
1117
|
}
|