@nice2dev/ui 1.0.30 → 1.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/CHANGELOG.md +495 -0
- package/README.md +30 -31
- package/dist/NiceCalendarScheduler.doc-BEtQkZjV.cjs +9 -0
- package/dist/NiceCalendarScheduler.doc-D__LRgOx.js +33 -0
- package/dist/NiceConfirmDialog-B57cl_F7.cjs +1 -0
- package/dist/NiceConfirmDialog-N9fBTLYm.js +81 -0
- package/dist/NiceDrawingCanvas.doc-Dv5vB4gY.js +32 -0
- package/dist/NiceDrawingCanvas.doc-Ww9zz17x.cjs +8 -0
- package/dist/NiceErrorBoundary-BD-uqk_q.js +709 -0
- package/dist/NiceErrorBoundary-CIPXaYik.cjs +1 -0
- package/dist/NiceFileManagerViews.doc-CKlnm6cX.cjs +1 -0
- package/dist/NiceFileManagerViews.doc-Cg21DArG.js +25 -0
- package/dist/NiceForm-BNZB31Pg.js +4499 -0
- package/dist/NiceForm-CPyAXxBO.cjs +1 -0
- package/dist/NiceMegaMenu.doc-7UyOCd3l.cjs +7 -0
- package/dist/NiceMegaMenu.doc-zeIyVa65.js +31 -0
- package/dist/NiceModal-Bj53SKLI.js +95 -0
- package/dist/NiceModal-DC0UlQhc.cjs +1 -0
- package/dist/NiceModuleLifecyclePanel-BBOg9g0b.cjs +1 -0
- package/dist/NiceModuleLifecyclePanel-DtuXRiLR.js +6991 -0
- package/dist/NiceModuleLifecyclePanel.css +1 -1
- package/dist/NicePagination-Bjxy9aEc.js +172 -0
- package/dist/NicePagination-CfFfNwrg.cjs +1 -0
- package/dist/NiceSavedQueryPanel-CH5c3rUG.js +6988 -0
- package/dist/NiceSavedQueryPanel-aQrEmmcC.cjs +596 -0
- package/dist/NiceScannerControl-Cd5KXJA9.js +12769 -0
- package/dist/NiceScannerControl-DZsERSw_.cjs +698 -0
- package/dist/NiceScannerControl.css +1 -0
- package/dist/NiceWindow-BoDzlGk-.js +1621 -0
- package/dist/NiceWindow-DgONWxBm.cjs +1 -0
- package/dist/charts-Bs0aDM0X.js +4671 -0
- package/dist/charts-DjjKkw0q.cjs +761 -0
- package/dist/charts.cjs +1 -1
- package/dist/charts.mjs +1 -1
- package/dist/core-BUsZ7_vI.js +27914 -0
- package/dist/core-CLfcCDKc.cjs +122 -0
- package/dist/data-branching-D7l_kILW.cjs +1 -0
- package/dist/data-branching-lJ07lDN-.js +6255 -0
- package/dist/data-branching.cjs +1 -1
- package/dist/data-branching.mjs +1 -1
- package/dist/data.cjs +1 -1
- package/dist/data.d.ts +41 -37
- package/dist/data.mjs +18 -19
- package/dist/devops-Bi8MXtko.js +8165 -0
- package/dist/devops-On_1wRf9.cjs +17 -0
- package/dist/devops.cjs +1 -1
- package/dist/devops.mjs +1 -1
- package/dist/editors.cjs +1 -1
- package/dist/editors.d.ts +215 -431
- package/dist/editors.mjs +48 -56
- package/dist/feedback.cjs +1 -1
- package/dist/feedback.mjs +3 -3
- package/dist/index-BDH1yDSg.js +69235 -0
- package/dist/index-C9njkNOD.cjs +5470 -0
- package/dist/index.cjs +1 -1
- package/dist/index.css +1 -1
- package/dist/index.d.ts +441 -916
- package/dist/index.mjs +908 -933
- package/dist/lazy.cjs +1 -1
- package/dist/lazy.mjs +24 -24
- package/dist/navigation.cjs +1 -1
- package/dist/navigation.d.ts +25 -213
- package/dist/navigation.mjs +105 -113
- package/dist/no-code-8lO7o6xi.js +7425 -0
- package/dist/no-code-K8tOLNew.cjs +332 -0
- package/dist/no-code.cjs +1 -1
- package/dist/no-code.mjs +1 -1
- package/dist/overlays.cjs +1 -1
- package/dist/overlays.d.ts +8 -0
- package/dist/overlays.mjs +36 -36
- package/dist/pickerCommons-CORo9j2a.js +2119 -0
- package/dist/pickerCommons-D3WShRrR.cjs +1 -0
- package/dist/style.css +5 -5
- package/package.json +3 -3
package/dist/editors.d.ts
CHANGED
|
@@ -83,7 +83,7 @@ declare interface BlurAnnotation extends AnnotationBase {
|
|
|
83
83
|
intensity: number;
|
|
84
84
|
}
|
|
85
85
|
|
|
86
|
-
declare interface ChunkInfo {
|
|
86
|
+
export declare interface ChunkInfo {
|
|
87
87
|
index: number;
|
|
88
88
|
start: number;
|
|
89
89
|
end: number;
|
|
@@ -124,14 +124,6 @@ declare interface CropResult {
|
|
|
124
124
|
zoom: number;
|
|
125
125
|
}
|
|
126
126
|
|
|
127
|
-
/** Currency definition. */
|
|
128
|
-
export declare interface CurrencyDef {
|
|
129
|
-
code: string;
|
|
130
|
-
symbol: string;
|
|
131
|
-
name: string;
|
|
132
|
-
decimals?: number;
|
|
133
|
-
}
|
|
134
|
-
|
|
135
127
|
declare interface CustomEmoji {
|
|
136
128
|
id: string;
|
|
137
129
|
name: string;
|
|
@@ -172,22 +164,26 @@ export declare const EMOJI_DATA: Emoji[];
|
|
|
172
164
|
|
|
173
165
|
declare type EmojiCategory = 'recent' | 'smileys' | 'people' | 'animals' | 'food' | 'travel' | 'activities' | 'objects' | 'symbols' | 'flags';
|
|
174
166
|
|
|
175
|
-
|
|
167
|
+
/** Per-file record tracked by {@link NiceUpload}. */
|
|
168
|
+
export declare interface FileInfo {
|
|
176
169
|
id: string;
|
|
177
170
|
file: File;
|
|
178
171
|
name: string;
|
|
179
172
|
size: number;
|
|
180
173
|
type: string;
|
|
181
174
|
status: UploadStatus;
|
|
175
|
+
/** 0–100. */
|
|
182
176
|
progress: number;
|
|
183
177
|
error?: string;
|
|
178
|
+
/** Object URL for image/video/audio previews. */
|
|
184
179
|
previewUrl?: string;
|
|
180
|
+
/** Server-returned URL after a successful upload. */
|
|
185
181
|
uploadedUrl?: string;
|
|
186
182
|
uploadedAt?: Date;
|
|
187
183
|
chunks?: ChunkInfo[];
|
|
188
184
|
}
|
|
189
185
|
|
|
190
|
-
declare interface FileItemActions {
|
|
186
|
+
export declare interface FileItemActions {
|
|
191
187
|
upload: () => void;
|
|
192
188
|
cancel: () => void;
|
|
193
189
|
retry: () => void;
|
|
@@ -316,6 +312,14 @@ export declare interface NiceAutocompleteProps extends NiceFormFieldProps {
|
|
|
316
312
|
highlightMatch?: boolean;
|
|
317
313
|
/** Alias for options — array of string suggestions. */
|
|
318
314
|
suggestions?: (string | NiceOption)[];
|
|
315
|
+
/**
|
|
316
|
+
* When `true` (default), focusing the field (before typing) opens the dropdown
|
|
317
|
+
* with **all** options sorted alphabetically. Set `false` to only show
|
|
318
|
+
* suggestions once the user has typed `minSearchLength` characters.
|
|
319
|
+
*/
|
|
320
|
+
showAll?: boolean;
|
|
321
|
+
/** Gap (px) between the input and the suggestion menu. Default 0 (menu abuts the input). */
|
|
322
|
+
menuGap?: number;
|
|
319
323
|
}
|
|
320
324
|
|
|
321
325
|
export declare const NiceCalendar: default_2.FC<NiceCalendarProps>;
|
|
@@ -710,8 +714,16 @@ export declare interface NiceColorPaletteProps extends NiceBaseProps {
|
|
|
710
714
|
variationCount?: number;
|
|
711
715
|
/** Label */
|
|
712
716
|
label?: string;
|
|
717
|
+
/** Label position relative to the swatch strip. Default `'top'`. */
|
|
718
|
+
labelPlacement?: 'top' | 'left';
|
|
713
719
|
/** Disabled state */
|
|
714
720
|
disabled?: boolean;
|
|
721
|
+
/** Looks enabled but the studio won't open and edits are blocked. */
|
|
722
|
+
readOnly?: boolean;
|
|
723
|
+
/** Show a loading spinner and dim the control. */
|
|
724
|
+
loading?: boolean;
|
|
725
|
+
/** Error ring; a string value also renders the message. */
|
|
726
|
+
error?: string | boolean;
|
|
715
727
|
/**
|
|
716
728
|
* Target number of colors in the generated palette. Overrides the natural
|
|
717
729
|
* count of the active harmony mode (clamped between `minColors` and
|
|
@@ -784,19 +796,6 @@ export declare interface NiceContactPickerProps extends NiceFormFieldProps {
|
|
|
784
796
|
maxSelections?: number;
|
|
785
797
|
}
|
|
786
798
|
|
|
787
|
-
/** Built-in countdown format presets. */
|
|
788
|
-
declare type NiceCountdownFormat =
|
|
789
|
-
/** `1d 02:34:15` / `02:34:15` — leading day count + clock */
|
|
790
|
-
'verbose'
|
|
791
|
-
/** `1d 2h 34m 15s` — abbreviated units */
|
|
792
|
-
| 'compact'
|
|
793
|
-
/** `2:34:15` / `34:15` — pure clock */
|
|
794
|
-
| 'short'
|
|
795
|
-
/** `in 2h` / `in 5m` / `in 30s` — single coarsest unit */
|
|
796
|
-
| 'minimal'
|
|
797
|
-
/** `1 day, 2 hours, 34 minutes` — verbose words */
|
|
798
|
-
| 'words';
|
|
799
|
-
|
|
800
799
|
export declare const NiceCountryPicker: default_2.FC<NiceCountryPickerProps>;
|
|
801
800
|
|
|
802
801
|
export declare interface NiceCountryPickerProps extends NiceFormFieldProps, DualVisibilityProps {
|
|
@@ -911,39 +910,6 @@ export declare interface NiceCropEditorProps {
|
|
|
911
910
|
tutorial?: NiceComponentTutorial;
|
|
912
911
|
}
|
|
913
912
|
|
|
914
|
-
/**
|
|
915
|
-
* {@link NiceCurrencyInput} — Amount input with currency selector, locale-aware formatting.
|
|
916
|
-
*/
|
|
917
|
-
export declare const NiceCurrencyInput: default_2.ForwardRefExoticComponent<NiceCurrencyInputProps & default_2.RefAttributes<HTMLDivElement>>;
|
|
918
|
-
|
|
919
|
-
/** Props for the {@link NiceCurrencyInput} component. */
|
|
920
|
-
export declare interface NiceCurrencyInputProps extends NiceFormFieldProps {
|
|
921
|
-
/** Controlled numeric amount (minor unit or major, based on `useMinorUnit`). */
|
|
922
|
-
value?: number | null;
|
|
923
|
-
/** Fires on amount change. */
|
|
924
|
-
onChange?: (value: number | null) => void;
|
|
925
|
-
/** Selected currency code (ISO 4217). */
|
|
926
|
-
currency?: string;
|
|
927
|
-
/** Fires when user changes currency. */
|
|
928
|
-
onCurrencyChange?: (code: string) => void;
|
|
929
|
-
/** Available currencies. */
|
|
930
|
-
currencies?: CurrencyDef[];
|
|
931
|
-
/** Whether to store value in minor units (cents). Default `false`. */
|
|
932
|
-
useMinorUnit?: boolean;
|
|
933
|
-
/** Minimum value. */
|
|
934
|
-
min?: number;
|
|
935
|
-
/** Maximum value. */
|
|
936
|
-
max?: number;
|
|
937
|
-
/** Override locale for formatting (e.g. "pl-PL"). */
|
|
938
|
-
locale?: string;
|
|
939
|
-
/** Placeholder text. */
|
|
940
|
-
placeholder?: string;
|
|
941
|
-
/** Whether to show currency selector (default `true` if currencies provided). */
|
|
942
|
-
showCurrencySelector?: boolean;
|
|
943
|
-
/** Fires on blur with the input event. */
|
|
944
|
-
onBlur?: (e: default_2.FocusEvent<HTMLInputElement>) => void;
|
|
945
|
-
}
|
|
946
|
-
|
|
947
913
|
/** A user-defined harmony scheme (hue angles + optional lightness offsets). */
|
|
948
914
|
declare interface NiceCustomHarmonyScheme {
|
|
949
915
|
id: string;
|
|
@@ -956,10 +922,61 @@ declare interface NiceCustomHarmonyScheme {
|
|
|
956
922
|
/** Predefined date-format presets. */
|
|
957
923
|
export declare type NiceDateFormatPreset = 'date-local' | 'date-utc' | 'datetime-local' | 'datetime-utc' | 'month-local' | 'month-utc' | 'week' | 'time';
|
|
958
924
|
|
|
959
|
-
export declare const
|
|
925
|
+
export declare const NiceDateRangeBox: default_2.FC<NiceDateRangeBoxProps>;
|
|
926
|
+
|
|
927
|
+
/** Props for the {@link NiceDateRangeBox} component — a pair of date pickers for selecting a date range. */
|
|
928
|
+
export declare interface NiceDateRangeBoxProps extends NiceFormFieldProps {
|
|
929
|
+
/** Start date (ISO string). */
|
|
930
|
+
startDate: string;
|
|
931
|
+
/** End date (ISO string). */
|
|
932
|
+
endDate: string;
|
|
933
|
+
/** Called when the start date changes. */
|
|
934
|
+
onStartChange: (date: string) => void;
|
|
935
|
+
/** Called when the end date changes. */
|
|
936
|
+
onEndChange: (date: string) => void;
|
|
937
|
+
/** Earliest selectable date. */
|
|
938
|
+
min?: string;
|
|
939
|
+
/** Latest selectable date. */
|
|
940
|
+
max?: string;
|
|
941
|
+
/** Show a clear button. */
|
|
942
|
+
clearable?: boolean;
|
|
943
|
+
/** Placeholder for the start input. */
|
|
944
|
+
startPlaceholder?: string;
|
|
945
|
+
/** Placeholder for the end input. */
|
|
946
|
+
endPlaceholder?: string;
|
|
947
|
+
/** Label shown above (or before) the start picker. */
|
|
948
|
+
startLabel?: string;
|
|
949
|
+
/** Label shown above (or before) the end picker. */
|
|
950
|
+
endLabel?: string;
|
|
951
|
+
/** Layout direction for the two pickers (default `horizontal`). */
|
|
952
|
+
layout?: 'horizontal' | 'vertical';
|
|
953
|
+
/** Custom separator rendered between pickers in horizontal layout (default `–`). Pass `''` to hide. */
|
|
954
|
+
separator?: default_2.ReactNode;
|
|
955
|
+
/** Gap in pixels between the two pickers (default 12). */
|
|
956
|
+
gap?: number;
|
|
957
|
+
/** Stretch each picker to fill available width. */
|
|
958
|
+
fullWidth?: boolean;
|
|
959
|
+
/**
|
|
960
|
+
* Format preset forwarded to BOTH inner pickers — so a range can be
|
|
961
|
+
* date, datetime (`'datetime-local'`), month, week or time, not just date.
|
|
962
|
+
*/
|
|
963
|
+
dateFormatPreset?: NiceDateFormatPreset;
|
|
964
|
+
/**
|
|
965
|
+
* @deprecated Use `dateFormatPreset`. Native input type forwarded to both
|
|
966
|
+
* inner pickers.
|
|
967
|
+
*/
|
|
968
|
+
type?: 'date' | 'datetime-local' | 'time' | 'month' | 'week';
|
|
969
|
+
}
|
|
970
|
+
|
|
971
|
+
/** Built-in countdown format presets (merged in from NiceTimePicker).
|
|
972
|
+
* NOTE: deliberately NOT named `NiceCountdownFormat` — that name is already a
|
|
973
|
+
* public export of the unrelated `NiceCountdown` display component. */
|
|
974
|
+
declare type NiceDateTimeCountdownFormat = 'verbose' | 'compact' | 'short' | 'minimal' | 'words';
|
|
975
|
+
|
|
976
|
+
export declare const NiceDateTimePicker: default_2.ForwardRefExoticComponent<NiceDateTimePickerProps & default_2.RefAttributes<HTMLInputElement>>;
|
|
960
977
|
|
|
961
|
-
/** Props for the {@link
|
|
962
|
-
export declare interface
|
|
978
|
+
/** Props for the {@link NiceDateTimePicker} component — a masked, locale-aware date/time input. */
|
|
979
|
+
export declare interface NiceDateTimePickerProps extends NiceFormFieldProps {
|
|
963
980
|
/** ISO value (e.g. `'2024-06-15'`). Always ISO regardless of display locale. */
|
|
964
981
|
value?: string;
|
|
965
982
|
/** Fires with the new ISO value. Empty string while the input is incomplete. */
|
|
@@ -1003,66 +1020,44 @@ export declare interface NiceDatePickerProps extends NiceFormFieldProps {
|
|
|
1003
1020
|
* Only fires for date / datetime / month presets.
|
|
1004
1021
|
*/
|
|
1005
1022
|
keyboardShortcuts?: boolean;
|
|
1006
|
-
|
|
1007
|
-
|
|
1008
|
-
export declare const NiceDateRangeBox: default_2.FC<NiceDateRangeBoxProps>;
|
|
1009
|
-
|
|
1010
|
-
/** Props for the {@link NiceDateRangeBox} component — a pair of date pickers for selecting a date range. */
|
|
1011
|
-
export declare interface NiceDateRangeBoxProps extends NiceFormFieldProps {
|
|
1012
|
-
/** Start date (ISO string). */
|
|
1013
|
-
startDate: string;
|
|
1014
|
-
/** End date (ISO string). */
|
|
1015
|
-
endDate: string;
|
|
1016
|
-
/** Called when the start date changes. */
|
|
1017
|
-
onStartChange: (date: string) => void;
|
|
1018
|
-
/** Called when the end date changes. */
|
|
1019
|
-
onEndChange: (date: string) => void;
|
|
1020
|
-
/** Earliest selectable date. */
|
|
1021
|
-
min?: string;
|
|
1022
|
-
/** Latest selectable date. */
|
|
1023
|
-
max?: string;
|
|
1024
|
-
/** Show a clear button. */
|
|
1025
|
-
clearable?: boolean;
|
|
1026
|
-
/** Placeholder for the start input. */
|
|
1027
|
-
startPlaceholder?: string;
|
|
1028
|
-
/** Placeholder for the end input. */
|
|
1029
|
-
endPlaceholder?: string;
|
|
1030
|
-
/** Label shown above (or before) the start picker. */
|
|
1031
|
-
startLabel?: string;
|
|
1032
|
-
/** Label shown above (or before) the end picker. */
|
|
1033
|
-
endLabel?: string;
|
|
1034
|
-
/** Layout direction for the two pickers (default `horizontal`). */
|
|
1035
|
-
layout?: 'horizontal' | 'vertical';
|
|
1036
|
-
/** Custom separator rendered between pickers in horizontal layout (default `–`). Pass `''` to hide. */
|
|
1037
|
-
separator?: default_2.ReactNode;
|
|
1038
|
-
/** Gap in pixels between the two pickers (default 12). */
|
|
1039
|
-
gap?: number;
|
|
1040
|
-
/** Stretch each picker to fill available width. */
|
|
1041
|
-
fullWidth?: boolean;
|
|
1042
|
-
}
|
|
1043
|
-
|
|
1044
|
-
export declare const NiceDateTimePicker: default_2.ForwardRefExoticComponent<NiceDateTimePickerProps & default_2.RefAttributes<HTMLDivElement>>;
|
|
1045
|
-
|
|
1046
|
-
/** Props for the {@link NiceDateTimePicker} component — a combined date and time picker with calendar dropdown. */
|
|
1047
|
-
export declare interface NiceDateTimePickerProps extends NiceFormFieldProps {
|
|
1048
|
-
/** ISO 8601 date-time string (e.g. "2026-03-16T14:30") */
|
|
1049
|
-
value?: string;
|
|
1050
|
-
onChange?: (value: string) => void;
|
|
1051
|
-
onBlur?: (e: default_2.FocusEvent) => void;
|
|
1052
|
-
/** Minimum allowed date-time (ISO string) */
|
|
1053
|
-
min?: string;
|
|
1054
|
-
/** Maximum allowed date-time (ISO string) */
|
|
1055
|
-
max?: string;
|
|
1056
|
-
/** Display format — 12h shows AM/PM toggle, 24h shows 0–23 */
|
|
1057
|
-
hourFormat?: '12' | '24';
|
|
1058
|
-
/** Minute increment step */
|
|
1059
|
-
minuteStep?: number;
|
|
1060
|
-
/** Show seconds input */
|
|
1023
|
+
/** Datetime/time: show a seconds section (`HH:mm:ss`). Default: `false`. */
|
|
1061
1024
|
showSeconds?: boolean;
|
|
1062
|
-
/**
|
|
1025
|
+
/**
|
|
1026
|
+
* Datetime/time: minute increment. Drives the native picker companion `step`
|
|
1027
|
+
* AND the ↑/↓ arrow stepping in the masked field.
|
|
1028
|
+
*/
|
|
1029
|
+
minuteStep?: number;
|
|
1030
|
+
/**
|
|
1031
|
+
* Datetime/time: `'12'` renders an AM/PM toggle beside the field (and asks the
|
|
1032
|
+
* native picker for a 12-hour dialog where the OS locale supports it). The
|
|
1033
|
+
* masked field always edits 24-hour digits and the emitted value stays ISO 24h.
|
|
1034
|
+
*/
|
|
1035
|
+
hourFormat?: '12' | '24';
|
|
1036
|
+
/**
|
|
1037
|
+
* Datetime/time/date: show a "Now" button that fills the current date/time.
|
|
1038
|
+
* Default: `false`.
|
|
1039
|
+
*/
|
|
1063
1040
|
showNow?: boolean;
|
|
1064
|
-
/**
|
|
1065
|
-
|
|
1041
|
+
/**
|
|
1042
|
+
* Explicit target date to combine with the picked time (`Date` or
|
|
1043
|
+
* `YYYY-MM-DD`). When omitted while {@link countdown} is on, the target
|
|
1044
|
+
* auto-resolves to the next occurrence (today, else tomorrow).
|
|
1045
|
+
*/
|
|
1046
|
+
targetDate?: string | Date;
|
|
1047
|
+
/** Fires whenever the resolved countdown target changes. */
|
|
1048
|
+
onTargetChange?: (target: Date) => void;
|
|
1049
|
+
/** Show a live countdown label beside the field. */
|
|
1050
|
+
countdown?: boolean;
|
|
1051
|
+
/** Built-in countdown format preset (default `'verbose'`). */
|
|
1052
|
+
countdownFormat?: NiceDateTimeCountdownFormat;
|
|
1053
|
+
/** Custom countdown formatter (overrides {@link countdownFormat}). */
|
|
1054
|
+
formatCountdown?: (msRemaining: number, target: Date) => string;
|
|
1055
|
+
/** Label rendered before the countdown text (e.g. `'starts in'`). */
|
|
1056
|
+
countdownLabel?: default_2.ReactNode;
|
|
1057
|
+
/** Countdown tick interval in ms (default 1000, min 100). */
|
|
1058
|
+
countdownInterval?: number;
|
|
1059
|
+
/** Text shown once the countdown reaches zero. */
|
|
1060
|
+
countdownDoneText?: string;
|
|
1066
1061
|
}
|
|
1067
1062
|
|
|
1068
1063
|
/** A content block in the {@link NiceDocumentEditor}. */
|
|
@@ -1189,90 +1184,6 @@ export declare interface NiceEmojiPickerProps {
|
|
|
1189
1184
|
'data-testid'?: string;
|
|
1190
1185
|
}
|
|
1191
1186
|
|
|
1192
|
-
export declare const NiceFileUpload: default_2.ForwardRefExoticComponent<NiceFileUploadProps & default_2.RefAttributes<NiceFileUploadRef>>;
|
|
1193
|
-
|
|
1194
|
-
export declare interface NiceFileUploadProps extends NiceBaseProps {
|
|
1195
|
-
/** Akceptowane typy plików (np. "image/*,.pdf") */
|
|
1196
|
-
accept?: string;
|
|
1197
|
-
/** Czy pozwalać na multiple files */
|
|
1198
|
-
multiple?: boolean;
|
|
1199
|
-
/** Maksymalny rozmiar pliku w bajtach */
|
|
1200
|
-
maxFileSize?: number;
|
|
1201
|
-
/** Maksymalna liczba plików */
|
|
1202
|
-
maxFiles?: number;
|
|
1203
|
-
/** Minimalny rozmiar pliku */
|
|
1204
|
-
minFileSize?: number;
|
|
1205
|
-
/** Rozmiar chunka dla dużych plików (domyślnie 5MB) */
|
|
1206
|
-
chunkSize?: number;
|
|
1207
|
-
/** Próg rozmiaru pliku dla chunked upload (domyślnie 10MB) */
|
|
1208
|
-
chunkThreshold?: number;
|
|
1209
|
-
/** Automatycznie rozpocznij upload po dodaniu */
|
|
1210
|
-
autoUpload?: boolean;
|
|
1211
|
-
/** Handler uploadu */
|
|
1212
|
-
uploadHandler?: UploadHandler;
|
|
1213
|
-
/** URL do uploadu (jeśli nie podano uploadHandler) */
|
|
1214
|
-
uploadUrl?: string;
|
|
1215
|
-
/** Nagłówki HTTP dla uploadu */
|
|
1216
|
-
uploadHeaders?: Record<string, string>;
|
|
1217
|
-
/** Callback po dodaniu plików */
|
|
1218
|
-
onFilesAdded?: (files: FileInfo[]) => void;
|
|
1219
|
-
/** Callback po zakończeniu uploadu */
|
|
1220
|
-
onUploadComplete?: (file: FileInfo) => void;
|
|
1221
|
-
/** Callback po błędzie */
|
|
1222
|
-
onUploadError?: (file: FileInfo, error: string) => void;
|
|
1223
|
-
/** Callback na postęp */
|
|
1224
|
-
onProgress?: (file: FileInfo, progress: number) => void;
|
|
1225
|
-
/** Callback po usunięciu */
|
|
1226
|
-
onFileRemoved?: (file: FileInfo) => void;
|
|
1227
|
-
/** Callback po zmianie stanu */
|
|
1228
|
-
onChange?: (files: FileInfo[]) => void;
|
|
1229
|
-
/** Niestandardowy renderer podglądu */
|
|
1230
|
-
renderPreview?: (file: FileInfo) => default_2.ReactNode;
|
|
1231
|
-
/** Niestandardowy renderer elementu listy */
|
|
1232
|
-
renderFileItem?: (file: FileInfo, actions: FileItemActions) => default_2.ReactNode;
|
|
1233
|
-
/** Pokaż podgląd obrazów */
|
|
1234
|
-
showPreview?: boolean;
|
|
1235
|
-
/** Pokaż listę plików */
|
|
1236
|
-
showFileList?: boolean;
|
|
1237
|
-
/** Tryb wyświetlania listy */
|
|
1238
|
-
listMode?: 'list' | 'grid' | 'compact';
|
|
1239
|
-
/** Rozmiar podglądu */
|
|
1240
|
-
previewSize?: NiceSize;
|
|
1241
|
-
/** Tekst w dropzone */
|
|
1242
|
-
dropzoneText?: string;
|
|
1243
|
-
/** Tekst pod przyciskiem */
|
|
1244
|
-
browseText?: string;
|
|
1245
|
-
/** Tekst podczas dragover */
|
|
1246
|
-
dragActiveText?: string;
|
|
1247
|
-
/** Wyłączony */
|
|
1248
|
-
disabled?: boolean;
|
|
1249
|
-
/** Read-only (tylko podgląd) */
|
|
1250
|
-
readOnly?: boolean;
|
|
1251
|
-
/** Customowe klasy CSS */
|
|
1252
|
-
dropzoneClassName?: string;
|
|
1253
|
-
/** Retry count */
|
|
1254
|
-
maxRetries?: number;
|
|
1255
|
-
/** Ilość równoczesnych uploadów */
|
|
1256
|
-
concurrentUploads?: number;
|
|
1257
|
-
/** Walidator plików */
|
|
1258
|
-
validateFile?: (file: File) => string | null;
|
|
1259
|
-
/** Zachowaj pliki po uploadzięciu */
|
|
1260
|
-
keepFilesAfterUpload?: boolean;
|
|
1261
|
-
/** Początkowe pliki */
|
|
1262
|
-
initialFiles?: FileInfo[];
|
|
1263
|
-
}
|
|
1264
|
-
|
|
1265
|
-
declare interface NiceFileUploadRef {
|
|
1266
|
-
addFiles: (files: File[]) => void;
|
|
1267
|
-
uploadAll: () => void;
|
|
1268
|
-
cancelAll: () => void;
|
|
1269
|
-
clearAll: () => void;
|
|
1270
|
-
getFiles: () => FileInfo[];
|
|
1271
|
-
getFile: (id: string) => FileInfo | undefined;
|
|
1272
|
-
retryFailed: () => void;
|
|
1273
|
-
openFileBrowser: () => void;
|
|
1274
|
-
}
|
|
1275
|
-
|
|
1276
1187
|
export declare const NiceForm: default_2.FC<NiceFormProps>;
|
|
1277
1188
|
|
|
1278
1189
|
/** Describes a single field in a {@link NiceForm} layout. */
|
|
@@ -1390,8 +1301,16 @@ export declare interface NiceGradientPickerProps extends NiceBaseProps {
|
|
|
1390
1301
|
/** Maximum number of gradient stops */
|
|
1391
1302
|
maxStops?: number;
|
|
1392
1303
|
label?: string;
|
|
1304
|
+
/** Label position relative to the swatch. Default `'top'`. */
|
|
1305
|
+
labelPlacement?: 'top' | 'left';
|
|
1393
1306
|
disabled?: boolean;
|
|
1394
|
-
/**
|
|
1307
|
+
/** Looks enabled but the popup won't open and edits are blocked. */
|
|
1308
|
+
readOnly?: boolean;
|
|
1309
|
+
/** Show a loading spinner and dim the control. */
|
|
1310
|
+
loading?: boolean;
|
|
1311
|
+
/** Error ring; a string value also renders the message. */
|
|
1312
|
+
error?: string | boolean;
|
|
1313
|
+
/** Fixed width of the popup. Defaults to 340px. */
|
|
1395
1314
|
width?: string | number;
|
|
1396
1315
|
}
|
|
1397
1316
|
|
|
@@ -1823,6 +1742,8 @@ export declare interface NiceLookupProps extends NiceFormFieldProps {
|
|
|
1823
1742
|
displayField?: string;
|
|
1824
1743
|
/** Width of the dropdown when in mini-grid mode (CSS). */
|
|
1825
1744
|
dropdownWidth?: string | number;
|
|
1745
|
+
/** Gap (px) between the input and the dropdown menu. Default 0 (menu abuts the input). */
|
|
1746
|
+
menuGap?: number;
|
|
1826
1747
|
}
|
|
1827
1748
|
|
|
1828
1749
|
export declare const NiceMarkdownEditor: default_2.ForwardRefExoticComponent<NiceMarkdownEditorProps & default_2.RefAttributes<HTMLDivElement>>;
|
|
@@ -1956,6 +1877,8 @@ export declare interface NiceNumberInputProps extends NiceFormFieldProps {
|
|
|
1956
1877
|
suffixValue?: string;
|
|
1957
1878
|
/** Called when the suffix select changes. */
|
|
1958
1879
|
onSuffixChange?: (value: string, prevWeight: number | undefined, newWeight: number | undefined) => void;
|
|
1880
|
+
/** Show a divider line between the value and the suffix. Default `false`. */
|
|
1881
|
+
suffixSeparator?: boolean;
|
|
1959
1882
|
}
|
|
1960
1883
|
|
|
1961
1884
|
export declare const NicePasswordInput: default_2.ForwardRefExoticComponent<NicePasswordInputProps & default_2.RefAttributes<HTMLInputElement>>;
|
|
@@ -2033,31 +1956,6 @@ export declare interface NicePDFAnnotationEditorProps extends NiceFormFieldProps
|
|
|
2033
1956
|
tutorial?: NiceComponentTutorial;
|
|
2034
1957
|
}
|
|
2035
1958
|
|
|
2036
|
-
/**
|
|
2037
|
-
* {@link NicePhoneInput} — Phone number input with country code selector, masking, and E.164 formatting.
|
|
2038
|
-
*/
|
|
2039
|
-
export declare const NicePhoneInput: default_2.ForwardRefExoticComponent<NicePhoneInputProps & default_2.RefAttributes<HTMLDivElement>>;
|
|
2040
|
-
|
|
2041
|
-
/** Props for the {@link NicePhoneInput} component. */
|
|
2042
|
-
export declare interface NicePhoneInputProps extends NiceFormFieldProps {
|
|
2043
|
-
/** Controlled phone value. */
|
|
2044
|
-
value?: PhoneValue;
|
|
2045
|
-
/** Fires on value change with parsed phone value. */
|
|
2046
|
-
onChange?: (value: PhoneValue) => void;
|
|
2047
|
-
/** Available country codes. */
|
|
2048
|
-
countryCodes?: PhoneCountryCode[];
|
|
2049
|
-
/** Default country code (ISO alpha-2, e.g. "PL"). */
|
|
2050
|
-
defaultCountry?: string;
|
|
2051
|
-
/** Placeholder for the number part. */
|
|
2052
|
-
placeholder?: string;
|
|
2053
|
-
/** Whether to show the country flag emoji. */
|
|
2054
|
-
showFlag?: boolean;
|
|
2055
|
-
/** Whether to validate as E.164 on blur. */
|
|
2056
|
-
validateE164?: boolean;
|
|
2057
|
-
/** Fires with the raw input event. */
|
|
2058
|
-
onBlur?: (e: default_2.FocusEvent<HTMLInputElement>) => void;
|
|
2059
|
-
}
|
|
2060
|
-
|
|
2061
1959
|
export declare const NicePickList: <T = unknown>(props: NicePickListProps<T> & default_2.RefAttributes<HTMLDivElement>) => default_2.ReactElement | null;
|
|
2062
1960
|
|
|
2063
1961
|
/** Props for the {@link NicePickList} component — a dual-list control for moving items between source and target. */
|
|
@@ -2100,34 +1998,6 @@ export declare interface NicePickListProps<T = unknown> extends NiceBaseProps {
|
|
|
2100
1998
|
size?: NiceSize;
|
|
2101
1999
|
}
|
|
2102
2000
|
|
|
2103
|
-
/**
|
|
2104
|
-
* {@link NicePinCodeInput} — PIN code entry with individual digit boxes,
|
|
2105
|
-
* optional numeric keypad, masking, and auto-submit.
|
|
2106
|
-
*/
|
|
2107
|
-
export declare const NicePinCodeInput: default_2.ForwardRefExoticComponent<NicePinCodeInputProps & default_2.RefAttributes<HTMLDivElement>>;
|
|
2108
|
-
|
|
2109
|
-
/** Props for the {@link NicePinCodeInput} component. */
|
|
2110
|
-
export declare interface NicePinCodeInputProps extends NiceFormFieldProps {
|
|
2111
|
-
/** Current PIN value. */
|
|
2112
|
-
value?: string;
|
|
2113
|
-
/** Fires when value changes. */
|
|
2114
|
-
onChange?: (value: string) => void;
|
|
2115
|
-
/** Fires when PIN is fully entered. */
|
|
2116
|
-
onComplete?: (pin: string) => void;
|
|
2117
|
-
/** Number of PIN digits. */
|
|
2118
|
-
length?: number;
|
|
2119
|
-
/** Whether to mask digits (show dots). */
|
|
2120
|
-
masked?: boolean;
|
|
2121
|
-
/** Whether to show a numeric keypad below the input. */
|
|
2122
|
-
showKeypad?: boolean;
|
|
2123
|
-
/** Whether to auto-submit when all digits are filled. */
|
|
2124
|
-
autoSubmit?: boolean;
|
|
2125
|
-
/** Error shake animation trigger (toggle to replay). */
|
|
2126
|
-
shake?: boolean;
|
|
2127
|
-
/** Placeholder character. */
|
|
2128
|
-
placeholderChar?: string;
|
|
2129
|
-
}
|
|
2130
|
-
|
|
2131
2001
|
export declare const NiceRadioGroup: default_2.FC<NiceRadioGroupProps>;
|
|
2132
2002
|
|
|
2133
2003
|
/** Props for the {@link NiceRadioGroup} component — a set of mutually exclusive radio options. */
|
|
@@ -2152,12 +2022,12 @@ export declare interface NiceRangeSliderProps extends NiceFormFieldProps {
|
|
|
2152
2022
|
max?: number;
|
|
2153
2023
|
/** Step increment. */
|
|
2154
2024
|
step?: number;
|
|
2155
|
-
/** Start (lower) thumb value. */
|
|
2156
|
-
startValue
|
|
2157
|
-
/** End (upper) thumb value. */
|
|
2158
|
-
endValue
|
|
2025
|
+
/** Start (lower) thumb value. Defaults to `min`. */
|
|
2026
|
+
startValue?: number;
|
|
2027
|
+
/** End (upper) thumb value. Defaults to `max`. */
|
|
2028
|
+
endValue?: number;
|
|
2159
2029
|
/** Called when either thumb moves. */
|
|
2160
|
-
onChange
|
|
2030
|
+
onChange?: (start: number, end: number) => void;
|
|
2161
2031
|
/** Show value labels at each thumb. */
|
|
2162
2032
|
showLabels?: boolean;
|
|
2163
2033
|
/** Custom label formatter. */
|
|
@@ -2354,27 +2224,6 @@ declare interface NiceSignatureData {
|
|
|
2354
2224
|
|
|
2355
2225
|
declare type NiceSignatureOutput = 'png' | 'jpeg' | 'svg';
|
|
2356
2226
|
|
|
2357
|
-
export declare const NiceSignaturePad: ForwardRefExoticComponent<NiceSignaturePadProps & RefAttributes<HTMLDivElement>>;
|
|
2358
|
-
|
|
2359
|
-
/** Props for the {@link NiceSignaturePad} component — a canvas-based digital signature capture pad. */
|
|
2360
|
-
export declare interface NiceSignaturePadProps extends NiceBaseProps {
|
|
2361
|
-
/** Signature image (data URL) — controlled value */
|
|
2362
|
-
value?: string | null;
|
|
2363
|
-
onChange?: (dataUrl: string | null) => void;
|
|
2364
|
-
penColor?: string;
|
|
2365
|
-
penWidth?: number;
|
|
2366
|
-
backgroundColor?: string;
|
|
2367
|
-
width?: number;
|
|
2368
|
-
height?: number;
|
|
2369
|
-
size?: NiceSize;
|
|
2370
|
-
disabled?: boolean;
|
|
2371
|
-
readOnly?: boolean;
|
|
2372
|
-
showClear?: boolean;
|
|
2373
|
-
showUndo?: boolean;
|
|
2374
|
-
label?: string;
|
|
2375
|
-
exportFormat?: 'image/png' | 'image/jpeg' | 'image/svg+xml';
|
|
2376
|
-
}
|
|
2377
|
-
|
|
2378
2227
|
declare interface NiceSignaturePoint {
|
|
2379
2228
|
x: number;
|
|
2380
2229
|
y: number;
|
|
@@ -2387,6 +2236,12 @@ export declare interface NiceSignatureProps {
|
|
|
2387
2236
|
value?: NiceSignatureData | null;
|
|
2388
2237
|
/** Value change callback */
|
|
2389
2238
|
onChange?: (data: NiceSignatureData | null) => void;
|
|
2239
|
+
/** Convenience callback emitting the signature as a PNG data URL (null when
|
|
2240
|
+
* cleared) — for form consumers that bind a string value. Ported from the
|
|
2241
|
+
* former NiceSignaturePad. */
|
|
2242
|
+
onChangeDataUrl?: (url: string | null) => void;
|
|
2243
|
+
/** Field label shown above the pad. */
|
|
2244
|
+
label?: string;
|
|
2390
2245
|
/** Width */
|
|
2391
2246
|
width?: number | string;
|
|
2392
2247
|
/** Height */
|
|
@@ -2535,29 +2390,6 @@ export declare interface NiceTagBoxProps extends NiceFormFieldProps {
|
|
|
2535
2390
|
autoExpand?: boolean;
|
|
2536
2391
|
}
|
|
2537
2392
|
|
|
2538
|
-
/**
|
|
2539
|
-
* {@link NiceTaxRatePicker} — VAT/tax rate selector with country-specific defaults.
|
|
2540
|
-
* Supports Polish rates out-of-the-box, custom rates per country, and displays
|
|
2541
|
-
* percentage values.
|
|
2542
|
-
*/
|
|
2543
|
-
export declare const NiceTaxRatePicker: default_2.ForwardRefExoticComponent<NiceTaxRatePickerProps & default_2.RefAttributes<HTMLDivElement>>;
|
|
2544
|
-
|
|
2545
|
-
/** Props for the {@link NiceTaxRatePicker} component. */
|
|
2546
|
-
export declare interface NiceTaxRatePickerProps extends NiceFormFieldProps {
|
|
2547
|
-
/** Selected tax rate id. */
|
|
2548
|
-
value?: string;
|
|
2549
|
-
/** Fires when selection changes. */
|
|
2550
|
-
onChange?: (rateId: string, rate: TaxRate) => void;
|
|
2551
|
-
/** Available tax rates. If empty, defaults to Polish VAT rates. */
|
|
2552
|
-
rates?: TaxRate[];
|
|
2553
|
-
/** Country code filter. */
|
|
2554
|
-
countryCode?: string;
|
|
2555
|
-
/** Placeholder text. */
|
|
2556
|
-
placeholder?: string;
|
|
2557
|
-
/** Whether to show rate percentage in the label. */
|
|
2558
|
-
showPercentage?: boolean;
|
|
2559
|
-
}
|
|
2560
|
-
|
|
2561
2393
|
export declare const NiceTextArea: default_2.ForwardRefExoticComponent<NiceTextAreaProps & default_2.RefAttributes<HTMLTextAreaElement>>;
|
|
2562
2394
|
|
|
2563
2395
|
export declare interface NiceTextAreaProps extends NiceFormFieldProps {
|
|
@@ -2610,49 +2442,6 @@ export declare interface NiceTextInputProps extends Omit<NiceFormFieldProps, 'la
|
|
|
2610
2442
|
variant?: 'outlined' | 'filled' | 'underlined' | string;
|
|
2611
2443
|
}
|
|
2612
2444
|
|
|
2613
|
-
export declare const NiceTimePicker: default_2.ForwardRefExoticComponent<NiceTimePickerProps & default_2.RefAttributes<HTMLDivElement>>;
|
|
2614
|
-
|
|
2615
|
-
/** Props for the {@link NiceTimePicker} component — a time-only picker with hour/minute/second spinners. */
|
|
2616
|
-
export declare interface NiceTimePickerProps extends NiceFormFieldProps {
|
|
2617
|
-
/** Time string in HH:mm or HH:mm:ss format */
|
|
2618
|
-
value?: string;
|
|
2619
|
-
onChange?: (value: string) => void;
|
|
2620
|
-
onBlur?: (e: default_2.FocusEvent) => void;
|
|
2621
|
-
/** Display format — 12h shows AM/PM toggle, 24h shows 0–23 */
|
|
2622
|
-
hourFormat?: '12' | '24';
|
|
2623
|
-
/** Minute increment step */
|
|
2624
|
-
minuteStep?: number;
|
|
2625
|
-
/** Show seconds input */
|
|
2626
|
-
showSeconds?: boolean;
|
|
2627
|
-
/** Minimum time (HH:mm) */
|
|
2628
|
-
min?: string;
|
|
2629
|
-
/** Maximum time (HH:mm) */
|
|
2630
|
-
max?: string;
|
|
2631
|
-
/** Show clear button */
|
|
2632
|
-
clearable?: boolean;
|
|
2633
|
-
/**
|
|
2634
|
-
* Optional explicit target date to combine with the picked time
|
|
2635
|
-
* (`Date` or `YYYY-MM-DD` string). When omitted while {@link countdown}
|
|
2636
|
-
* is enabled, the target auto-resolves to the **next occurrence**:
|
|
2637
|
-
* today if the picked time hasn't passed yet, tomorrow if it has.
|
|
2638
|
-
*/
|
|
2639
|
-
targetDate?: string | Date;
|
|
2640
|
-
/** Fires whenever the resolved target Date changes. */
|
|
2641
|
-
onTargetChange?: (target: Date) => void;
|
|
2642
|
-
/** Show a live countdown label beside the picker. */
|
|
2643
|
-
countdown?: boolean;
|
|
2644
|
-
/** Built-in countdown format preset (default `'verbose'`). */
|
|
2645
|
-
countdownFormat?: NiceCountdownFormat;
|
|
2646
|
-
/** Custom formatter (overrides {@link countdownFormat}). */
|
|
2647
|
-
formatCountdown?: (msRemaining: number, target: Date) => string;
|
|
2648
|
-
/** Label rendered before the countdown text (e.g. `'starts in'`). */
|
|
2649
|
-
countdownLabel?: default_2.ReactNode;
|
|
2650
|
-
/** Update interval in ms (default `1000`). */
|
|
2651
|
-
countdownInterval?: number;
|
|
2652
|
-
/** Text shown when the target time has elapsed (default `'now'`). */
|
|
2653
|
-
countdownDoneText?: string;
|
|
2654
|
-
}
|
|
2655
|
-
|
|
2656
2445
|
export declare const NiceToggle: default_2.ForwardRefExoticComponent<NiceToggleProps & default_2.RefAttributes<HTMLInputElement>>;
|
|
2657
2446
|
|
|
2658
2447
|
/** Props for the {@link NiceToggle} component — a boolean switch/toggle. */
|
|
@@ -2722,40 +2511,82 @@ export declare interface NiceTreeSelectProps extends NiceFormFieldProps {
|
|
|
2722
2511
|
* leaves (children not rendered, no expand toggle). Default: unlimited.
|
|
2723
2512
|
*/
|
|
2724
2513
|
maxDepth?: number;
|
|
2514
|
+
/** Gap (px) between the input and the dropdown menu. Default 0 (menu abuts the input). */
|
|
2515
|
+
menuGap?: number;
|
|
2725
2516
|
}
|
|
2726
2517
|
|
|
2727
|
-
|
|
2728
|
-
* {@link NiceVatInput} — VAT/NIP number input with country selector,
|
|
2729
|
-
* prefix auto-prepend, pattern validation, and optional VIES verification.
|
|
2730
|
-
*/
|
|
2731
|
-
export declare const NiceVatInput: default_2.ForwardRefExoticComponent<NiceVatInputProps & default_2.RefAttributes<HTMLDivElement>>;
|
|
2518
|
+
export declare const NiceUpload: default_2.ForwardRefExoticComponent<NiceUploadProps & default_2.RefAttributes<HTMLDivElement>>;
|
|
2732
2519
|
|
|
2733
|
-
/**
|
|
2734
|
-
export declare interface
|
|
2735
|
-
|
|
2736
|
-
|
|
2737
|
-
|
|
2738
|
-
|
|
2739
|
-
|
|
2740
|
-
|
|
2741
|
-
|
|
2742
|
-
|
|
2743
|
-
|
|
2744
|
-
|
|
2745
|
-
|
|
2746
|
-
|
|
2747
|
-
|
|
2748
|
-
|
|
2749
|
-
|
|
2750
|
-
|
|
2751
|
-
|
|
2752
|
-
|
|
2753
|
-
|
|
2754
|
-
|
|
2755
|
-
/** Fires
|
|
2756
|
-
|
|
2757
|
-
|
|
2758
|
-
|
|
2520
|
+
/** Imperative handle, exposed via the optional `apiRef` prop (not the div `ref`). */
|
|
2521
|
+
export declare interface NiceUploadHandle {
|
|
2522
|
+
addFiles: (files: File[]) => void;
|
|
2523
|
+
uploadAll: () => void;
|
|
2524
|
+
cancelAll: () => void;
|
|
2525
|
+
clearAll: () => void;
|
|
2526
|
+
getFiles: () => FileInfo[];
|
|
2527
|
+
getFile: (id: string) => FileInfo | undefined;
|
|
2528
|
+
retryFailed: () => void;
|
|
2529
|
+
openFileBrowser: () => void;
|
|
2530
|
+
}
|
|
2531
|
+
|
|
2532
|
+
/** Props for {@link NiceUpload} — drag-and-drop / button file upload with an
|
|
2533
|
+
* optional upload engine (progress, retry/cancel, chunked upload, validation,
|
|
2534
|
+
* previews) absorbed from the former NiceFileUpload. The legacy `NiceFileUploader`
|
|
2535
|
+
* export was retired in favour of this component. */
|
|
2536
|
+
export declare interface NiceUploadProps extends NiceBaseProps {
|
|
2537
|
+
accept?: string;
|
|
2538
|
+
multiple?: boolean;
|
|
2539
|
+
maxFileSize?: number;
|
|
2540
|
+
maxFiles?: number;
|
|
2541
|
+
minFileSize?: number;
|
|
2542
|
+
/** Fires with the current File[] on every add/remove (instant) / Upload click. */
|
|
2543
|
+
onFilesSelected: (files: File[]) => void;
|
|
2544
|
+
uploadMode?: 'instant' | 'useButtons';
|
|
2545
|
+
labelText?: string;
|
|
2546
|
+
/** Idle dropzone label; pass `""` for an icon-only dropzone. */
|
|
2547
|
+
text?: string;
|
|
2548
|
+
dropzoneText?: string;
|
|
2549
|
+
browseText?: string;
|
|
2550
|
+
dragActiveText?: string;
|
|
2551
|
+
/** Icon/label layout in the dropzone: `'right'` (label beside the icon, default) or `'bottom'` (label under it). */
|
|
2552
|
+
labelPlacement?: 'right' | 'bottom';
|
|
2553
|
+
icon?: string | null;
|
|
2554
|
+
showFileList?: boolean;
|
|
2555
|
+
imagePreview?: boolean;
|
|
2556
|
+
showPreview?: boolean;
|
|
2557
|
+
listMode?: 'list' | 'grid' | 'compact';
|
|
2558
|
+
previewSize?: NiceSize;
|
|
2559
|
+
/** External progress override keyed by `file.name` (0–100). */
|
|
2560
|
+
fileProgress?: Record<string, number>;
|
|
2561
|
+
renderPreview?: (file: FileInfo) => default_2.ReactNode;
|
|
2562
|
+
renderFileItem?: (file: FileInfo, actions: FileItemActions) => default_2.ReactNode;
|
|
2563
|
+
variant?: 'dropzone' | 'button';
|
|
2564
|
+
/** Custom content for `variant="button"`. */
|
|
2565
|
+
trigger?: default_2.ReactNode;
|
|
2566
|
+
/** Custom clickable/droppable surface content (replaces the default icon+label). */
|
|
2567
|
+
dropChildren?: default_2.ReactNode;
|
|
2568
|
+
autoUpload?: boolean;
|
|
2569
|
+
uploadHandler?: UploadHandler;
|
|
2570
|
+
uploadUrl?: string;
|
|
2571
|
+
uploadHeaders?: Record<string, string>;
|
|
2572
|
+
concurrentUploads?: number;
|
|
2573
|
+
maxRetries?: number;
|
|
2574
|
+
chunkSize?: number;
|
|
2575
|
+
chunkThreshold?: number;
|
|
2576
|
+
validateFile?: (file: File) => string | null;
|
|
2577
|
+
keepFilesAfterUpload?: boolean;
|
|
2578
|
+
initialFiles?: FileInfo[];
|
|
2579
|
+
disabled?: boolean;
|
|
2580
|
+
readOnly?: boolean;
|
|
2581
|
+
onFilesAdded?: (files: FileInfo[]) => void;
|
|
2582
|
+
onUploadComplete?: (file: FileInfo) => void;
|
|
2583
|
+
onUploadError?: (file: FileInfo, error: string) => void;
|
|
2584
|
+
onProgress?: (file: FileInfo, progress: number) => void;
|
|
2585
|
+
onFileRemoved?: (file: FileInfo) => void;
|
|
2586
|
+
onChange?: (files: FileInfo[]) => void;
|
|
2587
|
+
apiRef?: default_2.Ref<NiceUploadHandle>;
|
|
2588
|
+
/** Enable paste from clipboard (Ctrl+V). */
|
|
2589
|
+
pasteFromClipboard?: boolean;
|
|
2759
2590
|
}
|
|
2760
2591
|
|
|
2761
2592
|
/**
|
|
@@ -2823,23 +2654,6 @@ declare interface PDFAnnotation {
|
|
|
2823
2654
|
}>;
|
|
2824
2655
|
}
|
|
2825
2656
|
|
|
2826
|
-
/** Country phone prefix entry. */
|
|
2827
|
-
declare interface PhoneCountryCode {
|
|
2828
|
-
code: string;
|
|
2829
|
-
dialCode: string;
|
|
2830
|
-
name: string;
|
|
2831
|
-
mask?: string;
|
|
2832
|
-
}
|
|
2833
|
-
|
|
2834
|
-
/** Parsed phone value. */
|
|
2835
|
-
declare interface PhoneValue {
|
|
2836
|
-
countryCode?: string;
|
|
2837
|
-
dialCode?: string;
|
|
2838
|
-
number?: string;
|
|
2839
|
-
/** Full E.164 formatted number (e.g. "+48123456789"). */
|
|
2840
|
-
e164?: string;
|
|
2841
|
-
}
|
|
2842
|
-
|
|
2843
2657
|
declare interface RectangleAnnotation extends AnnotationBase {
|
|
2844
2658
|
tool: 'rectangle';
|
|
2845
2659
|
}
|
|
@@ -2857,22 +2671,6 @@ declare interface ScanResult {
|
|
|
2857
2671
|
scannedAt: Date;
|
|
2858
2672
|
}
|
|
2859
2673
|
|
|
2860
|
-
/** A tax rate entry. */
|
|
2861
|
-
declare interface TaxRate {
|
|
2862
|
-
/** Rate identifier. */
|
|
2863
|
-
id: string;
|
|
2864
|
-
/** Display label (e.g. "23%", "8%", "zw."). */
|
|
2865
|
-
label: string;
|
|
2866
|
-
/** Numeric rate as decimal (0.23 = 23%). */
|
|
2867
|
-
rate: number;
|
|
2868
|
-
/** Country code this rate applies to. */
|
|
2869
|
-
countryCode?: string;
|
|
2870
|
-
/** Category (e.g. "standard", "reduced", "zero", "exempt"). */
|
|
2871
|
-
category?: string;
|
|
2872
|
-
/** Whether this is the default rate. */
|
|
2873
|
-
isDefault?: boolean;
|
|
2874
|
-
}
|
|
2875
|
-
|
|
2876
2674
|
declare interface TextAnnotation extends AnnotationBase {
|
|
2877
2675
|
tool: 'text';
|
|
2878
2676
|
text: string;
|
|
@@ -2896,9 +2694,9 @@ declare interface TracelessStorageProps {
|
|
|
2896
2694
|
storageKey?: string;
|
|
2897
2695
|
}
|
|
2898
2696
|
|
|
2899
|
-
declare type UploadHandler = (request: UploadRequest) => Promise<UploadResponse>;
|
|
2697
|
+
export declare type UploadHandler = (request: UploadRequest) => Promise<UploadResponse>;
|
|
2900
2698
|
|
|
2901
|
-
declare interface UploadRequest {
|
|
2699
|
+
export declare interface UploadRequest {
|
|
2902
2700
|
file: File;
|
|
2903
2701
|
chunk?: Blob;
|
|
2904
2702
|
chunkIndex?: number;
|
|
@@ -2908,29 +2706,15 @@ declare interface UploadRequest {
|
|
|
2908
2706
|
signal?: AbortSignal;
|
|
2909
2707
|
}
|
|
2910
2708
|
|
|
2911
|
-
declare interface UploadResponse {
|
|
2709
|
+
export declare interface UploadResponse {
|
|
2912
2710
|
success: boolean;
|
|
2913
2711
|
url?: string;
|
|
2914
2712
|
error?: string;
|
|
2915
2713
|
fileId?: string;
|
|
2916
|
-
metadata?: Record<string,
|
|
2714
|
+
metadata?: Record<string, unknown>;
|
|
2917
2715
|
}
|
|
2918
2716
|
|
|
2919
|
-
declare type UploadStatus = 'pending' | 'uploading' | 'success' | 'error' | 'cancelled';
|
|
2920
|
-
|
|
2921
|
-
/** Country-specific VAT/NIP validation config. */
|
|
2922
|
-
declare interface VatCountryConfig {
|
|
2923
|
-
/** ISO 3166‑1 alpha-2 code. */
|
|
2924
|
-
code: string;
|
|
2925
|
-
/** Display name. */
|
|
2926
|
-
label: string;
|
|
2927
|
-
/** VAT prefix (e.g. "PL", "DE"). */
|
|
2928
|
-
prefix: string;
|
|
2929
|
-
/** Regex pattern for the numeric part (without prefix). */
|
|
2930
|
-
pattern: RegExp;
|
|
2931
|
-
/** Mask/placeholder hint. */
|
|
2932
|
-
placeholder?: string;
|
|
2933
|
-
}
|
|
2717
|
+
export declare type UploadStatus = 'pending' | 'uploading' | 'success' | 'error' | 'cancelled';
|
|
2934
2718
|
|
|
2935
2719
|
/** A wiki page tree node. */
|
|
2936
2720
|
declare interface WikiPage {
|