@webority/ui-react 0.80.3 → 0.80.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/dist/types/components/AppAutocomplete.d.ts +32 -48
- package/dist/types/components/AppCalendar.d.ts +33 -46
- package/dist/types/components/AppChart.d.ts +69 -55
- package/dist/types/components/AppCheckbox.d.ts +8 -18
- package/dist/types/components/AppCountrySelect.d.ts +9 -12
- package/dist/types/components/AppDatePicker.d.ts +20 -34
- package/dist/types/components/AppDateRangePicker.d.ts +29 -38
- package/dist/types/components/AppEmptyState.d.ts +3 -2
- package/dist/types/components/AppFileViewer.d.ts +23 -55
- package/dist/types/components/AppInput.d.ts +33 -78
- package/dist/types/components/AppMentionInput.d.ts +39 -39
- package/dist/types/components/AppMultiSelect.d.ts +33 -50
- package/dist/types/components/AppNumberInput.d.ts +21 -42
- package/dist/types/components/AppOtpInput.d.ts +16 -46
- package/dist/types/components/AppPhoneNumberInput.d.ts +17 -1
- package/dist/types/components/AppRadio.d.ts +8 -18
- package/dist/types/components/AppRichText.d.ts +19 -41
- package/dist/types/components/AppSelect.d.ts +12 -12
- package/dist/types/components/AppSlider.d.ts +28 -36
- package/dist/types/components/AppSortableList.d.ts +16 -30
- package/dist/types/components/AppSwitch.d.ts +9 -21
- package/dist/types/components/AppTableEmptyState.d.ts +3 -2
- package/dist/types/components/AppTagInput.d.ts +20 -26
- package/dist/types/components/AppTextarea.d.ts +16 -24
- package/dist/types/components/AppTimePicker.d.ts +22 -34
- package/dist/types/components/AppTour.d.ts +40 -55
- package/dist/types/components/AppTreeView.d.ts +31 -42
- package/dist/types/components/AppWizard.d.ts +48 -46
- package/package.json +3 -3
|
@@ -1,50 +1,34 @@
|
|
|
1
1
|
import "@webority/ui-elements/elements/autocomplete";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
* @param {boolean} [props.allowCustom] When the typed text matches no option and the user
|
|
35
|
-
* commits (Enter, or blur with text), offers it as its own selectable "Add "…"" row and,
|
|
36
|
-
* once picked, commits that raw text as the value with `onChange`'s second argument
|
|
37
|
-
* reporting `{ isCustom: true }`.
|
|
38
|
-
* @param {string} [props.name]
|
|
39
|
-
* @param {string} [props.id] DOM id for the control and the label's `for` target.
|
|
40
|
-
* @param {import('react').ReactNode} [props.label]
|
|
41
|
-
* @param {string} [props.error]
|
|
42
|
-
* @param {string} [props.hint]
|
|
43
|
-
* @param {boolean} [props.required]
|
|
44
|
-
* @param {import('react').ReactNode} [props.help] Help content shown in an info tip beside the label.
|
|
45
|
-
* @param {string} [props.helpLabel="More information"] Accessible name for that info tip.
|
|
46
|
-
* @param {string} [props.fieldClassName]
|
|
47
|
-
* @param {import('react').Ref<HTMLElement>} [ref]
|
|
48
|
-
*/
|
|
49
|
-
declare const AppAutocomplete: import("react").ForwardRefExoticComponent<import("react").RefAttributes<any>>;
|
|
2
|
+
declare const AppAutocomplete: import("react").ForwardRefExoticComponent<{
|
|
3
|
+
value?: string;
|
|
4
|
+
onChange?: (value: string, meta?: {
|
|
5
|
+
isCustom: boolean;
|
|
6
|
+
}) => void;
|
|
7
|
+
options?: Array<{
|
|
8
|
+
value: string;
|
|
9
|
+
label: import('react').ReactNode;
|
|
10
|
+
}>;
|
|
11
|
+
valueLabel?: string;
|
|
12
|
+
loadOptions?: (query: string, opts?: {
|
|
13
|
+
signal?: AbortSignal;
|
|
14
|
+
}) => Promise<{
|
|
15
|
+
value: string;
|
|
16
|
+
label: string;
|
|
17
|
+
}[]>;
|
|
18
|
+
placeholder?: string;
|
|
19
|
+
minChars?: number;
|
|
20
|
+
debounce?: number;
|
|
21
|
+
disabled?: boolean;
|
|
22
|
+
size?: 'sm' | 'lg';
|
|
23
|
+
allowCustom?: boolean;
|
|
24
|
+
name?: string;
|
|
25
|
+
id?: string;
|
|
26
|
+
label?: import('react').ReactNode;
|
|
27
|
+
error?: string;
|
|
28
|
+
hint?: string;
|
|
29
|
+
required?: boolean;
|
|
30
|
+
help?: import('react').ReactNode;
|
|
31
|
+
helpLabel?: string;
|
|
32
|
+
fieldClassName?: string;
|
|
33
|
+
} & import("react").RefAttributes<HTMLElement>>;
|
|
50
34
|
export default AppAutocomplete;
|
|
@@ -1,47 +1,34 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
* @param {string} [props.date] The IST day (`YYYY-MM-DD`) to show; today when omitted. Changing it moves the calendar.
|
|
35
|
-
* @param {string} [props.emptyText] What a list with no events says.
|
|
36
|
-
* @param {0|1|2|3|4|5|6} [props.firstDay] First weekday of the calendar, 0 Sunday to 6 Saturday. Unset, it
|
|
37
|
-
* follows the theme's `--wui-first-day` token, which is 1 (Monday) unless the product sets it.
|
|
38
|
-
* @param {string} [props.errorText] What is said when `eventsUrl` could not be loaded, and when the calendar's code could not.
|
|
39
|
-
* @param {(event: object) => (void|false)} [props.onEventClick] An event was clicked, or Enter was pressed on it. Gets the event as it was given. Return `false` to stop an event's own link.
|
|
40
|
-
* @param {(detail: { date: string, time: string|null, allDay: boolean }) => void} [props.onDateClick] A day was clicked, or Enter was pressed on it; `time` is set for a click on a time slot.
|
|
41
|
-
* @param {(detail: { view: string, date: string, start: string, end: string, title: string }) => void} [props.onRangeChange] The view or the visible period changed.
|
|
42
|
-
* @param {string} [props.className] Extra classes on the element.
|
|
43
|
-
* @param {import('react').CSSProperties} [props.style] Inline style on the element.
|
|
44
|
-
* @param {import('react').Ref<HTMLElement>} [ref] The `<wui-calendar>` element, which has `refetch()`.
|
|
45
|
-
*/
|
|
46
|
-
declare const AppCalendar: import("react").ForwardRefExoticComponent<import("react").RefAttributes<any>>;
|
|
1
|
+
declare const AppCalendar: import("react").ForwardRefExoticComponent<{
|
|
2
|
+
label?: string;
|
|
3
|
+
events?: {
|
|
4
|
+
id?: string | number;
|
|
5
|
+
title: string;
|
|
6
|
+
start: string;
|
|
7
|
+
end?: string;
|
|
8
|
+
allDay?: boolean;
|
|
9
|
+
tone?: 'neutral' | 'primary' | 'success' | 'warning' | 'danger' | 'info';
|
|
10
|
+
url?: string;
|
|
11
|
+
}[];
|
|
12
|
+
eventsUrl?: string;
|
|
13
|
+
view?: 'month' | 'week' | 'day' | 'list';
|
|
14
|
+
date?: string;
|
|
15
|
+
emptyText?: string;
|
|
16
|
+
firstDay?: 0 | 1 | 2 | 3 | 4 | 5 | 6;
|
|
17
|
+
errorText?: string;
|
|
18
|
+
onEventClick?: (event: object) => (void | false);
|
|
19
|
+
onDateClick?: (detail: {
|
|
20
|
+
date: string;
|
|
21
|
+
time: string | null;
|
|
22
|
+
allDay: boolean;
|
|
23
|
+
}) => void;
|
|
24
|
+
onRangeChange?: (detail: {
|
|
25
|
+
view: string;
|
|
26
|
+
date: string;
|
|
27
|
+
start: string;
|
|
28
|
+
end: string;
|
|
29
|
+
title: string;
|
|
30
|
+
}) => void;
|
|
31
|
+
className?: string;
|
|
32
|
+
style?: import('react').CSSProperties;
|
|
33
|
+
} & import("react").RefAttributes<HTMLElement>>;
|
|
47
34
|
export default AppCalendar;
|
|
@@ -1,56 +1,70 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
1
|
+
declare const AppChart: import("react").ForwardRefExoticComponent<{
|
|
2
|
+
type: 'line' | 'area' | 'column' | 'bar' | 'donut' | 'heatmap' | 'calendar' | 'funnel' | 'gauge' | 'waterfall' | 'treemap' | 'sankey' | 'scatter' | 'bubble' | 'multiples';
|
|
3
|
+
title: string;
|
|
4
|
+
description?: string;
|
|
5
|
+
data: Record<string, string | number | null>[];
|
|
6
|
+
x: {
|
|
7
|
+
key: string;
|
|
8
|
+
kind?: 'category' | 'time' | 'value';
|
|
9
|
+
format?: object;
|
|
10
|
+
label?: string;
|
|
11
|
+
};
|
|
12
|
+
series: {
|
|
13
|
+
key: string;
|
|
14
|
+
label: string;
|
|
15
|
+
format?: object;
|
|
16
|
+
}[];
|
|
17
|
+
group?: {
|
|
18
|
+
key: string;
|
|
19
|
+
label?: string;
|
|
20
|
+
};
|
|
21
|
+
to?: {
|
|
22
|
+
key: string;
|
|
23
|
+
label?: string;
|
|
24
|
+
};
|
|
25
|
+
size?: {
|
|
26
|
+
key: string;
|
|
27
|
+
label?: string;
|
|
28
|
+
format?: object;
|
|
29
|
+
};
|
|
30
|
+
trend?: boolean;
|
|
31
|
+
zoom?: boolean;
|
|
32
|
+
bands?: {
|
|
33
|
+
upTo: number;
|
|
34
|
+
label: string;
|
|
35
|
+
}[];
|
|
36
|
+
stack?: 'none' | 'stacked' | 'percent';
|
|
37
|
+
y?: {
|
|
38
|
+
label?: string;
|
|
39
|
+
format?: object;
|
|
40
|
+
min?: number;
|
|
41
|
+
max?: number;
|
|
42
|
+
};
|
|
43
|
+
target?: {
|
|
44
|
+
value: number;
|
|
45
|
+
label: string;
|
|
46
|
+
};
|
|
47
|
+
height?: number;
|
|
48
|
+
state?: 'ready' | 'loading' | 'empty' | 'error';
|
|
49
|
+
emptyText?: string;
|
|
50
|
+
errorText?: string;
|
|
51
|
+
renderer?: 'auto' | 'svg' | 'canvas';
|
|
52
|
+
view?: 'chart' | 'table';
|
|
53
|
+
onSelect?: (detail: {
|
|
54
|
+
series: string;
|
|
55
|
+
label: string;
|
|
56
|
+
x: unknown;
|
|
57
|
+
value: number | null;
|
|
58
|
+
row: object;
|
|
59
|
+
index: number;
|
|
60
|
+
}) => void;
|
|
61
|
+
onLegendChange?: (detail: {
|
|
62
|
+
visible: Record<string, boolean>;
|
|
63
|
+
}) => void;
|
|
64
|
+
onReady?: (detail: {
|
|
65
|
+
renderer: string;
|
|
66
|
+
}) => void;
|
|
67
|
+
className?: string;
|
|
68
|
+
style?: import('react').CSSProperties;
|
|
69
|
+
} & import("react").RefAttributes<HTMLElement>>;
|
|
56
70
|
export default AppChart;
|
|
@@ -1,19 +1,9 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
* @param {object} props
|
|
10
|
-
* @param {import('react').ReactNode} [props.label]
|
|
11
|
-
* @param {string} [props.id]
|
|
12
|
-
* @param {string} [props.name]
|
|
13
|
-
* @param {string} [props.error] Error message, rendered below the control. Replaces the hint.
|
|
14
|
-
* @param {string} [props.hint] Helper text below the control. Hidden while an error is shown.
|
|
15
|
-
* @param {string} [props.className]
|
|
16
|
-
* @param {import('react').Ref<HTMLInputElement>} [ref]
|
|
17
|
-
*/
|
|
18
|
-
declare const AppCheckbox: import("react").ForwardRefExoticComponent<import("react").RefAttributes<any>>;
|
|
1
|
+
declare const AppCheckbox: import("react").ForwardRefExoticComponent<{
|
|
2
|
+
label?: import('react').ReactNode;
|
|
3
|
+
id?: string;
|
|
4
|
+
name?: string;
|
|
5
|
+
error?: string;
|
|
6
|
+
hint?: string;
|
|
7
|
+
className?: string;
|
|
8
|
+
} & import("react").RefAttributes<HTMLInputElement>>;
|
|
19
9
|
export default AppCheckbox;
|
|
@@ -1,14 +1,11 @@
|
|
|
1
1
|
import "@webority/ui-elements/elements/country-select";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
* @param {string} [props.fieldClassName] Class to apply to the wrapper field div.
|
|
12
|
-
*/
|
|
13
|
-
declare const AppCountrySelect: import("react").ForwardRefExoticComponent<import("react").RefAttributes<any>>;
|
|
2
|
+
declare const AppCountrySelect: import("react").ForwardRefExoticComponent<{
|
|
3
|
+
value?: string;
|
|
4
|
+
onChange?: (value: string) => void;
|
|
5
|
+
countries?: string[];
|
|
6
|
+
searchable?: boolean;
|
|
7
|
+
size?: 'sm' | 'md' | 'lg';
|
|
8
|
+
className?: string;
|
|
9
|
+
fieldClassName?: string;
|
|
10
|
+
} & import("react").RefAttributes<any>>;
|
|
14
11
|
export default AppCountrySelect;
|
|
@@ -1,36 +1,22 @@
|
|
|
1
1
|
import "@webority/ui-elements/elements/datepicker";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
* @param {string} [props.placeholder="Choose a date"]
|
|
23
|
-
* @param {boolean} [props.disabled]
|
|
24
|
-
* @param {'sm'|'md'|'lg'} [props.size] Control height tier, matching AppInput.
|
|
25
|
-
* @param {0|1|2|3|4|5|6} [props.firstDay] First weekday of the calendar, 0 Sunday to 6 Saturday. Unset, it
|
|
26
|
-
* follows the theme's `--wui-first-day` token, which is 1 (Monday) unless the product sets it.
|
|
27
|
-
* @param {string} [props.displayFormat="dd-MMM-yyyy"] How the chosen date reads in the field, from the tokens
|
|
28
|
-
* yyyy, MMMM, MMM, MM, dd and d (for example `dd/MM/yyyy`). The `onChange` value stays ISO.
|
|
29
|
-
* @param {string} [props.id]
|
|
30
|
-
* @param {string} [props.ariaLabel]
|
|
31
|
-
* @param {string} [props.className] Classes for the `<wui-datepicker>` control itself.
|
|
32
|
-
* @param {string} [props.fieldClassName] Classes for the `.field` wrapper (label/hint/error shell).
|
|
33
|
-
* @param {import('react').Ref<HTMLElement>} [ref]
|
|
34
|
-
*/
|
|
35
|
-
declare const AppDatePicker: import("react").ForwardRefExoticComponent<import("react").RefAttributes<any>>;
|
|
2
|
+
declare const AppDatePicker: import("react").ForwardRefExoticComponent<{
|
|
3
|
+
value?: string;
|
|
4
|
+
onChange?: (value: string) => void;
|
|
5
|
+
label?: string;
|
|
6
|
+
required?: boolean;
|
|
7
|
+
hint?: string;
|
|
8
|
+
error?: string;
|
|
9
|
+
name?: string;
|
|
10
|
+
min?: string;
|
|
11
|
+
max?: string;
|
|
12
|
+
placeholder?: string;
|
|
13
|
+
disabled?: boolean;
|
|
14
|
+
size?: 'sm' | 'md' | 'lg';
|
|
15
|
+
firstDay?: 0 | 1 | 2 | 3 | 4 | 5 | 6;
|
|
16
|
+
displayFormat?: string;
|
|
17
|
+
id?: string;
|
|
18
|
+
ariaLabel?: string;
|
|
19
|
+
className?: string;
|
|
20
|
+
fieldClassName?: string;
|
|
21
|
+
} & import("react").RefAttributes<HTMLElement>>;
|
|
36
22
|
export default AppDatePicker;
|
|
@@ -1,40 +1,31 @@
|
|
|
1
1
|
import "@webority/ui-elements/elements/date-range";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
* 1 April to 31 March; `thisMonth` and `lastMonth` span the whole month), or `{ label, start, end }`
|
|
32
|
-
* with ISO dates. A preset outside `min`/`max` is disabled.
|
|
33
|
-
* @param {string} [props.id]
|
|
34
|
-
* @param {string} [props.ariaLabel]
|
|
35
|
-
* @param {string} [props.className] Class to apply to the control element.
|
|
36
|
-
* @param {string} [props.fieldClassName] Class to apply to the wrapper field div.
|
|
37
|
-
* @param {import('react').Ref<HTMLElement>} [ref]
|
|
38
|
-
*/
|
|
39
|
-
declare const AppDateRangePicker: import("react").ForwardRefExoticComponent<import("react").RefAttributes<any>>;
|
|
2
|
+
declare const AppDateRangePicker: import("react").ForwardRefExoticComponent<{
|
|
3
|
+
start?: string;
|
|
4
|
+
end?: string;
|
|
5
|
+
onChange?: (range: {
|
|
6
|
+
start: string;
|
|
7
|
+
end: string;
|
|
8
|
+
}) => void;
|
|
9
|
+
label?: string;
|
|
10
|
+
required?: boolean;
|
|
11
|
+
hint?: string;
|
|
12
|
+
error?: string;
|
|
13
|
+
startName?: string;
|
|
14
|
+
endName?: string;
|
|
15
|
+
min?: string;
|
|
16
|
+
max?: string;
|
|
17
|
+
placeholder?: string;
|
|
18
|
+
disabled?: boolean;
|
|
19
|
+
size?: 'sm' | 'md' | 'lg';
|
|
20
|
+
firstDay?: 0 | 1 | 2 | 3 | 4 | 5 | 6;
|
|
21
|
+
presets?: (('today' | 'yesterday' | 'last7Days' | 'last30Days' | 'thisMonth' | 'lastMonth' | 'thisFinancialYear') | {
|
|
22
|
+
label: string;
|
|
23
|
+
start: string;
|
|
24
|
+
end: string;
|
|
25
|
+
})[];
|
|
26
|
+
id?: string;
|
|
27
|
+
ariaLabel?: string;
|
|
28
|
+
className?: string;
|
|
29
|
+
fieldClassName?: string;
|
|
30
|
+
} & import("react").RefAttributes<HTMLElement>>;
|
|
40
31
|
export default AppDateRangePicker;
|
|
@@ -10,7 +10,8 @@
|
|
|
10
10
|
* the tighter widget/tile variant (smaller title + text).
|
|
11
11
|
*
|
|
12
12
|
* @param {object} props
|
|
13
|
-
* @param {string|import('react').ReactNode} props.icon Semantic icon name for the bubble, or a custom node
|
|
13
|
+
* @param {string|import('react').ReactNode} [props.icon] Semantic icon name for the bubble, or a custom node.
|
|
14
|
+
* Needed unless `illustration` is set, which replaces the bubble.
|
|
14
15
|
* @param {string|import('react').ReactNode} [props.illustration] A named drawing ("no-results" | "no-data" | "empty-inbox" | "no-notifications" | "no-files" | "no-access" | "offline" | "error"), or your own decorative SVG node drawn unboxed at up to 120 px. Replaces the icon bubble when set.
|
|
15
16
|
* @param {number} [props.iconSize=24]
|
|
16
17
|
* @param {"md"|"sm"} [props.size="md"]
|
|
@@ -21,7 +22,7 @@
|
|
|
21
22
|
* @param {import('react').CSSProperties} [props.style]
|
|
22
23
|
*/
|
|
23
24
|
export default function AppEmptyState({ icon, illustration, iconSize, size, title, text, action, className, style, ...rest }: {
|
|
24
|
-
icon
|
|
25
|
+
icon?: string | import('react').ReactNode;
|
|
25
26
|
illustration?: string | import('react').ReactNode;
|
|
26
27
|
iconSize?: number;
|
|
27
28
|
size?: "md" | "sm";
|
|
@@ -1,56 +1,24 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
* />
|
|
25
|
-
* ```
|
|
26
|
-
*
|
|
27
|
-
* @param {object} props
|
|
28
|
-
* @param {string} props.src The file's URL. Changing it opens the new file.
|
|
29
|
-
* @param {string} [props.name] The name shown in the toolbar and used for printing and download. Defaults to the last part of `src`.
|
|
30
|
-
* @param {string} [props.type] The file's MIME type. Defaults to a guess from the extension of `name` or `src`.
|
|
31
|
-
* @param {object} [props.prefs] The view settings to start from, when your app stores them itself (for example
|
|
32
|
-
* against the signed-in person). Read when a file opens. With it, the browser stores nothing; save what
|
|
33
|
-
* `onPrefsChange` hands you and pass it back next time.
|
|
34
|
-
* @param {(prefs: object) => void} [props.onPrefsChange] Called with all the view settings whenever the reader
|
|
35
|
-
* changes one (zoom, two-page view, thumbnails, volume, speed).
|
|
36
|
-
* @param {string} [props.viewKey] Remembers the view settings (zoom, two-page view, thumbnails)
|
|
37
|
-
* in this browser under this key. Without it they last for the viewer's life.
|
|
38
|
-
* @param {boolean} [props.download=false] Shows a download button in the toolbar.
|
|
39
|
-
* @param {boolean} [props.print=true] Shows the print button for a PDF or an image. Pass false to hide it.
|
|
40
|
-
* @param {string} [props.workerSrc] URL of a hosted pdf.js worker, for a site whose content
|
|
41
|
-
* security policy refuses blob: workers. Defaults to the bundled copy.
|
|
42
|
-
* @param {string} [props.captions] A WebVTT captions file for a video; adds a captions button to the player.
|
|
43
|
-
* @param {string} [props.assetBase] Folder holding pdf.js's cmaps/, standard_fonts/ and wasm/,
|
|
44
|
-
* which unusual PDFs need (Asian text, fonts a file does not embed, some scanned images).
|
|
45
|
-
* @param {import('react').ReactNode} [props.actions] Your own controls, shown at the end of the toolbar. Hidden in full screen.
|
|
46
|
-
* @param {(detail: { kind: string, pages: number }) => void} [props.onLoad] Called once the file shows, with its kind and page count.
|
|
47
|
-
* @param {(detail: { message: string }) => void} [props.onError] Called when the file cannot be opened.
|
|
48
|
-
* @param {string} [props.className] Extra classes on the element.
|
|
49
|
-
* @param {import('react').CSSProperties} [props.style] Inline style; lands on the element with `className`. Set a height here to size the viewer.
|
|
50
|
-
* @param {import('react').Ref<HTMLElement>} [ref] The `<wui-file-viewer>` element. For a video or audio file,
|
|
51
|
-
* `ref.current.seekTo(seconds)` moves the player to that point, kept within the file's length, and returns
|
|
52
|
-
* true; with no video or audio open (another kind of file, or before `onLoad`) it does nothing and returns
|
|
53
|
-
* false. Anything but a finite number of seconds throws.
|
|
54
|
-
*/
|
|
55
|
-
declare const AppFileViewer: import("react").ForwardRefExoticComponent<import("react").RefAttributes<any>>;
|
|
1
|
+
declare const AppFileViewer: import("react").ForwardRefExoticComponent<{
|
|
2
|
+
src: string;
|
|
3
|
+
name?: string;
|
|
4
|
+
type?: string;
|
|
5
|
+
prefs?: object;
|
|
6
|
+
onPrefsChange?: (prefs: object) => void;
|
|
7
|
+
viewKey?: string;
|
|
8
|
+
download?: boolean;
|
|
9
|
+
print?: boolean;
|
|
10
|
+
workerSrc?: string;
|
|
11
|
+
captions?: string;
|
|
12
|
+
assetBase?: string;
|
|
13
|
+
actions?: import('react').ReactNode;
|
|
14
|
+
onLoad?: (detail: {
|
|
15
|
+
kind: string;
|
|
16
|
+
pages: number;
|
|
17
|
+
}) => void;
|
|
18
|
+
onError?: (detail: {
|
|
19
|
+
message: string;
|
|
20
|
+
}) => void;
|
|
21
|
+
className?: string;
|
|
22
|
+
style?: import('react').CSSProperties;
|
|
23
|
+
} & import("react").RefAttributes<HTMLElement>>;
|
|
56
24
|
export default AppFileViewer;
|