loon-bulma-react 2026.0.39 → 2026.0.41
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/components/DragDrop/DragDropList.d.ts +6 -4
- package/dist/forms/Select/Select.d.ts +1 -1
- package/dist/hooks/useClipboard.d.ts +3 -3
- package/dist/index.js +1257 -1249
- package/dist/internal_functions/createIconsInternal.d.ts +2 -1
- package/dist/lib/classes/Console.d.ts +29 -0
- package/dist/lib/classes/FetchWrapper.d.ts +124 -0
- package/dist/lib/components/AspectRatio/AspectRatio.d.ts +28 -0
- package/dist/lib/components/Block/Block.d.ts +9 -0
- package/dist/lib/components/Box/BorderBox.d.ts +29 -0
- package/dist/lib/components/Box/Box.d.ts +20 -0
- package/dist/lib/components/Button/Button.d.ts +87 -0
- package/dist/lib/components/ButtonGroup/ButtonGroup.d.ts +26 -0
- package/dist/lib/components/Calendar/CalendarItems/CalendarColoredItem.d.ts +18 -0
- package/dist/lib/components/Calendar/CalendarItems/CalendarItem.d.ts +18 -0
- package/dist/lib/components/Calendar/DayContainer.d.ts +25 -0
- package/dist/lib/components/Calendar/EventDescriptions.d.ts +33 -0
- package/dist/lib/components/Calendar/Fourweeks/FourweeksView.d.ts +23 -0
- package/dist/lib/components/Calendar/Mini/MiniView.d.ts +24 -0
- package/dist/lib/components/Calendar/Month/MonthView.d.ts +23 -0
- package/dist/lib/components/Calendar/Planning/PlanningView.d.ts +41 -0
- package/dist/lib/components/Calendar/Props.d.ts +58 -0
- package/dist/lib/components/Calendar/Week/AlldayContainer.d.ts +19 -0
- package/dist/lib/components/Calendar/Week/HourRow.d.ts +30 -0
- package/dist/lib/components/Calendar/Week/WeekView.d.ts +24 -0
- package/dist/lib/components/Calendar/calendar.functions.d.ts +10 -0
- package/dist/lib/components/Calendar/index.d.ts +15 -0
- package/dist/lib/components/CodeBlock/CodeBlock.d.ts +49 -0
- package/dist/lib/components/Columns/Column.d.ts +207 -0
- package/dist/lib/components/Columns/Columns.d.ts +35 -0
- package/dist/lib/components/Container/Container.d.ts +45 -0
- package/dist/lib/components/Content/Content.d.ts +22 -0
- package/dist/lib/components/DataTable/DataTable.d.ts +227 -0
- package/dist/lib/components/DataTable/DataTableDropdown.d.ts +39 -0
- package/dist/lib/components/Divider/Divider.d.ts +23 -0
- package/dist/lib/components/DragDrop/DragDropList.d.ts +97 -0
- package/dist/lib/components/Dropdown/Dropdown.d.ts +42 -0
- package/dist/lib/components/Footer/Footer.d.ts +22 -0
- package/dist/lib/components/Help/Help.d.ts +19 -0
- package/dist/lib/components/Hero/Hero.d.ts +104 -0
- package/dist/lib/components/Icon/Icon.d.ts +84 -0
- package/dist/lib/components/Image/Image.d.ts +28 -0
- package/dist/lib/components/Indicator/Indicator.d.ts +25 -0
- package/dist/lib/components/Kbd/Kbd.d.ts +30 -0
- package/dist/lib/components/Label/Label.d.ts +11 -0
- package/dist/lib/components/Link/Link.d.ts +44 -0
- package/dist/lib/components/Menu/Menu.d.ts +64 -0
- package/dist/lib/components/Message/Message.d.ts +49 -0
- package/dist/lib/components/Modal/Modal.d.ts +89 -0
- package/dist/lib/components/Notification/Notification.d.ts +38 -0
- package/dist/lib/components/Pagination/Pagination.d.ts +58 -0
- package/dist/lib/components/Panel/Panel.d.ts +99 -0
- package/dist/lib/components/ProgressBar/ProgressBar.d.ts +28 -0
- package/dist/lib/components/QuickView/QuickView.d.ts +61 -0
- package/dist/lib/components/ScrollArea/ScrollArea.d.ts +76 -0
- package/dist/lib/components/Section/Section.d.ts +21 -0
- package/dist/lib/components/SimpleTable/SimpleTable.d.ts +130 -0
- package/dist/lib/components/Steps/Steps.d.ts +61 -0
- package/dist/lib/components/TabBar/TabBar.d.ts +47 -0
- package/dist/lib/components/Tag/Tag.d.ts +54 -0
- package/dist/lib/components/TimeLine/TimeLine.d.ts +62 -0
- package/dist/lib/components/Titles/Titles.d.ts +71 -0
- package/dist/lib/components/ToggleBar/ToggleBar.d.ts +80 -0
- package/dist/lib/components/Tooltip/Tooltip.d.ts +50 -0
- package/dist/lib/components/TreeView/TreeView.d.ts +185 -0
- package/dist/lib/contexts/ActionSheet/ActionSheetContextProvider.d.ts +76 -0
- package/dist/lib/contexts/AppProvider/AppProviders.d.ts +17 -0
- package/dist/lib/contexts/ColorSchemeProvider/ColorSchemeProvider.d.ts +15 -0
- package/dist/lib/contexts/Confirm/ConfirmContextProvider.d.ts +60 -0
- package/dist/lib/contexts/DefaultsProvider/DefaultsProvider.d.ts +100 -0
- package/dist/lib/contexts/DialogsProvider/DialogsProvider.d.ts +4 -0
- package/dist/lib/contexts/KeysProvider/KeysProvider.d.ts +52 -0
- package/dist/lib/contexts/ModalProvider/ModalProvider.d.ts +11 -0
- package/dist/lib/contexts/ModeProvider/ModeProvider.d.ts +16 -0
- package/dist/lib/contexts/Notifier/Notifier.d.ts +81 -0
- package/dist/lib/contexts/Prompt/PromptContextProvider.d.ts +71 -0
- package/dist/lib/forms/Checkbox/Checkbox.d.ts +48 -0
- package/dist/lib/forms/ComboBox/ComboBox.d.ts +44 -0
- package/dist/lib/forms/ComboBox/MultiComboBox.d.ts +44 -0
- package/dist/lib/forms/ComboBox/useComboBoxScroll.d.ts +4 -0
- package/dist/lib/forms/Currency/CurrencyInput.d.ts +50 -0
- package/dist/lib/forms/Datetimes/DateInput.d.ts +37 -0
- package/dist/lib/forms/Datetimes/DateTimeInput.d.ts +44 -0
- package/dist/lib/forms/Datetimes/TimeInput.d.ts +42 -0
- package/dist/lib/forms/File/FileInput.d.ts +71 -0
- package/dist/lib/forms/Input.d.ts +248 -0
- package/dist/lib/forms/MaskedInput/IBANInput.d.ts +95 -0
- package/dist/lib/forms/MaskedInput/MaskedInput.d.ts +46 -0
- package/dist/lib/forms/Numeric/NumberInput.d.ts +16 -0
- package/dist/lib/forms/Numeric/RangeInput.d.ts +21 -0
- package/dist/lib/forms/Others/ColorInput.d.ts +56 -0
- package/dist/lib/forms/Others/HiddenInput.d.ts +29 -0
- package/dist/lib/forms/Others/TelephoneInput.d.ts +14 -0
- package/dist/lib/forms/Others/URLInput.d.ts +14 -0
- package/dist/lib/forms/Periodes/MonthInput.d.ts +43 -0
- package/dist/lib/forms/Periodes/WeekInput.d.ts +43 -0
- package/dist/lib/forms/Radio/Radio.d.ts +97 -0
- package/dist/lib/forms/Select/Select.d.ts +136 -0
- package/dist/lib/forms/TagsInput/TagsInput.d.ts +44 -0
- package/dist/lib/forms/Text/EmailInput.d.ts +14 -0
- package/dist/lib/forms/Text/FormattedInput.d.ts +54 -0
- package/dist/lib/forms/Text/PasswordInput.d.ts +19 -0
- package/dist/lib/forms/Text/TextArea.d.ts +31 -0
- package/dist/lib/forms/Text/TextEditor.d.ts +36 -0
- package/dist/lib/forms/Text/TextInput.d.ts +30 -0
- package/dist/lib/hooks/useCaretPosition.d.ts +8 -0
- package/dist/lib/hooks/useClickOutside.d.ts +15 -0
- package/dist/lib/hooks/useClipboard.d.ts +21 -0
- package/dist/lib/hooks/useContextMenu.d.ts +29 -0
- package/dist/lib/hooks/useCookieState.d.ts +37 -0
- package/dist/lib/hooks/useDebounced.hooks.d.ts +85 -0
- package/dist/lib/hooks/useFetchApi.d.ts +65 -0
- package/dist/lib/hooks/useHotkeys.d.ts +96 -0
- package/dist/lib/hooks/useIndexedDb.d.ts +90 -0
- package/dist/lib/hooks/useLocalStoredState.d.ts +36 -0
- package/dist/lib/hooks/useMediaQuery.d.ts +154 -0
- package/dist/lib/hooks/usePagination.d.ts +25 -0
- package/dist/lib/hooks/usePropState.d.ts +16 -0
- package/dist/lib/hooks/useScrollIntoView.d.ts +59 -0
- package/dist/lib/hooks/useSessionStoredState.d.ts +38 -0
- package/dist/lib/hooks/useThrottle.hooks.d.ts +99 -0
- package/dist/lib/hooks/useToggle.d.ts +16 -0
- package/dist/lib/hooks/useUncontrolled.d.ts +44 -0
- package/dist/lib/hooks/useValidatedState.d.ts +21 -0
- package/dist/lib/index.d.ts +174 -0
- package/dist/lib/internal_functions/createIconsInternal.d.ts +36 -0
- package/dist/lib/internal_functions/getAlignmentClass.d.ts +16 -0
- package/dist/lib/internal_functions/getColorClass.d.ts +23 -0
- package/dist/lib/internal_functions/getPositionClass.d.ts +2 -0
- package/dist/lib/internal_functions/getSizeClass.d.ts +23 -0
- package/dist/lib/internal_functions/index.d.ts +8 -0
- package/dist/lib/shims/useSyncExternalStoreShim.d.ts +1 -0
- package/dist/lib/shims/useSyncExternalStoreWithSelector.d.ts +5 -0
- package/dist/lib/test-data.d.ts +9 -0
- package/dist/lib/types/index.d.ts +104 -0
- package/dist/lib/utils/BSN.functions.d.ts +57 -0
- package/dist/lib/utils/IBAN.functions.d.ts +138 -0
- package/dist/lib/utils/JSDateTime.class.d.ts +512 -0
- package/dist/lib/utils/JSDuration.class.d.ts +184 -0
- package/dist/lib/utils/colors.d.ts +54 -0
- package/dist/lib/utils/compare.d.ts +7 -0
- package/dist/lib/utils/deserialize.function.d.ts +2 -0
- package/dist/lib/utils/flattenChildren.function.d.ts +49 -0
- package/dist/lib/utils/math.d.ts +22 -0
- package/dist/lib/utils/object.functions.d.ts +37 -0
- package/dist/lib/utils/operators.d.ts +195 -0
- package/dist/lib/utils/serialize.function.d.ts +2 -0
- package/dist/lib/utils/sorting.d.ts +34 -0
- package/dist/lib/utils/string.utils.d.ts +125 -0
- package/package.json +51 -51
|
@@ -13,6 +13,7 @@ type ParamType<T extends InputValueType = InputValueType> = {
|
|
|
13
13
|
infoData?: React.ReactNode | (() => void) | undefined;
|
|
14
14
|
inputId?: string | undefined;
|
|
15
15
|
helpTag?: string | undefined;
|
|
16
|
+
type?: 'input' | 'select' | 'textarea' | 'checkbox' | 'radiobutton';
|
|
16
17
|
/**
|
|
17
18
|
* `hidden`: geen icon rechts
|
|
18
19
|
* `visible`: standaard gedrag, een check of een error icoon, of een info icoon als showInfo/infoData is meegegeven
|
|
@@ -31,6 +32,6 @@ type ParamType<T extends InputValueType = InputValueType> = {
|
|
|
31
32
|
/** functie voor inputs om de juiste icons te maken
|
|
32
33
|
* INTERN GEBRUIK!
|
|
33
34
|
*/
|
|
34
|
-
export declare function createInputIcons_INTERNAL<T extends InputValueType = InputValueType>({ icon, error, showInfo, infoData, inputId, helpTag, focused, hovered, disabled, loading, value, iconRight, }: ParamType<T>): [containerClass: string, iconLeft: React.ReactNode | undefined, iconRight: React.ReactNode | undefined];
|
|
35
|
+
export declare function createInputIcons_INTERNAL<T extends InputValueType = InputValueType>({ icon, error, showInfo, infoData, inputId, helpTag, focused, hovered, disabled, loading, value, iconRight, type, }: ParamType<T>): [containerClass: string, iconLeft: React.ReactNode | undefined, iconRight: React.ReactNode | undefined];
|
|
35
36
|
export declare function createShowInfo_INTERNAL(infoData?: React.ReactNode | ((helpTag?: string) => void) | undefined, restoreFocus?: Function | undefined, helpTag?: string | undefined): React.ReactNode;
|
|
36
37
|
export {};
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
type ConsoleLevel = 'error' | 'warn' | 'log' | 'info' | (string & {});
|
|
2
|
+
/** log in console */
|
|
3
|
+
export declare class Console {
|
|
4
|
+
static enabled: boolean;
|
|
5
|
+
/** console-log error - Alleen in Debug Modus! */
|
|
6
|
+
static Error(message?: any, ...optionalParams: any[]): void;
|
|
7
|
+
/** console-log warning - Alleen in Debug Modus! */
|
|
8
|
+
static Warn(message?: any, ...optionalParams: any[]): void;
|
|
9
|
+
/** console-log something - Alleen in Debug Modus! */
|
|
10
|
+
static Log(message?: any, ...optionalParams: any[]): void;
|
|
11
|
+
/** console-log info - Alleen in Debug Modus! */
|
|
12
|
+
static Info(message?: any, ...optionalParams: any[]): void;
|
|
13
|
+
/**
|
|
14
|
+
* console-log items in een group - Alleen in Debug Modus!
|
|
15
|
+
* @param groupTitle TItle van de group, deze is altijd zichtbaar in de console
|
|
16
|
+
* @param groupItems de items van de group: als key-value pair zichtbaar als expanded
|
|
17
|
+
* @param collapsed Wordt de groep collapsed of expanded getoond? default = true, collapsed
|
|
18
|
+
*/
|
|
19
|
+
static Group(groupTitle: string, itemSet: Map<string, any> | Array<[string, any]> | object, collapsed?: boolean): void;
|
|
20
|
+
/**
|
|
21
|
+
* Schrijf een log naar de console en return de value die ook naar de console is geschreven
|
|
22
|
+
* @param message de message die naar de console wordt geschreven
|
|
23
|
+
* @param value de value die naar de console wordt geschreven EN wordt gereturned
|
|
24
|
+
* @param level wat voor tyhpe console-log moet er worden gemaakt? default = 'log'
|
|
25
|
+
* @returns de value
|
|
26
|
+
*/
|
|
27
|
+
static LogAndReturn<T extends unknown>(message: string, value: T, level?: ConsoleLevel | undefined): T;
|
|
28
|
+
}
|
|
29
|
+
export {};
|
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
import { PrettierType, StrictOmit } from "../types";
|
|
2
|
+
type BaseFetchOptions<T extends unknown = {}, B extends {
|
|
3
|
+
token: string;
|
|
4
|
+
} = {
|
|
5
|
+
token: string;
|
|
6
|
+
}> = PrettierType<RequestInit> & {
|
|
7
|
+
/** loggen we de request in de console? */
|
|
8
|
+
log: boolean;
|
|
9
|
+
/**
|
|
10
|
+
* reviver voor het resultaat. Default = `true`.
|
|
11
|
+
* - `true` -> zorgt ervoor dat types in het result naar het goede type worden omgezet
|
|
12
|
+
* - `false` -> doet niets
|
|
13
|
+
*
|
|
14
|
+
* __TRUE__ heeft op dit moment invloed op:
|
|
15
|
+
* - `Date`-strings worden omgezet naar `Date`-objecten.
|
|
16
|
+
*/
|
|
17
|
+
revive: boolean;
|
|
18
|
+
/** _(optionele)_ functie om een handeling uit te voeren __NA het parsen & reviven VAN__ json */
|
|
19
|
+
serializer: ((v: B) => string);
|
|
20
|
+
/** _(optionele)_ functie om een handeling uit te voeren __OM te parsen NAAR__ json. Default =`JSON.stringify` */
|
|
21
|
+
deserializer: ((v: T) => T);
|
|
22
|
+
};
|
|
23
|
+
type FetchOptions<T extends unknown = {}> = StrictOmit<BaseFetchOptions<T>, 'method'>;
|
|
24
|
+
type GETOptions<T extends unknown = {}> = StrictOmit<FetchOptions<T>, 'serializer'>;
|
|
25
|
+
type DELOptions<T extends unknown = {}> = StrictOmit<FetchOptions<T>, 'serializer'>;
|
|
26
|
+
type POSTOptions<T extends unknown = {}> = FetchOptions<T>;
|
|
27
|
+
type PUTOptions<T extends unknown = {}> = FetchOptions<T>;
|
|
28
|
+
export declare abstract class FetchWrapper {
|
|
29
|
+
/** constructor - private zodate je hem __NIET__ gaat gebruiken */
|
|
30
|
+
private constructor();
|
|
31
|
+
/** haal de default options op en overschrijf die (zo nodig) met de fetch-specifieke opties voor een request */
|
|
32
|
+
private static _getOptions;
|
|
33
|
+
/**
|
|
34
|
+
* Doe een GET request
|
|
35
|
+
* @param url url waar de request heen moet
|
|
36
|
+
* @param options Opties zoals ook in _`RequestInit`_ beschreven EN onze zelf toegevoegde (optionele) opties
|
|
37
|
+
* @returns Het resultaat of een error
|
|
38
|
+
*/
|
|
39
|
+
static get<T extends unknown = {}>({ url, options, params }: {
|
|
40
|
+
url: string;
|
|
41
|
+
options?: Partial<GETOptions<T>> | undefined | null;
|
|
42
|
+
params?: URLSearchParams | Map<string, string | number | boolean> | object | string | undefined;
|
|
43
|
+
}): Promise<T>;
|
|
44
|
+
/**
|
|
45
|
+
* Doe een POST request
|
|
46
|
+
* @param url url waar de request heen moet
|
|
47
|
+
* @param body de body van de request. Als het een object is, moet het een `token`-property bevatten
|
|
48
|
+
* @param options Opties zoals ook in _`RequestInit`_ beschreven EN onze zelf toegevoegde (optionele) opties
|
|
49
|
+
* @returns Het resultaat of een error
|
|
50
|
+
*/
|
|
51
|
+
static post<B extends ({
|
|
52
|
+
token: string;
|
|
53
|
+
} | string) = {
|
|
54
|
+
token: string;
|
|
55
|
+
}, T extends unknown = {}>({ url, body, options }: {
|
|
56
|
+
url: string;
|
|
57
|
+
body: B | string;
|
|
58
|
+
options?: Partial<POSTOptions<T>> | undefined | null;
|
|
59
|
+
}): Promise<T>;
|
|
60
|
+
/**
|
|
61
|
+
* Doe een PUT request
|
|
62
|
+
* @param url url waar de request heen moet
|
|
63
|
+
* @param body de body van de request. Als het een object is, moet het een `token`-property bevatten
|
|
64
|
+
* @param options Opties zoals ook in _`RequestInit`_ beschreven EN onze zelf toegevoegde (optionele) opties
|
|
65
|
+
* @returns Het resultaat of een error
|
|
66
|
+
*/
|
|
67
|
+
static put<B extends ({
|
|
68
|
+
token: string;
|
|
69
|
+
} | string) = {
|
|
70
|
+
token: string;
|
|
71
|
+
}, T extends unknown = {}>({ url, body, options }: {
|
|
72
|
+
url: string;
|
|
73
|
+
body: B | string;
|
|
74
|
+
options?: Partial<PUTOptions<T>> | undefined | null;
|
|
75
|
+
}): Promise<T>;
|
|
76
|
+
/**
|
|
77
|
+
* Doe een DELETE request
|
|
78
|
+
* @param url url waar de request heen moet
|
|
79
|
+
* @param options Opties zoals ook in _`RequestInit`_ beschreven EN onze zelf toegevoegde (optionele) opties
|
|
80
|
+
* @returns Het resultaat of een error
|
|
81
|
+
*/
|
|
82
|
+
static del<T extends unknown = {}>({ url, params, options }: {
|
|
83
|
+
url: string;
|
|
84
|
+
params?: URLSearchParams | Map<string, string | number | boolean> | object | string | undefined;
|
|
85
|
+
options?: Partial<DELOptions<T>> | undefined | null;
|
|
86
|
+
}): Promise<T>;
|
|
87
|
+
/**
|
|
88
|
+
* Afhandeling van de logging van een fetch-request
|
|
89
|
+
* - logt de status van de request
|
|
90
|
+
* - logt de body van de request (indien aanwezig)
|
|
91
|
+
* - logt de opties van de request
|
|
92
|
+
* - logt het resultaat van de request (indien aanwezig)
|
|
93
|
+
* - logt de error van de request (indien aanwezig)
|
|
94
|
+
*
|
|
95
|
+
* @param obj bevat een object met alle opties en resultaten van de fetch-request
|
|
96
|
+
* @returns
|
|
97
|
+
*/
|
|
98
|
+
private static handleLog;
|
|
99
|
+
/**
|
|
100
|
+
* Stel een URL met parameters samen op basis van de opgegeven URL en (optionele) parameters voor deze URL.
|
|
101
|
+
* @param url de url waar de request heen gaat
|
|
102
|
+
* @param params de (optionele) params voor deze url
|
|
103
|
+
* @returns Een Url met URLParams
|
|
104
|
+
*/
|
|
105
|
+
private static createUrlWithParams;
|
|
106
|
+
/**
|
|
107
|
+
* Afhandeling van de response van een fetch-request
|
|
108
|
+
* @param response de response van de fetch-request
|
|
109
|
+
* @param log moet er gelogged worden
|
|
110
|
+
* @param revive
|
|
111
|
+
* @param deserializer
|
|
112
|
+
* @returns
|
|
113
|
+
*/
|
|
114
|
+
private static handleResponse;
|
|
115
|
+
/**
|
|
116
|
+
* handel het deserializeren van json of text af
|
|
117
|
+
* @param response de response van de fetch-request
|
|
118
|
+
* @param revive moeten waardes 'revived' worden ?
|
|
119
|
+
* @param deserializer functie die wordt aangeroepen NA deserialisatie en NA reviving
|
|
120
|
+
* @returns
|
|
121
|
+
*/
|
|
122
|
+
private static handleDeserialize;
|
|
123
|
+
}
|
|
124
|
+
export {};
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
/** Props voor een aspect-ratio */
|
|
3
|
+
type AspectRatioProps = {
|
|
4
|
+
/** De ratio (width x height) van het gewenste element */
|
|
5
|
+
ratio: '1by1' | '5by4' | '4by5' | '4by3' | '3by4' | '3by2' | '2by3' | '5by3' | '3by5' | '16by9' | '9by16' | '2by1' | '1by2' | '3by1' | '1by3';
|
|
6
|
+
/** Het item dat aan de aspect-ratio moet voldoen */
|
|
7
|
+
children: React.ReactNode;
|
|
8
|
+
/** ? */
|
|
9
|
+
caption?: {
|
|
10
|
+
placement: 'top' | 'bottom';
|
|
11
|
+
text: string;
|
|
12
|
+
};
|
|
13
|
+
/** Extra classes on aspect-ratio-element */
|
|
14
|
+
className?: string;
|
|
15
|
+
};
|
|
16
|
+
/**
|
|
17
|
+
* Gebruik een aspect-ratio voor een bepaald resizable element, waar een width en height bij hoort.
|
|
18
|
+
* Zoals bijvoorbeeld een iframe, img, etc
|
|
19
|
+
* @param props
|
|
20
|
+
* @returns een aspect-ratio'd element.
|
|
21
|
+
* @example
|
|
22
|
+
* <AspectRatio ratio="16by9" >
|
|
23
|
+
* <iframe src="https://www.youtube.com/embed/dQw4w9WgXcQ">
|
|
24
|
+
* </AspectRatio>
|
|
25
|
+
*/
|
|
26
|
+
declare function AspectRatio({ ratio, children, caption, className }: AspectRatioProps): import("react/jsx-runtime").JSX.Element;
|
|
27
|
+
export { AspectRatio };
|
|
28
|
+
export type { AspectRatioProps };
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
/** Basis block component met een standaard margin & padding (bulma) */
|
|
3
|
+
declare function Block({ id, children, className: cn, styles }: {
|
|
4
|
+
id?: string;
|
|
5
|
+
children: React.ReactNode;
|
|
6
|
+
className?: string;
|
|
7
|
+
styles?: React.CSSProperties;
|
|
8
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
export { Block };
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { ColorProp, AlignmentProp, StrictOmit } from './../../types';
|
|
3
|
+
type BorderBoxProps = {
|
|
4
|
+
children: React.ReactNode;
|
|
5
|
+
title?: string | undefined;
|
|
6
|
+
style?: React.CSSProperties | undefined;
|
|
7
|
+
itemRef?: React.RefObject<HTMLDivElement> | undefined | null;
|
|
8
|
+
className?: string | undefined;
|
|
9
|
+
color?: ColorProp | 'default' | undefined;
|
|
10
|
+
alignment?: AlignmentProp | undefined;
|
|
11
|
+
};
|
|
12
|
+
/**
|
|
13
|
+
* Een Box met een border en een (optionele) title. De border heeft een optionele kleur. Default is dat 'dark'
|
|
14
|
+
* @example <BorderBox title="Title">Content</BorderBox>
|
|
15
|
+
* @example <BorderBox title="Title" color="p">Content</BorderBox>
|
|
16
|
+
* @example <BorderBox.Primary title="Title" alignment="c">Content</BorderBox.Primary>
|
|
17
|
+
*/
|
|
18
|
+
declare const BorderBox: {
|
|
19
|
+
({ children, title, style, itemRef, className: cn, color: colorProp, alignment }: BorderBoxProps): import("react/jsx-runtime").JSX.Element;
|
|
20
|
+
Primary(props: StrictOmit<BorderBoxProps, "color">): import("react/jsx-runtime").JSX.Element;
|
|
21
|
+
Link(props: StrictOmit<BorderBoxProps, "color">): import("react/jsx-runtime").JSX.Element;
|
|
22
|
+
Info(props: StrictOmit<BorderBoxProps, "color">): import("react/jsx-runtime").JSX.Element;
|
|
23
|
+
Warning(props: StrictOmit<BorderBoxProps, "color">): import("react/jsx-runtime").JSX.Element;
|
|
24
|
+
Danger(props: StrictOmit<BorderBoxProps, "color">): import("react/jsx-runtime").JSX.Element;
|
|
25
|
+
Success(props: StrictOmit<BorderBoxProps, "color">): import("react/jsx-runtime").JSX.Element;
|
|
26
|
+
Light(props: StrictOmit<BorderBoxProps, "color">): import("react/jsx-runtime").JSX.Element;
|
|
27
|
+
Dark(props: StrictOmit<BorderBoxProps, "color">): import("react/jsx-runtime").JSX.Element;
|
|
28
|
+
};
|
|
29
|
+
export { BorderBox };
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
type BoxProps = {
|
|
3
|
+
id?: string;
|
|
4
|
+
/** De children van de box */
|
|
5
|
+
children: React.ReactNode;
|
|
6
|
+
/** Andere classes om op de box toe te passen */
|
|
7
|
+
className?: string;
|
|
8
|
+
/** Style props direct op de box */
|
|
9
|
+
styles?: React.CSSProperties;
|
|
10
|
+
itemRef?: React.RefObject<any> | null;
|
|
11
|
+
};
|
|
12
|
+
/**
|
|
13
|
+
* Maak een witte box om andere elementen heen. Voor forms of modals. Heeft een beetje schaduw.
|
|
14
|
+
* @see {@link https://bulma.io/documentation/elements/box/}
|
|
15
|
+
* @returns een witte box om elementen.
|
|
16
|
+
* @example <Box>This is a box</Box>
|
|
17
|
+
*/
|
|
18
|
+
declare function Box({ id, children, className: cn, styles, itemRef }: BoxProps): import("react/jsx-runtime").JSX.Element;
|
|
19
|
+
export { Box };
|
|
20
|
+
export type { BoxProps };
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { IconProp } from '@fortawesome/fontawesome-svg-core';
|
|
3
|
+
import { ColorProp, StrictOmit, SizeProp } from './../../types';
|
|
4
|
+
type ButtonStyles = 'faded' | 'f' | 'inverted' | 'i' | 'static' | 's' | 'default' | 'd' | 'outlined' | 'o';
|
|
5
|
+
export type ButtonProps = {
|
|
6
|
+
/** Is de button loading ? */
|
|
7
|
+
loading?: boolean;
|
|
8
|
+
/** Is de button de gehele breedte van de container? */
|
|
9
|
+
fullwidth?: boolean;
|
|
10
|
+
/** Wat moet er op de button komen (text, icons etc.) */
|
|
11
|
+
children?: React.ReactNode;
|
|
12
|
+
/** Styling voor de button */
|
|
13
|
+
styling?: ButtonStyles;
|
|
14
|
+
/** is dit een static button? */
|
|
15
|
+
isStatic?: boolean;
|
|
16
|
+
/** De grootte van de button */
|
|
17
|
+
size?: SizeProp;
|
|
18
|
+
/** helpTag voor gebruik met Loon, om de juiste help-teksten weer te kunnen geven. Gebruikt met `onFocus()` */
|
|
19
|
+
helpTag?: string;
|
|
20
|
+
/** value voor gebruik in bijvoorbeeld een form */
|
|
21
|
+
value?: string;
|
|
22
|
+
/** De kleur van de button */
|
|
23
|
+
color?: ColorProp | 'none';
|
|
24
|
+
/** Function voor onFocus event
|
|
25
|
+
@param e het event
|
|
26
|
+
@param ht de helpTag voor de button (optioneel)
|
|
27
|
+
*/
|
|
28
|
+
onFocus?: (e: React.FocusEvent<HTMLButtonElement>, ht?: string) => void;
|
|
29
|
+
} & React.ButtonHTMLAttributes<HTMLButtonElement>;
|
|
30
|
+
/**
|
|
31
|
+
* Button is helemaal instelbaar. Maak de button. Alle button instellingen worden hier verwerkt.
|
|
32
|
+
* @param props
|
|
33
|
+
* @returns een default button
|
|
34
|
+
* @example <Button>Button</Button>
|
|
35
|
+
* @description Alle mogelijke props voor de Button-component
|
|
36
|
+
* | Prop | Value | Default | Description |
|
|
37
|
+
* |----------|-------------------------|----------|-----------------------------------------|
|
|
38
|
+
* | children | | | De content van de button (icon, text) |
|
|
39
|
+
* | color | `p`, `l`, `i`, `w`, `d`,| `p` | Kleuren voor de button |
|
|
40
|
+
* | | `s`, `is-${string}` | | |
|
|
41
|
+
* | styling | `l` , light | | Light style voor de button |
|
|
42
|
+
* | | `o` , outlined | | Outlined style voor de button |
|
|
43
|
+
* | | `i` , inverted | | Inverted style voor de button |
|
|
44
|
+
* | | `lo`, light-outlined | | Light & outlined style voor de button |
|
|
45
|
+
* | | `s` , static | | static style voor de button (grey) |
|
|
46
|
+
* | size | `s, m, l, xl` | | sizes voor de button |
|
|
47
|
+
* | rounded | `true, false` | `false` | Afgeronde hoeken voor de button |
|
|
48
|
+
* | fullwidth| `true, false` | `false` | Button de gehele breedte van de container |
|
|
49
|
+
* | loading | `true, false` | `false` | heeft button de loading state |
|
|
50
|
+
* | disabled | `true, false` | `false` | is de button disabled |
|
|
51
|
+
* | title | string | | tooltip voor de button |
|
|
52
|
+
* | id | string | | id voor de button |
|
|
53
|
+
* | onClick | function | | onClick voor de button |
|
|
54
|
+
* | onFocus | function | | onFocus voor de button |
|
|
55
|
+
* | name | string | | name voor de button |
|
|
56
|
+
* | value | string | | value voor de button |
|
|
57
|
+
* | form | string | | form waar de button bij hoort |
|
|
58
|
+
* | formAction | string | | formAction voor de button |
|
|
59
|
+
* | helpTag | string | | helpTag voor de button |
|
|
60
|
+
* | tooltip | string | | tooltip voor de button (deprecated, gebruik `title`) |
|
|
61
|
+
* | type | `button, reset, submit` | `button` | type 'button' voor de button |
|
|
62
|
+
*/
|
|
63
|
+
declare const Button: {
|
|
64
|
+
({ color: colorProp, size: sizeProp, loading, disabled, fullwidth, styling, type, className: classNameProp, isStatic, helpTag, onClick, onFocus, onMouseEnter, children: nodes, value, ...props }: ButtonProps): import("react/jsx-runtime").JSX.Element;
|
|
65
|
+
OK({ text, icon, color, ...props }: Partial<DefinedButtonProps>): import("react/jsx-runtime").JSX.Element;
|
|
66
|
+
Cancel({ text, icon, color, ...props }: Partial<DefinedButtonProps>): import("react/jsx-runtime").JSX.Element;
|
|
67
|
+
Close({ text, icon, color, ...props }: Partial<DefinedButtonProps>): import("react/jsx-runtime").JSX.Element;
|
|
68
|
+
Delete({ text, icon, color, ...props }: Partial<DefinedButtonProps>): import("react/jsx-runtime").JSX.Element;
|
|
69
|
+
Static(props: StrictOmit<ButtonProps, "color" | "isStatic" | "onClick" | "onFocus" | "disabled" | "loading">): import("react/jsx-runtime").JSX.Element;
|
|
70
|
+
Primary(props: StrictOmit<ButtonProps, "color" | "isStatic">): import("react/jsx-runtime").JSX.Element;
|
|
71
|
+
Success(props: StrictOmit<ButtonProps, "color" | "isStatic">): import("react/jsx-runtime").JSX.Element;
|
|
72
|
+
Danger(props: StrictOmit<ButtonProps, "color" | "isStatic">): import("react/jsx-runtime").JSX.Element;
|
|
73
|
+
Warning(props: StrictOmit<ButtonProps, "color" | "isStatic">): import("react/jsx-runtime").JSX.Element;
|
|
74
|
+
Info(props: StrictOmit<ButtonProps, "color" | "isStatic">): import("react/jsx-runtime").JSX.Element;
|
|
75
|
+
Link(props: StrictOmit<ButtonProps, "color" | "isStatic">): import("react/jsx-runtime").JSX.Element;
|
|
76
|
+
Light(props: StrictOmit<ButtonProps, "color" | "isStatic">): import("react/jsx-runtime").JSX.Element;
|
|
77
|
+
Dark(props: StrictOmit<ButtonProps, "color" | "isStatic">): import("react/jsx-runtime").JSX.Element;
|
|
78
|
+
None(props: StrictOmit<ButtonProps, "color" | "isStatic">): import("react/jsx-runtime").JSX.Element;
|
|
79
|
+
Theme({ invert, ...props }: {
|
|
80
|
+
invert?: boolean;
|
|
81
|
+
} & StrictOmit<ButtonProps, "color" | "isStatic">): import("react/jsx-runtime").JSX.Element;
|
|
82
|
+
};
|
|
83
|
+
type DefinedButtonProps = StrictOmit<ButtonProps, 'children' | 'isStatic'> & {
|
|
84
|
+
icon: IconProp;
|
|
85
|
+
text: string;
|
|
86
|
+
};
|
|
87
|
+
export { Button };
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { AlignmentProp } from './../../types';
|
|
3
|
+
type ButtonGroupProps = {
|
|
4
|
+
/** Een buttongroup kan alleen Buttons als children hebben! */
|
|
5
|
+
children?: React.ReactNode;
|
|
6
|
+
/** Moeten de buttons aan elkaar vast gezet worden (default = false) */
|
|
7
|
+
hasAddons?: boolean;
|
|
8
|
+
/** Aan welke kant moeten de buttons aligned worden (default = l) */
|
|
9
|
+
alignment?: AlignmentProp | undefined;
|
|
10
|
+
/** Voeg extra classes aan de buttons-container toe */
|
|
11
|
+
className?: string;
|
|
12
|
+
/** Moeten de buttons even groot zijn (default = false) */
|
|
13
|
+
unevenSize?: boolean;
|
|
14
|
+
};
|
|
15
|
+
/**
|
|
16
|
+
* Button-group component. Groupeert een zooitje buttons.
|
|
17
|
+
* @param children: De buttons. Mogen alleen maar buttons zijn!
|
|
18
|
+
* @param sameSize: Moeten de buttons even groot zijn (default = false)
|
|
19
|
+
* @param hasAddons: Moeten de buttons aan elkaar vast gezet worden (default = false). Werkt alleen voor `uneven`
|
|
20
|
+
* @param alignment: Aan welke kant moeten de buttons aligned worden (default = l)
|
|
21
|
+
* @param className: Voeg extra classes aan de buttons-container toe
|
|
22
|
+
* @returns
|
|
23
|
+
*/
|
|
24
|
+
declare function Buttons({ unevenSize, alignment, ...props }: ButtonGroupProps): import("react/jsx-runtime").JSX.Element;
|
|
25
|
+
export { Buttons, Buttons as ButtonGroup };
|
|
26
|
+
export type { ButtonGroupProps };
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { BaseEventProps, EventOptions } from '../Props';
|
|
3
|
+
type CalendarColoredItemProps<T extends BaseEventProps> = {
|
|
4
|
+
/** Het event */
|
|
5
|
+
desc: (event: T, isHovered?: boolean) => React.JSX.Element;
|
|
6
|
+
event: T;
|
|
7
|
+
/** Opties voor events */
|
|
8
|
+
options?: EventOptions<T>;
|
|
9
|
+
/** Onclick handler voor het event */
|
|
10
|
+
onClick?: (event: T, clickEvent: React.MouseEvent<HTMLElement>) => void;
|
|
11
|
+
};
|
|
12
|
+
/**
|
|
13
|
+
* Component voor een event dat de hele dag duurt
|
|
14
|
+
* @param props
|
|
15
|
+
* @returns
|
|
16
|
+
*/
|
|
17
|
+
export declare function CalendarColoredItem<T extends BaseEventProps>({ event, options, onClick, desc }: CalendarColoredItemProps<T>): import("react/jsx-runtime").JSX.Element;
|
|
18
|
+
export {};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { BaseEventProps, EventOptions } from '../Props';
|
|
3
|
+
type CalendarItemProps<T extends BaseEventProps> = {
|
|
4
|
+
desc: (event: T, isHovered?: boolean) => React.JSX.Element;
|
|
5
|
+
/** Het event */
|
|
6
|
+
event: T;
|
|
7
|
+
/** Opties voor events */
|
|
8
|
+
options?: EventOptions<T>;
|
|
9
|
+
/** Onclick handler */
|
|
10
|
+
onClick?: (event: T, clickEvent: React.MouseEvent<HTMLElement>) => void;
|
|
11
|
+
};
|
|
12
|
+
/**
|
|
13
|
+
* Component voor een event met een tijdstip en NIET de hele dag duurt
|
|
14
|
+
* @param props
|
|
15
|
+
* @returns
|
|
16
|
+
*/
|
|
17
|
+
export declare function CalendarItem<T extends BaseEventProps>({ event, onClick, desc }: CalendarItemProps<T>): import("react/jsx-runtime").JSX.Element;
|
|
18
|
+
export {};
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { JSDateTime } from './../../utils/JSDateTime.class';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import { BaseEventProps, CalendarOptions, CalendarType } from './Props';
|
|
4
|
+
type DayContainerProps<T extends BaseEventProps> = {
|
|
5
|
+
/** Events op deze dag */
|
|
6
|
+
events: T[];
|
|
7
|
+
/** Wat te doen als een event aangeklikt wordt */
|
|
8
|
+
onEventClick?: (event: T, clickEvent: React.MouseEvent<HTMLElement>) => void;
|
|
9
|
+
/** Wat te doen als een dag aangeklikt wordt */
|
|
10
|
+
onDayClick?: (date: JSDateTime, clickEvent: React.MouseEvent<HTMLElement>) => void;
|
|
11
|
+
/** Opties voor deze container */
|
|
12
|
+
options?: CalendarOptions<T>;
|
|
13
|
+
/** De datum voor de container */
|
|
14
|
+
date: JSDateTime;
|
|
15
|
+
/** Behoort deze dag tot de huidige maand ? */
|
|
16
|
+
isCurrentMonth?: boolean;
|
|
17
|
+
calendarType: CalendarType;
|
|
18
|
+
};
|
|
19
|
+
/**
|
|
20
|
+
* Component voor de dag-container in de maand-view
|
|
21
|
+
* @param props
|
|
22
|
+
* @returns
|
|
23
|
+
*/
|
|
24
|
+
export declare function DayContainer<T extends BaseEventProps>({ options, date, onDayClick, onEventClick, events, calendarType, isCurrentMonth, }: DayContainerProps<T>): import("react/jsx-runtime").JSX.Element;
|
|
25
|
+
export {};
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { BaseEventProps, CalendarType, EventOptions } from './Props';
|
|
3
|
+
type MoreEventsViewProps<T extends BaseEventProps> = {
|
|
4
|
+
calendarType: CalendarType;
|
|
5
|
+
/** De events op deze dag */
|
|
6
|
+
events: T[];
|
|
7
|
+
/** Event-click handling */
|
|
8
|
+
onEventClick?: (event: T, clickEvent: React.MouseEvent<HTMLElement>) => void;
|
|
9
|
+
/** Global event options */
|
|
10
|
+
options?: {
|
|
11
|
+
allday?: EventOptions<T>;
|
|
12
|
+
timed?: EventOptions<T>;
|
|
13
|
+
};
|
|
14
|
+
};
|
|
15
|
+
export declare function AllDayDesc<T extends BaseEventProps>({ evt, calendarType, }: {
|
|
16
|
+
evt: T;
|
|
17
|
+
calendarType: CalendarType;
|
|
18
|
+
isHovered?: boolean;
|
|
19
|
+
options?: EventOptions<T>;
|
|
20
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
21
|
+
export declare function NotAllDayDesc<T extends BaseEventProps>({ evt, options, calendarType, isHovered, }: {
|
|
22
|
+
evt: T;
|
|
23
|
+
calendarType: CalendarType;
|
|
24
|
+
options?: EventOptions<T>;
|
|
25
|
+
isHovered?: boolean;
|
|
26
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
27
|
+
/**
|
|
28
|
+
* Expandable events als er meer dan 5 events op een dag vallen
|
|
29
|
+
* @param props
|
|
30
|
+
* @returns
|
|
31
|
+
*/
|
|
32
|
+
export declare function MoreEventsView<T extends BaseEventProps>({ events, onEventClick, options, calendarType }: MoreEventsViewProps<T>): import("react/jsx-runtime").JSX.Element;
|
|
33
|
+
export {};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { JSDateTime } from './../../../utils/JSDateTime.class';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import { BaseEventProps, CalendarOptions } from '../Props';
|
|
4
|
+
type FourweekViewProps<T extends BaseEventProps> = {
|
|
5
|
+
/** Events voor deze view */
|
|
6
|
+
events: T[];
|
|
7
|
+
/** Opties voor deze view */
|
|
8
|
+
options?: CalendarOptions<T>;
|
|
9
|
+
/** Event aangeklikt */
|
|
10
|
+
onEventClick?: (e: T, event: React.MouseEvent<HTMLElement>) => void;
|
|
11
|
+
/** Dag-datum geklikt? */
|
|
12
|
+
onDayClick?: (date: JSDateTime, event: React.MouseEvent<HTMLElement>) => void;
|
|
13
|
+
/** Huidige geselecteerde datum */
|
|
14
|
+
viewDate: Date | JSDateTime;
|
|
15
|
+
};
|
|
16
|
+
/**
|
|
17
|
+
* Maak een vierweken-view (grid) met events
|
|
18
|
+
* @param props
|
|
19
|
+
* @returns
|
|
20
|
+
*/
|
|
21
|
+
declare function FourweeksView<T extends BaseEventProps>({ viewDate: vd, options, onEventClick, onDayClick, events: orgEvents }: FourweekViewProps<T>): import("react/jsx-runtime").JSX.Element;
|
|
22
|
+
export { FourweeksView };
|
|
23
|
+
export type { FourweekViewProps };
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { JSDateTime } from './../../../utils/JSDateTime.class';
|
|
2
|
+
import { Locale } from 'date-fns';
|
|
3
|
+
type MiniViewProps = {
|
|
4
|
+
/** de viewDate waarop de mini-view start (optioneel, default = vandaag) */
|
|
5
|
+
viewDate?: JSDateTime | Date;
|
|
6
|
+
/** opties voor de weergave van de view */
|
|
7
|
+
options?: MiniViewOptions;
|
|
8
|
+
/** callback voor een geselecteerde datum (JS Date) */
|
|
9
|
+
onDateSelected?: (date: Date) => void;
|
|
10
|
+
/** callback voor een geselecteerde datum (JSDateTime gebruik) */
|
|
11
|
+
onJSDateTimeSelected?: (date: JSDateTime) => void;
|
|
12
|
+
};
|
|
13
|
+
type MiniViewOptions = {
|
|
14
|
+
/** formatString voor weergeven van datum-numbers (0-31). Default 'd' (1, 2, 12, 13,...) */
|
|
15
|
+
dayFormat?: string;
|
|
16
|
+
/** formatString voor weergeven van week-dagen (ma, di, wo, etc). Default 'E' (maa, din, woe, don,...) */
|
|
17
|
+
weekDayFormat?: string;
|
|
18
|
+
/** formatString voor weergeven van maand (januari 2022, februari 2022, etc). Default 'MMMM yyyy' */
|
|
19
|
+
monthFormat?: string;
|
|
20
|
+
dateFormat?: string;
|
|
21
|
+
locale?: Locale;
|
|
22
|
+
};
|
|
23
|
+
export declare function MiniView({ viewDate: vd, options: opts, onDateSelected, onJSDateTimeSelected }: MiniViewProps): import("react/jsx-runtime").JSX.Element;
|
|
24
|
+
export {};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { JSDateTime } from './../../../utils/JSDateTime.class';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import { BaseEventProps, CalendarOptions } from '../Props';
|
|
4
|
+
type MonthViewProps<T extends BaseEventProps> = {
|
|
5
|
+
/** Events voor deze view */
|
|
6
|
+
events: T[];
|
|
7
|
+
/** Opties voor deze view */
|
|
8
|
+
options?: CalendarOptions<T>;
|
|
9
|
+
/** Event aangeklikt */
|
|
10
|
+
onEventClick?: (e: T, event: React.MouseEvent<HTMLElement>) => void;
|
|
11
|
+
/** Dag-datum geklikt? */
|
|
12
|
+
onDayClick?: (date: JSDateTime, event: React.MouseEvent<HTMLElement>) => void;
|
|
13
|
+
/** Huidige geselecteerde datum */
|
|
14
|
+
viewDate: Date | JSDateTime;
|
|
15
|
+
};
|
|
16
|
+
/**
|
|
17
|
+
* Maak een maand-view (grid) met events
|
|
18
|
+
* @param props
|
|
19
|
+
* @returns
|
|
20
|
+
*/
|
|
21
|
+
declare function MonthView<T extends BaseEventProps>({ viewDate: vd, options, onEventClick, onDayClick, events: orgEvents }: MonthViewProps<T>): import("react/jsx-runtime").JSX.Element;
|
|
22
|
+
export { MonthView };
|
|
23
|
+
export type { MonthViewProps };
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { JSDateTime } from './../../../utils/JSDateTime.class';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import { BaseEventProps, CalendarOptions } from '../Props';
|
|
4
|
+
type PlanningViewProps<R, E extends BaseEventProps = BaseEventProps> = {
|
|
5
|
+
/** Datum van de view */
|
|
6
|
+
viewDate: JSDateTime | Date;
|
|
7
|
+
/** Aantal dagen om te tonen NA de viewDate, default 65 dagen, exclusief de useSTartAndEndOfWeek */
|
|
8
|
+
days?: number | undefined;
|
|
9
|
+
/**
|
|
10
|
+
* Array van tuples: [R, E[]] , waar bij R een object of een rij in de planning is en E een array van events die bij dit object/deze rij horen.
|
|
11
|
+
* Op die manier sorteer je de events per object, dus per rij.
|
|
12
|
+
*/
|
|
13
|
+
rows?: Array<[R, E[]]>;
|
|
14
|
+
/** Hoe identificeren we een rij?
|
|
15
|
+
* - 'itself' -> Gebruik met R is een string of number.
|
|
16
|
+
* - Anders moet de rowIdentifer een property van R zijn.
|
|
17
|
+
*/
|
|
18
|
+
rowIdentifier?: 'itself' | keyof R | ((item: R, index?: number) => string);
|
|
19
|
+
/** Gebruik start en einde van de week? Dan is de 1e kolom met events altijd een maandag, de laatste altijd een zondag (bij visibleDays is allemaal) */
|
|
20
|
+
alwaysStartOnMonday?: boolean;
|
|
21
|
+
/** Opties voor deze view */
|
|
22
|
+
options?: CalendarOptions<E>;
|
|
23
|
+
/** Event aangeklikt */
|
|
24
|
+
onEventClick?: (e: E, event: React.MouseEvent<HTMLElement>) => void;
|
|
25
|
+
/** Dag-datum geklikt? */
|
|
26
|
+
onDayClick?: (date: JSDateTime, row: R, event: React.MouseEvent<HTMLElement>) => void;
|
|
27
|
+
/** Hoe tonen we de rij? */
|
|
28
|
+
rowLabel?: (rowItem: R, events?: E[] | undefined) => React.ReactNode;
|
|
29
|
+
/** Hoe tonen we de dag? */
|
|
30
|
+
dayHeader?: (d: JSDateTime) => React.ReactNode;
|
|
31
|
+
/** Hoe tonen we de rij-header? first row, first column. */
|
|
32
|
+
rowHeader?: string | React.ReactNode | (() => React.ReactNode);
|
|
33
|
+
};
|
|
34
|
+
/**
|
|
35
|
+
* Een view voor het weergeven van een planning. To
|
|
36
|
+
* @param param0
|
|
37
|
+
* @returns
|
|
38
|
+
*/
|
|
39
|
+
declare function PlanningView<R, E extends BaseEventProps>({ viewDate, days: daysShown, alwaysStartOnMonday, options, rows, rowIdentifier, dayHeader, rowHeader, rowLabel, onDayClick, onEventClick, }: PlanningViewProps<R, E>): import("react/jsx-runtime").JSX.Element;
|
|
40
|
+
export { PlanningView };
|
|
41
|
+
export type { PlanningViewProps };
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import { ColorProp } from './../../types';
|
|
2
|
+
import { JSDateTime } from './../../utils/JSDateTime.class';
|
|
3
|
+
import { Locale } from 'date-fns';
|
|
4
|
+
export type CalendarType = 'm' | 'v' | 'w' | 'p';
|
|
5
|
+
export type CalendarHours = 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | (number & {});
|
|
6
|
+
export type BaseEventProps = {
|
|
7
|
+
/** ID van een event */
|
|
8
|
+
id: number | string | (() => number | string);
|
|
9
|
+
/** Title van een event */
|
|
10
|
+
title: React.ReactNode | ((calType?: CalendarType) => React.ReactNode);
|
|
11
|
+
/** Start datetime or date event */
|
|
12
|
+
startDateTime: Date | JSDateTime;
|
|
13
|
+
/** [INTERN GEBRUIK!! AFBLIJVEN!!!] Start datetime or date event */
|
|
14
|
+
_startDateTime?: JSDateTime;
|
|
15
|
+
/** (optional) End datetime */
|
|
16
|
+
endDateTime?: Date | JSDateTime;
|
|
17
|
+
/** [INTERN GEBRUIK!! AFBLIJVEN!!!] end datetime or date event */
|
|
18
|
+
_endDateTime?: JSDateTime;
|
|
19
|
+
/** Is event an allday-event (hide starttime) */
|
|
20
|
+
allDay?: boolean;
|
|
21
|
+
/** Event description */
|
|
22
|
+
description?: React.ReactNode | ((calType?: CalendarType) => React.ReactNode);
|
|
23
|
+
/** Background-color for event (hexColors, default = #ee8000) */
|
|
24
|
+
evtColor?: HexColor | ColorProp | ((hovered?: boolean) => HexColor | ColorProp);
|
|
25
|
+
/** (optional) Tooltip wordt getoont als opgegeven, heeft een maxWidth van 300px */
|
|
26
|
+
tooltip?: React.ReactNode | string | undefined;
|
|
27
|
+
};
|
|
28
|
+
export type CalendarOptions<T extends BaseEventProps> = {
|
|
29
|
+
/** begin-uur voor de weekview, het 1e zichtbare uur in de calendar. default = `0`, '00:00', of 24:00. Kan alleen in de ochtend zijn */
|
|
30
|
+
firstHour?: CalendarHours;
|
|
31
|
+
/** eind-uur voor de weekview, het 1e zichtbare uur in de calendar */
|
|
32
|
+
lastHour?: CalendarHours;
|
|
33
|
+
/** De locale voor de calendar. default = 'nl-NL' */
|
|
34
|
+
locale?: Locale;
|
|
35
|
+
/** Zichtbare dagen als set (default 1,2,3,4,5,6,7 (ma = 1, di = 2,... zo = 7)) */
|
|
36
|
+
visibleDays?: Set<number>;
|
|
37
|
+
/** Settings for events */
|
|
38
|
+
event?: {
|
|
39
|
+
/** Settings for allday events */
|
|
40
|
+
allday?: EventOptions<T>;
|
|
41
|
+
/** Settings for timed events */
|
|
42
|
+
timed?: EventOptions<T>;
|
|
43
|
+
};
|
|
44
|
+
/** Settings for today */
|
|
45
|
+
today?: {
|
|
46
|
+
/** Background color for today (HexColors, default = #3b59ec) */
|
|
47
|
+
bgColor?: (hovered: boolean, date?: Date | JSDateTime) => HexColor | ColorProp;
|
|
48
|
+
/** Do not show which day is today */
|
|
49
|
+
doNotMarkToday: boolean;
|
|
50
|
+
};
|
|
51
|
+
tooltipColor?: ColorProp;
|
|
52
|
+
};
|
|
53
|
+
export type EventOptions<T extends BaseEventProps> = {
|
|
54
|
+
/** Dackground color for event (hex color, default = #ff8000) */
|
|
55
|
+
evtColor?: (evt: T, hovered: boolean) => HexColor | ColorProp;
|
|
56
|
+
};
|
|
57
|
+
type HexColor = `#${string}`;
|
|
58
|
+
export {};
|