@progress/kendo-react-scheduler 10.2.0-develop.1 → 10.2.0-develop.10
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/Scheduler.js +1 -1
- package/Scheduler.mjs +56 -53
- package/dist/cdn/js/kendo-react-scheduler.js +1 -1
- package/editors/SchedulerFormEditor.mjs +10 -7
- package/hooks/useSlotExpand.js +1 -1
- package/hooks/useSlotExpand.mjs +4 -4
- package/index.d.mts +243 -45
- package/index.d.ts +243 -45
- package/items/SchedulerProportionalViewItem.js +1 -1
- package/items/SchedulerProportionalViewItem.mjs +1 -1
- package/items/SchedulerViewItem.js +1 -1
- package/items/SchedulerViewItem.mjs +8 -8
- package/package-metadata.js +1 -1
- package/package-metadata.mjs +2 -2
- package/package.json +11 -11
|
@@ -22,13 +22,16 @@ import { useSchedulerFieldsContext as we, useSchedulerPropsContext as Fe } from
|
|
|
22
22
|
const Re = e.forwardRef(
|
|
23
23
|
(r, b) => {
|
|
24
24
|
const u = e.useRef(null), f = e.useRef(null), L = ge(), i = Ce(), t = we(), { resources: q, timezone: z } = Fe();
|
|
25
|
-
e.useImperativeHandle(
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
25
|
+
e.useImperativeHandle(
|
|
26
|
+
f,
|
|
27
|
+
() => {
|
|
28
|
+
var n;
|
|
29
|
+
return {
|
|
30
|
+
element: (n = u.current) != null && n.element ? u.current.element : u.current,
|
|
31
|
+
props: r
|
|
32
|
+
};
|
|
33
|
+
}
|
|
34
|
+
), e.useImperativeHandle(
|
|
32
35
|
b,
|
|
33
36
|
() => f.current
|
|
34
37
|
);
|
package/hooks/useSlotExpand.js
CHANGED
|
@@ -5,4 +5,4 @@
|
|
|
5
5
|
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const x=require("react"),
|
|
8
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const x=require("react"),p=require("../views/common/utils.js"),E=require("../constants/index.js"),O=require("@progress/kendo-react-common"),S=require("../context/SchedulerContext.js");function j(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const c in e)if(c!=="default"){const f=Object.getOwnPropertyDescriptor(e,c);Object.defineProperty(t,c,f.get?f:{enumerable:!0,get:()=>e[c]})}}return t.default=e,Object.freeze(t)}const i=j(x),q=(e,t)=>{const c=i.useRef(void 0),f=i.useRef(0),m=S.useSchedulerElementContext(),w=()=>{if(!e.current)return;const n=e.current.element;n&&(f.current=n.clientHeight)},d=i.useCallback(()=>{if(!t||!e.current)return;const n=e.current.element,g=e.current.props;if(!n)return;const a=p.getPadding(n),r=new Map,o=g.items.filter(u=>u._ref.current);o.forEach(u=>{var v,R,y;if(!u._ref.current)return;const{height:l}=p.getRect(u._ref.current.element),_=(R=(v=u._ref.current)==null?void 0:v._order)!=null?R:-1;((y=r.get(_))!=null?y:0)<l&&r.set(_,l)});const s=Array.from(r.values()).reduce((u,l)=>u+l,0),b=o.length*E.BORDER_WIDTH*2+s-(a||0)+(typeof t=="object"&&t.offsetTop?t.offsetTop:0)+(typeof t=="object"&&t.offsetBottom?t.offsetBottom:0);o.length?b>f.current-a&&p.setRect(n,{height:b},!0):n&&(n.style.minHeight="")},[t,e]),h=i.useCallback(()=>{c.current!==void 0&&window.cancelAnimationFrame(c.current),c.current=window.requestAnimationFrame(()=>{d()})},[d]);O.useIsomorphicLayoutEffect(w,[]),i.useEffect(d,[e,e.current&&e.current.props,t]),i.useEffect(()=>{if(!e.current)return;const a=e.current.props.items.filter(r=>r._ref.current).map(r=>{if(!r._ref.current||!r._ref.current.element||!m.current)return;const o=window.ResizeObserver,s=o&&new o(h);return s&&s.observe(r._ref.current.element),()=>{s&&s.disconnect()}});return()=>{a.forEach(r=>r&&r())}},[h,m,e])};exports.useSlotExpand=q;
|
package/hooks/useSlotExpand.mjs
CHANGED
|
@@ -11,7 +11,7 @@ import { BORDER_WIDTH as y } from "../constants/index.mjs";
|
|
|
11
11
|
import { useIsomorphicLayoutEffect as k } from "@progress/kendo-react-common";
|
|
12
12
|
import { useSchedulerElementContext as z } from "../context/SchedulerContext.mjs";
|
|
13
13
|
const O = (e, t) => {
|
|
14
|
-
const m = u.useRef(), p = u.useRef(0), l = z(), w = () => {
|
|
14
|
+
const m = u.useRef(void 0), p = u.useRef(0), l = z(), w = () => {
|
|
15
15
|
if (!e.current)
|
|
16
16
|
return;
|
|
17
17
|
const n = e.current.element;
|
|
@@ -24,11 +24,11 @@ const O = (e, t) => {
|
|
|
24
24
|
return;
|
|
25
25
|
const i = E(n), r = /* @__PURE__ */ new Map(), o = h.items.filter((c) => c._ref.current);
|
|
26
26
|
o.forEach((c) => {
|
|
27
|
-
var R, b
|
|
27
|
+
var v, R, b;
|
|
28
28
|
if (!c._ref.current)
|
|
29
29
|
return;
|
|
30
|
-
const { height: f } = x(c._ref.current.element), _ = (
|
|
31
|
-
((
|
|
30
|
+
const { height: f } = x(c._ref.current.element), _ = (R = (v = c._ref.current) == null ? void 0 : v._order) != null ? R : -1;
|
|
31
|
+
((b = r.get(_)) != null ? b : 0) < f && r.set(_, f);
|
|
32
32
|
});
|
|
33
33
|
const s = Array.from(r.values()).reduce((c, f) => c + f, 0), g = o.length * y * 2 + s - (i || 0) + (typeof t == "object" && t.offsetTop ? t.offsetTop : 0) + (typeof t == "object" && t.offsetBottom ? t.offsetBottom : 0);
|
|
34
34
|
o.length ? g > p.current - i && H(n, { height: g }, !0) : n && (n.style.minHeight = "");
|
package/index.d.mts
CHANGED
|
@@ -31,7 +31,7 @@ import { InferProps } from 'prop-types';
|
|
|
31
31
|
import { InputHandle } from '@progress/kendo-react-inputs';
|
|
32
32
|
import { InputProps } from '@progress/kendo-react-inputs';
|
|
33
33
|
import { IntlService } from '@progress/kendo-react-intl';
|
|
34
|
-
import { JSX
|
|
34
|
+
import { JSX } from 'react/jsx-runtime';
|
|
35
35
|
import { LabelProps } from '@progress/kendo-react-labels';
|
|
36
36
|
import { LocalizationService } from '@progress/kendo-react-intl';
|
|
37
37
|
import { MultiSelectProps } from '@progress/kendo-react-dropdowns';
|
|
@@ -1894,7 +1894,7 @@ export declare const SchedulerFormEditor: React_2.ForwardRefExoticComponent<glob
|
|
|
1894
1894
|
export declare const schedulerFormEditorDefaultProps: {
|
|
1895
1895
|
as: React_2.ForwardRefExoticComponent<globalThis.Omit<FormElementProps, "ref"> & React_2.RefAttributes<FormElementHandle>>;
|
|
1896
1896
|
titleLabel: {
|
|
1897
|
-
(props: LabelProps):
|
|
1897
|
+
(props: LabelProps): JSX.Element;
|
|
1898
1898
|
propTypes: {
|
|
1899
1899
|
id: Requireable<string>;
|
|
1900
1900
|
editorId: Requireable<string>;
|
|
@@ -1910,7 +1910,7 @@ export declare const schedulerFormEditorDefaultProps: {
|
|
|
1910
1910
|
displayName: string;
|
|
1911
1911
|
};
|
|
1912
1912
|
titleError: {
|
|
1913
|
-
(props: ErrorProps):
|
|
1913
|
+
(props: ErrorProps): JSX.Element;
|
|
1914
1914
|
propTypes: {
|
|
1915
1915
|
id: Requireable<string>;
|
|
1916
1916
|
direction: Requireable<string>;
|
|
@@ -1922,7 +1922,7 @@ export declare const schedulerFormEditorDefaultProps: {
|
|
|
1922
1922
|
};
|
|
1923
1923
|
titleEditor: React_2.ForwardRefExoticComponent<InputProps & React_2.RefAttributes<InputHandle | null>>;
|
|
1924
1924
|
startLabel: {
|
|
1925
|
-
(props: LabelProps):
|
|
1925
|
+
(props: LabelProps): JSX.Element;
|
|
1926
1926
|
propTypes: {
|
|
1927
1927
|
id: Requireable<string>;
|
|
1928
1928
|
editorId: Requireable<string>;
|
|
@@ -1938,7 +1938,7 @@ export declare const schedulerFormEditorDefaultProps: {
|
|
|
1938
1938
|
displayName: string;
|
|
1939
1939
|
};
|
|
1940
1940
|
startError: {
|
|
1941
|
-
(props: ErrorProps):
|
|
1941
|
+
(props: ErrorProps): JSX.Element;
|
|
1942
1942
|
propTypes: {
|
|
1943
1943
|
id: Requireable<string>;
|
|
1944
1944
|
direction: Requireable<string>;
|
|
@@ -1948,9 +1948,9 @@ export declare const schedulerFormEditorDefaultProps: {
|
|
|
1948
1948
|
};
|
|
1949
1949
|
displayName: string;
|
|
1950
1950
|
};
|
|
1951
|
-
startEditor: (props: ZonedDateTimeProps) =>
|
|
1951
|
+
startEditor: (props: ZonedDateTimeProps) => JSX.Element;
|
|
1952
1952
|
startTimezoneLabel: {
|
|
1953
|
-
(props: LabelProps):
|
|
1953
|
+
(props: LabelProps): JSX.Element;
|
|
1954
1954
|
propTypes: {
|
|
1955
1955
|
id: Requireable<string>;
|
|
1956
1956
|
editorId: Requireable<string>;
|
|
@@ -1966,7 +1966,7 @@ export declare const schedulerFormEditorDefaultProps: {
|
|
|
1966
1966
|
displayName: string;
|
|
1967
1967
|
};
|
|
1968
1968
|
startTimezoneError: {
|
|
1969
|
-
(props: ErrorProps):
|
|
1969
|
+
(props: ErrorProps): JSX.Element;
|
|
1970
1970
|
propTypes: {
|
|
1971
1971
|
id: Requireable<string>;
|
|
1972
1972
|
direction: Requireable<string>;
|
|
@@ -1976,9 +1976,9 @@ export declare const schedulerFormEditorDefaultProps: {
|
|
|
1976
1976
|
};
|
|
1977
1977
|
displayName: string;
|
|
1978
1978
|
};
|
|
1979
|
-
startTimezoneEditor: (props: FieldRenderProps & ComboBoxProps) =>
|
|
1979
|
+
startTimezoneEditor: (props: FieldRenderProps & ComboBoxProps) => JSX.Element;
|
|
1980
1980
|
startTimezoneCheckedLabel: {
|
|
1981
|
-
(props: LabelProps):
|
|
1981
|
+
(props: LabelProps): JSX.Element;
|
|
1982
1982
|
propTypes: {
|
|
1983
1983
|
id: Requireable<string>;
|
|
1984
1984
|
editorId: Requireable<string>;
|
|
@@ -1995,7 +1995,7 @@ export declare const schedulerFormEditorDefaultProps: {
|
|
|
1995
1995
|
};
|
|
1996
1996
|
startTimezoneCheckedEditor: React_2.ForwardRefExoticComponent<CheckboxProps & React_2.RefAttributes<CheckboxHandle | null>>;
|
|
1997
1997
|
endLabel: {
|
|
1998
|
-
(props: LabelProps):
|
|
1998
|
+
(props: LabelProps): JSX.Element;
|
|
1999
1999
|
propTypes: {
|
|
2000
2000
|
id: Requireable<string>;
|
|
2001
2001
|
editorId: Requireable<string>;
|
|
@@ -2011,7 +2011,7 @@ export declare const schedulerFormEditorDefaultProps: {
|
|
|
2011
2011
|
displayName: string;
|
|
2012
2012
|
};
|
|
2013
2013
|
endError: {
|
|
2014
|
-
(props: ErrorProps):
|
|
2014
|
+
(props: ErrorProps): JSX.Element;
|
|
2015
2015
|
propTypes: {
|
|
2016
2016
|
id: Requireable<string>;
|
|
2017
2017
|
direction: Requireable<string>;
|
|
@@ -2021,9 +2021,9 @@ export declare const schedulerFormEditorDefaultProps: {
|
|
|
2021
2021
|
};
|
|
2022
2022
|
displayName: string;
|
|
2023
2023
|
};
|
|
2024
|
-
endEditor: (props: ZonedDateTimeProps) =>
|
|
2024
|
+
endEditor: (props: ZonedDateTimeProps) => JSX.Element;
|
|
2025
2025
|
endTimezoneLabel: {
|
|
2026
|
-
(props: LabelProps):
|
|
2026
|
+
(props: LabelProps): JSX.Element;
|
|
2027
2027
|
propTypes: {
|
|
2028
2028
|
id: Requireable<string>;
|
|
2029
2029
|
editorId: Requireable<string>;
|
|
@@ -2039,7 +2039,7 @@ export declare const schedulerFormEditorDefaultProps: {
|
|
|
2039
2039
|
displayName: string;
|
|
2040
2040
|
};
|
|
2041
2041
|
endTimezoneError: {
|
|
2042
|
-
(props: ErrorProps):
|
|
2042
|
+
(props: ErrorProps): JSX.Element;
|
|
2043
2043
|
propTypes: {
|
|
2044
2044
|
id: Requireable<string>;
|
|
2045
2045
|
direction: Requireable<string>;
|
|
@@ -2049,9 +2049,9 @@ export declare const schedulerFormEditorDefaultProps: {
|
|
|
2049
2049
|
};
|
|
2050
2050
|
displayName: string;
|
|
2051
2051
|
};
|
|
2052
|
-
endTimezoneEditor: (props: FieldRenderProps & ComboBoxProps) =>
|
|
2052
|
+
endTimezoneEditor: (props: FieldRenderProps & ComboBoxProps) => JSX.Element;
|
|
2053
2053
|
endTimezoneCheckedLabel: {
|
|
2054
|
-
(props: LabelProps):
|
|
2054
|
+
(props: LabelProps): JSX.Element;
|
|
2055
2055
|
propTypes: {
|
|
2056
2056
|
id: Requireable<string>;
|
|
2057
2057
|
editorId: Requireable<string>;
|
|
@@ -2068,7 +2068,7 @@ export declare const schedulerFormEditorDefaultProps: {
|
|
|
2068
2068
|
};
|
|
2069
2069
|
endTimezoneCheckedEditor: React_2.ForwardRefExoticComponent<CheckboxProps & React_2.RefAttributes<CheckboxHandle | null>>;
|
|
2070
2070
|
allDayLabel: {
|
|
2071
|
-
(props: LabelProps):
|
|
2071
|
+
(props: LabelProps): JSX.Element;
|
|
2072
2072
|
propTypes: {
|
|
2073
2073
|
id: Requireable<string>;
|
|
2074
2074
|
editorId: Requireable<string>;
|
|
@@ -2086,7 +2086,7 @@ export declare const schedulerFormEditorDefaultProps: {
|
|
|
2086
2086
|
allDayEditor: React_2.ForwardRefExoticComponent<CheckboxProps & React_2.RefAttributes<CheckboxHandle | null>>;
|
|
2087
2087
|
recurrenceEditor: React_2.FunctionComponent<RecurrenceEditorProps>;
|
|
2088
2088
|
descriptionLabel: {
|
|
2089
|
-
(props: LabelProps):
|
|
2089
|
+
(props: LabelProps): JSX.Element;
|
|
2090
2090
|
propTypes: {
|
|
2091
2091
|
id: Requireable<string>;
|
|
2092
2092
|
editorId: Requireable<string>;
|
|
@@ -2103,7 +2103,7 @@ export declare const schedulerFormEditorDefaultProps: {
|
|
|
2103
2103
|
};
|
|
2104
2104
|
descriptionEditor: React_2.ForwardRefExoticComponent<TextAreaProps & React_2.RefAttributes<TextAreaHandle | null>>;
|
|
2105
2105
|
descriptionError: {
|
|
2106
|
-
(props: ErrorProps):
|
|
2106
|
+
(props: ErrorProps): JSX.Element;
|
|
2107
2107
|
propTypes: {
|
|
2108
2108
|
id: Requireable<string>;
|
|
2109
2109
|
direction: Requireable<string>;
|
|
@@ -2114,7 +2114,7 @@ export declare const schedulerFormEditorDefaultProps: {
|
|
|
2114
2114
|
displayName: string;
|
|
2115
2115
|
};
|
|
2116
2116
|
resourceLabel: {
|
|
2117
|
-
(props: LabelProps):
|
|
2117
|
+
(props: LabelProps): JSX.Element;
|
|
2118
2118
|
propTypes: {
|
|
2119
2119
|
id: Requireable<string>;
|
|
2120
2120
|
editorId: Requireable<string>;
|
|
@@ -2129,7 +2129,7 @@ export declare const schedulerFormEditorDefaultProps: {
|
|
|
2129
2129
|
};
|
|
2130
2130
|
displayName: string;
|
|
2131
2131
|
};
|
|
2132
|
-
resourceEditor: (props: ResourceEditorProps) =>
|
|
2132
|
+
resourceEditor: (props: ResourceEditorProps) => JSX.Element;
|
|
2133
2133
|
};
|
|
2134
2134
|
|
|
2135
2135
|
/**
|
|
@@ -2763,7 +2763,7 @@ export declare type SchedulerItemSeriesAction = {
|
|
|
2763
2763
|
*/
|
|
2764
2764
|
export declare interface SchedulerItemsFocusAction {
|
|
2765
2765
|
type: ITEMS_FOCUS_ACTION;
|
|
2766
|
-
item?: React_2.RefObject<SchedulerItemHandle>;
|
|
2766
|
+
item?: React_2.RefObject<SchedulerItemHandle | null>;
|
|
2767
2767
|
ignoreIsAllDay?: boolean;
|
|
2768
2768
|
}
|
|
2769
2769
|
|
|
@@ -2788,7 +2788,7 @@ export declare type SchedulerItemShowRemoveDialogAction = {
|
|
|
2788
2788
|
*/
|
|
2789
2789
|
export declare interface SchedulerItemsSelectAction {
|
|
2790
2790
|
type: ITEMS_SELECT_ACTION;
|
|
2791
|
-
item?: React_2.RefObject<SchedulerItemHandle>;
|
|
2791
|
+
item?: React_2.RefObject<SchedulerItemHandle | null>;
|
|
2792
2792
|
ignoreIsAllDay?: boolean;
|
|
2793
2793
|
}
|
|
2794
2794
|
|
|
@@ -2928,141 +2928,265 @@ export declare const schedulerProportionalViewItemDefaultProps: {
|
|
|
2928
2928
|
export declare interface SchedulerProps {
|
|
2929
2929
|
/**
|
|
2930
2930
|
* Specifies the `id` of the wrapping element of the Scheduler.
|
|
2931
|
+
*
|
|
2932
|
+
* @example
|
|
2933
|
+
* ```jsx
|
|
2934
|
+
* <Scheduler id="my-scheduler" />
|
|
2935
|
+
* ```
|
|
2931
2936
|
*/
|
|
2932
2937
|
id?: string;
|
|
2933
2938
|
/**
|
|
2934
2939
|
* Specifies the `tabIndex` attribute of the wrapping element of the Scheduler.
|
|
2940
|
+
*
|
|
2941
|
+
* @example
|
|
2942
|
+
* ```jsx
|
|
2943
|
+
* <Scheduler tabIndex={0} />
|
|
2944
|
+
* ```
|
|
2935
2945
|
*/
|
|
2936
2946
|
tabIndex?: number;
|
|
2937
2947
|
/**
|
|
2938
2948
|
* Specifies the `role` attribute of the Scheduler wrapping element.
|
|
2939
2949
|
*
|
|
2940
|
-
* For more information, refer to the [Scheduler Accessibility Compliance]({% slug accessibility_scheduler %}) article
|
|
2950
|
+
* For more information, refer to the [Scheduler Accessibility Compliance]({% slug accessibility_scheduler %}) article.
|
|
2951
|
+
*
|
|
2952
|
+
* @example
|
|
2953
|
+
* ```jsx
|
|
2954
|
+
* <Scheduler role="application" />
|
|
2955
|
+
* ```
|
|
2941
2956
|
*/
|
|
2942
2957
|
role?: string;
|
|
2943
2958
|
/**
|
|
2944
2959
|
* The `aria-labelledby` attribute to be applied to the Scheduler component.
|
|
2945
2960
|
*
|
|
2946
|
-
* For more information, refer to the [Scheduler Accessibility Compliance]({% slug accessibility_scheduler %}) article
|
|
2961
|
+
* For more information, refer to the [Scheduler Accessibility Compliance]({% slug accessibility_scheduler %}) article.
|
|
2962
|
+
*
|
|
2963
|
+
* @example
|
|
2964
|
+
* ```jsx
|
|
2965
|
+
* <Scheduler ariaLabelledby="scheduler-label" />
|
|
2966
|
+
* ```
|
|
2947
2967
|
*/
|
|
2948
2968
|
ariaLabelledby?: string;
|
|
2949
2969
|
/**
|
|
2950
2970
|
* The `aria-label` attribute to be applied to the Scheduler component.
|
|
2951
2971
|
*
|
|
2952
|
-
* For more information, refer to the [Scheduler Accessibility Compliance]({% slug accessibility_scheduler %}) article
|
|
2972
|
+
* For more information, refer to the [Scheduler Accessibility Compliance]({% slug accessibility_scheduler %}) article.
|
|
2973
|
+
*
|
|
2974
|
+
* @example
|
|
2975
|
+
* ```jsx
|
|
2976
|
+
* <Scheduler ariaLabel="Scheduler component" />
|
|
2977
|
+
* ```
|
|
2953
2978
|
*/
|
|
2954
2979
|
ariaLabel?: string;
|
|
2955
2980
|
/**
|
|
2956
2981
|
* Specifies the `style` object of the wrapping element of the Scheduler.
|
|
2982
|
+
*
|
|
2983
|
+
* @example
|
|
2984
|
+
* ```jsx
|
|
2985
|
+
* <Scheduler style={{ height: '500px' }} />
|
|
2986
|
+
* ```
|
|
2957
2987
|
*/
|
|
2958
2988
|
style?: React_2.CSSProperties;
|
|
2959
2989
|
/**
|
|
2960
2990
|
* Specifies the `className` attribute of the wrapping element of the Scheduler.
|
|
2991
|
+
*
|
|
2992
|
+
* @example
|
|
2993
|
+
* ```jsx
|
|
2994
|
+
* <Scheduler className="custom-scheduler" />
|
|
2995
|
+
* ```
|
|
2961
2996
|
*/
|
|
2962
2997
|
className?: string;
|
|
2963
2998
|
/**
|
|
2964
2999
|
* Overrides the default item. Specifying the `item` property of a specific view will override this property.
|
|
2965
3000
|
*
|
|
2966
|
-
* The default component is: [SchedulerItem]({% slug api_scheduler_scheduleritem %})
|
|
3001
|
+
* The default component is: [SchedulerItem]({% slug api_scheduler_scheduleritem %}).
|
|
2967
3002
|
*
|
|
2968
3003
|
* For more information on customizing the scheduler items, refer to the [Item Customization]({% slug overview_items_scheduler %}) article.
|
|
3004
|
+
*
|
|
3005
|
+
* @example
|
|
3006
|
+
* ```jsx
|
|
3007
|
+
* const CustomItem = (props) => <div>{props.title}</div>;
|
|
3008
|
+
* <Scheduler item={CustomItem} />
|
|
3009
|
+
* ```
|
|
2969
3010
|
*/
|
|
2970
3011
|
item?: React_2.ComponentType<SchedulerItemProps>;
|
|
2971
3012
|
/**
|
|
2972
3013
|
* Overrides the default viewItem. Specifying the `viewItem` property of a specific view will override this property.
|
|
2973
3014
|
*
|
|
2974
|
-
* The default component is: [SchedulerViewItem]({% slug api_scheduler_schedulerviewitem %})
|
|
3015
|
+
* The default component is: [SchedulerViewItem]({% slug api_scheduler_schedulerviewitem %}).
|
|
2975
3016
|
*
|
|
2976
3017
|
* For more information on customizing the scheduler items, refer to the [Item Customization]({% slug overview_items_scheduler %}) article.
|
|
3018
|
+
*
|
|
3019
|
+
* @example
|
|
3020
|
+
* ```jsx
|
|
3021
|
+
* const CustomViewItem = (props) => <div>{props.title}</div>;
|
|
3022
|
+
* <Scheduler viewItem={CustomViewItem} />
|
|
3023
|
+
* ```
|
|
2977
3024
|
*/
|
|
2978
3025
|
viewItem?: React_2.ComponentType<SchedulerViewItemProps>;
|
|
2979
3026
|
/**
|
|
2980
3027
|
* Overrides the default editItem. Specifying the `editItem` property of a specific view will override this property.
|
|
2981
3028
|
*
|
|
2982
|
-
* The default component is: [SchedulerEditItem]({% slug api_scheduler_scheduleredititem %})
|
|
3029
|
+
* The default component is: [SchedulerEditItem]({% slug api_scheduler_scheduleredititem %}).
|
|
2983
3030
|
*
|
|
2984
3031
|
* For more information on customizing the scheduler items, refer to the [Item Customization]({% slug overview_items_scheduler %}) article.
|
|
3032
|
+
*
|
|
3033
|
+
* @example
|
|
3034
|
+
* ```jsx
|
|
3035
|
+
* const CustomEditItem = (props) => <div>{props.title}</div>;
|
|
3036
|
+
* <Scheduler editItem={CustomEditItem} />
|
|
3037
|
+
* ```
|
|
2985
3038
|
*/
|
|
2986
3039
|
editItem?: React_2.ComponentType<SchedulerEditItemProps>;
|
|
2987
3040
|
/**
|
|
2988
3041
|
* Overrides the default task. Specifying the `task` property of a specific view will override this property.
|
|
2989
3042
|
* Currently, the `task` is being used in the [AgendaView]({% slug agenda_view_scheduler %}) only.
|
|
2990
3043
|
*
|
|
2991
|
-
* The default component is: [SchedulerTask]({% slug api_scheduler_schedulertask %})
|
|
3044
|
+
* The default component is: [SchedulerTask]({% slug api_scheduler_schedulertask %}).
|
|
2992
3045
|
*
|
|
2993
3046
|
* For more information on customizing the scheduler tasks, refer to the [Task Customization]({% slug overview_tasks_scheduler %}) article.
|
|
3047
|
+
*
|
|
3048
|
+
* @example
|
|
3049
|
+
* ```jsx
|
|
3050
|
+
* const CustomTask = (props) => <div>{props.title}</div>;
|
|
3051
|
+
* <Scheduler task={CustomTask} />
|
|
3052
|
+
* ```
|
|
2994
3053
|
*/
|
|
2995
3054
|
task?: React_2.ComponentType<SchedulerTaskProps>;
|
|
2996
3055
|
/**
|
|
2997
3056
|
* Overrides the default viewTask. Specifying the `viewTask` property of a specific view will override this property.
|
|
2998
3057
|
* Currently, the `viewTask` is being used in the [AgendaView]({% slug agenda_view_scheduler %}) only.
|
|
2999
3058
|
*
|
|
3000
|
-
* The default component is: [SchedulerViewTask]({% slug api_scheduler_schedulerviewtask %})
|
|
3059
|
+
* The default component is: [SchedulerViewTask]({% slug api_scheduler_schedulerviewtask %}).
|
|
3001
3060
|
*
|
|
3002
3061
|
* For more information on customizing the scheduler tasks, refer to the [Task Customization]({% slug overview_tasks_scheduler %}) article.
|
|
3062
|
+
*
|
|
3063
|
+
* @example
|
|
3064
|
+
* ```jsx
|
|
3065
|
+
* const CustomViewTask = (props) => <div>{props.title}</div>;
|
|
3066
|
+
* <Scheduler viewTask={CustomViewTask} />
|
|
3067
|
+
* ```
|
|
3003
3068
|
*/
|
|
3004
3069
|
viewTask?: React_2.ComponentType<SchedulerTaskProps>;
|
|
3005
3070
|
/**
|
|
3006
3071
|
* Overrides the default editTask. Specifying the `editTask` property of a specific view will override this property.
|
|
3007
|
-
* Currently, the `
|
|
3072
|
+
* Currently, the `editTask` is being used in the [AgendaView]({% slug agenda_view_scheduler %}) only.
|
|
3008
3073
|
*
|
|
3009
|
-
* The default component is: [SchedulerEditTask]({% slug api_scheduler_scheduleredittask %})
|
|
3074
|
+
* The default component is: [SchedulerEditTask]({% slug api_scheduler_scheduleredittask %}).
|
|
3010
3075
|
*
|
|
3011
3076
|
* For more information on customizing the scheduler tasks, refer to the [Task Customization]({% slug overview_tasks_scheduler %}) article.
|
|
3077
|
+
*
|
|
3078
|
+
* @example
|
|
3079
|
+
* ```jsx
|
|
3080
|
+
* const CustomEditTask = (props) => <div>{props.title}</div>;
|
|
3081
|
+
* <Scheduler editTask={CustomEditTask} />
|
|
3082
|
+
* ```
|
|
3012
3083
|
*/
|
|
3013
3084
|
editTask?: React_2.ComponentType<SchedulerTaskProps>;
|
|
3014
3085
|
/**
|
|
3015
3086
|
* Overrides the default header component of the Scheduler.
|
|
3016
3087
|
*
|
|
3017
|
-
* The default component is: [SchedulerHeader]({% slug api_scheduler_schedulerheader %})
|
|
3088
|
+
* The default component is: [SchedulerHeader]({% slug api_scheduler_schedulerheader %}).
|
|
3018
3089
|
*
|
|
3019
3090
|
* For more information on customizing the scheduler header, refer to the [Header Customization]({% slug overview_header_footer_scheduler %}) article.
|
|
3091
|
+
*
|
|
3092
|
+
* @example
|
|
3093
|
+
* ```jsx
|
|
3094
|
+
* const CustomHeader = (props) => <div>Custom Header</div>;
|
|
3095
|
+
* <Scheduler header={CustomHeader} />
|
|
3096
|
+
* ```
|
|
3020
3097
|
*/
|
|
3021
3098
|
header?: React_2.ComponentType<SchedulerHeaderProps>;
|
|
3022
3099
|
/**
|
|
3023
3100
|
* Overrides the default footer component of the Scheduler.
|
|
3024
3101
|
*
|
|
3025
|
-
* The default component is: [
|
|
3102
|
+
* The default component is: [SchedulerFooter]({% slug api_scheduler_schedulerfooter %}).
|
|
3026
3103
|
*
|
|
3027
3104
|
* For more information on customizing the scheduler footer, refer to the [Footer Customization]({% slug overview_header_footer_scheduler %}) article.
|
|
3105
|
+
*
|
|
3106
|
+
* @example
|
|
3107
|
+
* ```jsx
|
|
3108
|
+
* const CustomFooter = (props) => <div>Custom Footer</div>;
|
|
3109
|
+
* <Scheduler footer={CustomFooter} />
|
|
3110
|
+
* ```
|
|
3028
3111
|
*/
|
|
3029
3112
|
footer?: React_2.ComponentType<SchedulerFooterProps>;
|
|
3030
3113
|
/**
|
|
3031
3114
|
* Overrides the default slot component. Specifying the `slot` property of a specific view will override this property.
|
|
3032
3115
|
*
|
|
3033
|
-
* The default component is: [SchedulerSlot]({% slug api_scheduler_schedulerslot %})
|
|
3116
|
+
* The default component is: [SchedulerSlot]({% slug api_scheduler_schedulerslot %}).
|
|
3034
3117
|
*
|
|
3035
3118
|
* For more information on customizing the scheduler slots, refer to the [Slot Customization]({% slug overview_slots_scheduler %}) article.
|
|
3119
|
+
*
|
|
3120
|
+
* @example
|
|
3121
|
+
* ```jsx
|
|
3122
|
+
* const CustomSlot = (props) => <div>{props.title}</div>;
|
|
3123
|
+
* <Scheduler slot={CustomSlot} />
|
|
3124
|
+
* ```
|
|
3036
3125
|
*/
|
|
3037
3126
|
slot?: React_2.ComponentType<SchedulerSlotProps>;
|
|
3038
3127
|
/**
|
|
3039
3128
|
* Overrides the default viewSlot component. Specifying the `viewSlot` property of a specific view will override this property.
|
|
3040
3129
|
*
|
|
3041
|
-
* The default component is: [SchedulerViewSlot]({% slug api_scheduler_schedulerviewslot %})
|
|
3130
|
+
* The default component is: [SchedulerViewSlot]({% slug api_scheduler_schedulerviewslot %}).
|
|
3042
3131
|
*
|
|
3043
3132
|
* For more information on customizing the scheduler slots, refer to the [Slot Customization]({% slug overview_slots_scheduler %}) article.
|
|
3133
|
+
*
|
|
3134
|
+
* @example
|
|
3135
|
+
* ```jsx
|
|
3136
|
+
* const CustomViewSlot = (props) => <div>{props.title}</div>;
|
|
3137
|
+
* <Scheduler viewSlot={CustomViewSlot} />
|
|
3138
|
+
* ```
|
|
3044
3139
|
*/
|
|
3045
3140
|
viewSlot?: React_2.ComponentType<SchedulerViewSlotProps>;
|
|
3046
3141
|
/**
|
|
3047
3142
|
* Overrides the default editSlot component. Specifying the `editSlot` property of a specific view will override this property.
|
|
3048
3143
|
*
|
|
3049
|
-
* The default component is: [SchedulerEditSlot]({% slug api_scheduler_schedulereditslot %})
|
|
3144
|
+
* The default component is: [SchedulerEditSlot]({% slug api_scheduler_schedulereditslot %}).
|
|
3050
3145
|
*
|
|
3051
3146
|
* For more information on customizing the scheduler slots, refer to the [Slot Customization]({% slug overview_slots_scheduler %}) article.
|
|
3147
|
+
*
|
|
3148
|
+
* @example
|
|
3149
|
+
* ```jsx
|
|
3150
|
+
* const CustomEditSlot = (props) => <div>{props.title}</div>;
|
|
3151
|
+
* <Scheduler editSlot={CustomEditSlot} />
|
|
3152
|
+
* ```
|
|
3052
3153
|
*/
|
|
3053
3154
|
editSlot?: React_2.ComponentType<SchedulerEditSlotProps>;
|
|
3054
3155
|
/** @hidden */
|
|
3055
3156
|
form?: React_2.ComponentType<SchedulerFormProps>;
|
|
3056
3157
|
/**
|
|
3057
3158
|
* Sets the currently selected view. The value is matched with the `name` property of the view.
|
|
3159
|
+
*
|
|
3160
|
+
* Sets the initially selected view. The available values are:
|
|
3161
|
+
* * `day`
|
|
3162
|
+
* * `week`
|
|
3163
|
+
* * `month`
|
|
3164
|
+
* * `agenda`
|
|
3165
|
+
* * `timeline`
|
|
3166
|
+
*
|
|
3167
|
+
* @example
|
|
3168
|
+
* ```jsx
|
|
3169
|
+
* <Scheduler view="day" />
|
|
3170
|
+
* ```
|
|
3058
3171
|
*/
|
|
3059
3172
|
view?: string;
|
|
3060
3173
|
/**
|
|
3061
|
-
* Sets the data of the Scheduler component. The data is then parsed and rendered as
|
|
3174
|
+
* Sets the data of the Scheduler component. The data is then parsed and rendered as visual Scheduler items.
|
|
3175
|
+
*
|
|
3176
|
+
* @example
|
|
3177
|
+
* ```jsx
|
|
3178
|
+
* const data = [{ id: 1, title: 'Event', start: new Date(), end: new Date() }];
|
|
3179
|
+
* <Scheduler data={data} />
|
|
3180
|
+
* ```
|
|
3062
3181
|
*/
|
|
3063
3182
|
data?: DataItem[];
|
|
3064
3183
|
/**
|
|
3065
3184
|
* Sets if the Scheduler component is editable. The value can be either a `boolean` or an Object to specify different types of editing.
|
|
3185
|
+
*
|
|
3186
|
+
* @example
|
|
3187
|
+
* ```jsx
|
|
3188
|
+
* <Scheduler editable={true} />
|
|
3189
|
+
* ```
|
|
3066
3190
|
*/
|
|
3067
3191
|
editable?: EditableProp | boolean;
|
|
3068
3192
|
/**
|
|
@@ -3076,26 +3200,59 @@ export declare interface SchedulerProps {
|
|
|
3076
3200
|
* * `month`
|
|
3077
3201
|
* * `agenda`
|
|
3078
3202
|
* * `timeline`
|
|
3203
|
+
*
|
|
3204
|
+
* @example
|
|
3205
|
+
* ```jsx
|
|
3206
|
+
* <Scheduler defaultView="week" />
|
|
3207
|
+
* ```
|
|
3079
3208
|
*/
|
|
3080
3209
|
defaultView?: string;
|
|
3081
3210
|
/**
|
|
3082
|
-
* Sets the current selected `Date`. The current selected date is passed to the selected view and transformed
|
|
3211
|
+
* Sets the current selected `Date`. The current selected date is passed to the selected view and transformed into a range.
|
|
3212
|
+
*
|
|
3213
|
+
* @example
|
|
3214
|
+
* ```jsx
|
|
3215
|
+
* <Scheduler date={new Date()} />
|
|
3216
|
+
* ```
|
|
3083
3217
|
*/
|
|
3084
3218
|
date?: Date;
|
|
3085
3219
|
/**
|
|
3086
3220
|
* Sets a default selected `Date`. The `defaultDate` property is used to specify the initial rendered date, while still remaining in an uncontrolled mode.
|
|
3221
|
+
*
|
|
3222
|
+
* @example
|
|
3223
|
+
* ```jsx
|
|
3224
|
+
* <Scheduler defaultDate={new Date()} />
|
|
3225
|
+
* ```
|
|
3087
3226
|
*/
|
|
3088
3227
|
defaultDate?: Date;
|
|
3089
3228
|
/**
|
|
3090
|
-
* Force a `rtl` mode. For more information refer to [RTL Support]({% slug globalization_scheduler %}#toc-right-to-left-support)
|
|
3229
|
+
* Force a `rtl` mode. For more information refer to [RTL Support]({% slug globalization_scheduler %}#toc-right-to-left-support).
|
|
3230
|
+
*
|
|
3231
|
+
* @example
|
|
3232
|
+
* ```jsx
|
|
3233
|
+
* <Scheduler rtl={true} />
|
|
3234
|
+
* ```
|
|
3091
3235
|
*/
|
|
3092
3236
|
rtl?: boolean;
|
|
3093
3237
|
/**
|
|
3094
3238
|
* Sets the `height` of the Scheduler.
|
|
3239
|
+
*
|
|
3240
|
+
* @example
|
|
3241
|
+
* ```jsx
|
|
3242
|
+
* <Scheduler height={600} />
|
|
3243
|
+
* ```
|
|
3095
3244
|
*/
|
|
3096
3245
|
height?: number | string;
|
|
3097
3246
|
/**
|
|
3098
3247
|
* Specify the available `view` components as `children` and the Scheduler will match the currently selected view and render it.
|
|
3248
|
+
*
|
|
3249
|
+
* @example
|
|
3250
|
+
* ```jsx
|
|
3251
|
+
* <Scheduler>
|
|
3252
|
+
* <DayView />
|
|
3253
|
+
* <WeekView />
|
|
3254
|
+
* </Scheduler>
|
|
3255
|
+
* ```
|
|
3099
3256
|
*/
|
|
3100
3257
|
children?: SchedulerView[] | SchedulerView;
|
|
3101
3258
|
/**
|
|
@@ -3103,34 +3260,75 @@ export declare interface SchedulerProps {
|
|
|
3103
3260
|
* For example, `Europe/Sofia`.
|
|
3104
3261
|
*
|
|
3105
3262
|
* Defaults to `Etc/UTC`.
|
|
3263
|
+
*
|
|
3264
|
+
* @example
|
|
3265
|
+
* ```jsx
|
|
3266
|
+
* <Scheduler timezone="Europe/Sofia" />
|
|
3267
|
+
* ```
|
|
3106
3268
|
*/
|
|
3107
3269
|
timezone?: string;
|
|
3108
3270
|
/**
|
|
3109
3271
|
* Specifies the groups of the Scheduler.
|
|
3272
|
+
*
|
|
3273
|
+
* @example
|
|
3274
|
+
* ```jsx
|
|
3275
|
+
* const group = { resources: ['Rooms'], orientation: 'horizontal' };
|
|
3276
|
+
* <Scheduler group={group} />
|
|
3277
|
+
* ```
|
|
3110
3278
|
*/
|
|
3111
3279
|
group?: SchedulerGroup;
|
|
3112
3280
|
/**
|
|
3113
3281
|
* Specifies the resources of the Scheduler.
|
|
3282
|
+
*
|
|
3283
|
+
* @example
|
|
3284
|
+
* ```jsx
|
|
3285
|
+
* const resources = [{ name: 'Rooms', data: [{ text: 'Room 1', value: 1 }] }];
|
|
3286
|
+
* <Scheduler resources={resources} />
|
|
3287
|
+
* ```
|
|
3114
3288
|
*/
|
|
3115
3289
|
resources?: SchedulerResource[];
|
|
3116
3290
|
/**
|
|
3117
3291
|
* The names of the model fields from which the Scheduler will read its data
|
|
3118
3292
|
* ([see example]({% slug data_binding_scheduler %})).
|
|
3293
|
+
*
|
|
3294
|
+
* @example
|
|
3295
|
+
* ```jsx
|
|
3296
|
+
* const modelFields = { id: 'TaskID', start: 'Start', end: 'End' };
|
|
3297
|
+
* <Scheduler modelFields={modelFields} />
|
|
3298
|
+
* ```
|
|
3119
3299
|
*/
|
|
3120
3300
|
modelFields?: SchedulerModelFields;
|
|
3121
3301
|
/**
|
|
3122
3302
|
* Called when new `date` is selected.
|
|
3303
|
+
*
|
|
3304
|
+
* @example
|
|
3305
|
+
* ```jsx
|
|
3306
|
+
* const handleDateChange = (args) => console.log(args.value);
|
|
3307
|
+
* <Scheduler onDateChange={handleDateChange} />
|
|
3308
|
+
* ```
|
|
3123
3309
|
*/
|
|
3124
3310
|
onDateChange?: (args: SchedulerDateChangeEvent) => void;
|
|
3125
3311
|
/**
|
|
3126
|
-
* Called when new `view` is selected. [(see example)]({% slug views_scheduler %}#toc-controlling-the-selected-view)
|
|
3312
|
+
* Called when new `view` is selected. [(see example)]({% slug views_scheduler %}#toc-controlling-the-selected-view).
|
|
3313
|
+
*
|
|
3314
|
+
* @example
|
|
3315
|
+
* ```jsx
|
|
3316
|
+
* const handleViewChange = (args) => console.log(args.value);
|
|
3317
|
+
* <Scheduler onViewChange={handleViewChange} />
|
|
3318
|
+
* ```
|
|
3127
3319
|
*/
|
|
3128
3320
|
onViewChange?: (args: SchedulerViewChangeEvent) => void;
|
|
3129
3321
|
/**
|
|
3130
3322
|
* Called each time when editing occurs.
|
|
3131
|
-
* To enable editing set the `editable` property to `true` or an [`EditableProp`]({% slug api_scheduler_editableprop %})
|
|
3323
|
+
* To enable editing set the `editable` property to `true` or an [`EditableProp`]({% slug api_scheduler_editableprop %}).
|
|
3132
3324
|
*
|
|
3133
3325
|
* For more information refer to the [Scheduler Editing]({% slug editing_scheduler %}) article.
|
|
3326
|
+
*
|
|
3327
|
+
* @example
|
|
3328
|
+
* ```jsx
|
|
3329
|
+
* const handleDataChange = (event) => console.log(event);
|
|
3330
|
+
* <Scheduler onDataChange={handleDataChange} />
|
|
3331
|
+
* ```
|
|
3134
3332
|
*/
|
|
3135
3333
|
onDataChange?: (event: SchedulerDataChangeEvent) => void;
|
|
3136
3334
|
}
|
|
@@ -3446,7 +3644,7 @@ export declare interface SchedulerSlotsFocusAction {
|
|
|
3446
3644
|
*/
|
|
3447
3645
|
export declare interface SchedulerSlotsSelectAction {
|
|
3448
3646
|
type: SLOTS_SELECT_ACTION;
|
|
3449
|
-
slot?: React_2.RefObject<SchedulerSlotHandle>;
|
|
3647
|
+
slot?: React_2.RefObject<SchedulerSlotHandle | null>;
|
|
3450
3648
|
}
|
|
3451
3649
|
|
|
3452
3650
|
/**
|