@progress/kendo-react-scheduler 10.2.0-develop.2 → 10.2.0-develop.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/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 +25 -25
- package/index.d.ts +25 -25
- 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
|
|
|
@@ -3446,7 +3446,7 @@ export declare interface SchedulerSlotsFocusAction {
|
|
|
3446
3446
|
*/
|
|
3447
3447
|
export declare interface SchedulerSlotsSelectAction {
|
|
3448
3448
|
type: SLOTS_SELECT_ACTION;
|
|
3449
|
-
slot?: React_2.RefObject<SchedulerSlotHandle>;
|
|
3449
|
+
slot?: React_2.RefObject<SchedulerSlotHandle | null>;
|
|
3450
3450
|
}
|
|
3451
3451
|
|
|
3452
3452
|
/**
|
package/index.d.ts
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
|
|
|
@@ -3446,7 +3446,7 @@ export declare interface SchedulerSlotsFocusAction {
|
|
|
3446
3446
|
*/
|
|
3447
3447
|
export declare interface SchedulerSlotsSelectAction {
|
|
3448
3448
|
type: SLOTS_SELECT_ACTION;
|
|
3449
|
-
slot?: React_2.RefObject<SchedulerSlotHandle>;
|
|
3449
|
+
slot?: React_2.RefObject<SchedulerSlotHandle | null>;
|
|
3450
3450
|
}
|
|
3451
3451
|
|
|
3452
3452
|
/**
|
|
@@ -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 me=require("react"),he=require("./SchedulerItem.js"),m=require("../utils/index.js"),D=require("../views/common/utils.js"),I=require("../constants/index.js"),fe=require("@progress/kendo-react-intl"),J=require("./SchedulerItemContent.js"),P=require("@progress/kendo-react-common"),H=require("@progress/kendo-svg-icons"),Q=require("../context/SchedulerViewContext.js"),ge=require("../context/SchedulerContext.js"),Se=require("../hooks/useRowSync.js");function Re(e){const w=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const S in e)if(S!=="default"){const x=Object.getOwnPropertyDescriptor(e,S);Object.defineProperty(w,S,x.get?x:{enumerable:!0,get:()=>e[S]})}}return w.default=e,Object.freeze(w)}const r=Re(me),Ie=1,U=25,X=r.forwardRef((e,w)=>{const{item:S,_ref:x,itemRef:Z,...ee}=e,M=r.useRef(),o=r.useRef(null),C=r.useRef(null),k=r.useRef(null);r.useImperativeHandle(C,()=>({props:e,element:o.current&&o.current.element})),r.useImperativeHandle(w,()=>C.current),r.useImperativeHandle(x,()=>o.current),r.useImperativeHandle(Z,()=>o.current);const te=S||Y.item,b=fe.useInternationalization(),[re]=Q.useSchedulerViewItemsContext(),[ne]=Q.useSchedulerViewSlotsContext(),_=ge.useSchedulerElementContext(),[ce,V]=r.useState(!0),[ie,oe]=r.useState(!1),W=r.useRef(0),f=r.useRef(null),g=r.useRef([]),p=P.useDir(_),B=r.useMemo(()=>e.isAllDay?b.toString(e.zonedStart,"t"):b.format("{0:t} - {1:t}",e.zonedStart,e.zonedEnd),[b,e.isAllDay,e.zonedEnd,e.zonedStart]),N=r.useMemo(()=>`(${B}): ${e.title}`,[B,e.title]),se=(c,n)=>{let i=0;return n.forEach(l=>{l._order!==void 0&&l._order!==null&&i<l._order&&(i=l._order)}),i+1},le=(c,n,i)=>{const[l,h]=n,a=new Date(Math.min(h.props.end.getTime()-i,Math.max(e.start.getTime(),l.props.start.getTime()))),R=new Date(Math.max(a.getTime()+i,Math.min(e.end.getTime(),h.props.end.getTime())));return c.filter(u=>{const E=Math.max(Math.min(h.props.end.getTime()-i,u.props.start.getTime()),l.props.start.getTime()),T=Math.min(Math.max(E+i,u.props.end.getTime()),h.props.end.getTime());return u.props.id!==e.id&&u.props.group.index===e.group.index&&u.props.range.index===e.range.index&&(e.ignoreIsAllDay||u.props.isAllDay===e.isAllDay)&&m.intersects(new Date(E),new Date(T),a,R)&&m.intersects(l.props.start,h.props.end,u.props.start,u.props.end)})},ae=(c,n)=>c.group.index===n.group.index&&c.range.index===n.range.index&&(e.ignoreIsAllDay||c.isAllDay===n.isAllDay),z=()=>{var G,L,K;const c=ne.filter(t=>t.current&&ae(t.current.props,e)).sort((t,v)=>t.current.props.start.getTime()-v.current.props.start.getTime()),n=c.filter(t=>m.intersects(t.current.props.start,t.current.props.end,e.start,e.end)),i=o.current&&o.current.element;if(!i||!n.length)return;const l=m.first(c),h=m.last(c),a=m.first(n),R=m.last(n);if(!a.current||!o.current||!R.current||!l.current||!h.current)return;if(!m.intersects(a.current.props.start,R.current.props.end,e.start,e.end)){V(!1);return}const O=[],u=[],E=[],T=D.getRect(a.current.element),A=(e.vertical?T.height:T.width)/(a.current.props.end.getTime()-a.current.props.start.getTime()),F=(e.vertical?U:8)/A,y=(Math.min(e.start.getTime(),R.current.props.end.getTime()-F)-a.current.props.start.getTime())*A,$=Math.floor(Math.min(e.end.getTime(),R.current.props.end.getTime())-Math.max(e.start.getTime(),a.current.props.start.getTime()))*A;(re||[]).forEach(t=>{t.current&&(t.current.props.dragHint?u.push(t.current):t.current.props.resizeHint?E.push(t.current):O.push(t.current))}),g.current=le(O,[l.current,h.current],F),f.current=e.resizeHint||e.dragHint?0:m.calculateProportionalOrder(o.current,g.current);let d=1;e.resizeHint||e.dragHint||(d=se(o.current,g.current),g.current.forEach(t=>{t._maxSiblingsPerSlot&&d<t._maxSiblingsPerSlot&&(d=t._maxSiblingsPerSlot)}),g.current.forEach(t=>{t._maxSiblingsPerSlot!==void 0&&t._maxSiblingsPerSlot!==null&&t._maxSiblingsPerSlot<d&&(t._maxSiblingsPerSlot=d)}));let q=0;const s=T;g.current.forEach(t=>{let v=0;t._order!==void 0&&t._order!==null&&t._order<f.current&&(v=D.getRect(t.element).top+D.getRect(t.element).height-s.top-I.BORDER_WIDTH*f.current+Ie),v>q&&(q=v)});const de=20;s.width=e.vertical?s.width/d-I.BORDER_WIDTH-de/d:$-I.BORDER_WIDTH,s.height=e.vertical?$-I.BORDER_WIDTH:(e.resizeHint||e.dragHint)&&d<=1?s.height:e.style&&e.style.height?e.style.height:U,s.left=e.vertical?s.left+((G=f.current)!=null?G:0)+I.BORDER_WIDTH*((L=f.current)!=null?L:0)*s.width:s.left+(y<0?0:y),s.top=e.vertical?s.top+(y<0?0:y):s.top+q+I.BORDER_WIDTH*((K=f.current)!=null?K:0),W.current=d,D.setRect(i,s),oe(!0),V(!0)},j=r.useCallback(c=>{const n=c&&c[0],i=k.current;M.current!==void 0&&window.cancelAnimationFrame(M.current),i&&n&&(i.width!==n.contentRect.width||i.height!==n.contentRect.height)&&(M.current=window.requestAnimationFrame(()=>{z()})),k.current={width:n.contentRect.width,height:n.contentRect.height}},[z]);r.useEffect(z);const ue=o.current&&o.current.element?o.current.element.closest(".k-scheduler-layout"):null;return Se.useRowSync({element:ue,selector:".k-resource-row",horizontalAttribute:"data-depth-index",verticalAttribute:"data-resource-index",applyTo:".k-resource-cell",syncHeight:e.isLast}),r.useEffect(()=>{if(!_.current)return;const c=window.ResizeObserver,n=c&&new c(j);return n&&n.observe(_.current),()=>{n&&n.disconnect()}},[j,_]),r.createElement(te,{...ee,_ref:o,_order:f,_maxSiblingsPerSlot:W,_siblings:g,itemRef:o,style:{visibility:ie?void 0:"hidden",display:ce?void 0:"none",...e.style}},!e.resizeHint&&r.createElement("span",{className:"k-event-actions"},e.tail&&r.createElement(P.IconWrap,{name:p==="rtl"?"caret-alt-right":"caret-alt-left",icon:p==="rtl"?H.caretAltRightIcon:H.caretAltLeftIcon}),e.isRecurring&&!e.isException&&r.createElement(P.IconWrap,{name:"reload",icon:H.arrowRotateCwIcon}),!e.isRecurring&&e.isException&&r.createElement(P.IconWrap,{name:"non-recurrence",icon:H.nonRecurrenceIcon})),!e.resizeHint&&r.createElement("div",{title:N},!e.isAllDay&&r.createElement(J.SchedulerItemContent,{className:"k-event-time"},N),r.createElement(J.SchedulerItemContent,null,e.title)))}),Y={item:he.SchedulerItem};X.displayName="KendoReactSchedulerProportionalViewItem";exports.SchedulerProportionalViewItem=X;exports.schedulerProportionalViewItemDefaultProps=Y;
|
|
8
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const me=require("react"),he=require("./SchedulerItem.js"),m=require("../utils/index.js"),D=require("../views/common/utils.js"),I=require("../constants/index.js"),fe=require("@progress/kendo-react-intl"),J=require("./SchedulerItemContent.js"),P=require("@progress/kendo-react-common"),H=require("@progress/kendo-svg-icons"),Q=require("../context/SchedulerViewContext.js"),ge=require("../context/SchedulerContext.js"),Se=require("../hooks/useRowSync.js");function Re(e){const w=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const S in e)if(S!=="default"){const x=Object.getOwnPropertyDescriptor(e,S);Object.defineProperty(w,S,x.get?x:{enumerable:!0,get:()=>e[S]})}}return w.default=e,Object.freeze(w)}const r=Re(me),Ie=1,U=25,X=r.forwardRef((e,w)=>{const{item:S,_ref:x,itemRef:Z,...ee}=e,M=r.useRef(void 0),o=r.useRef(null),C=r.useRef(null),k=r.useRef(null);r.useImperativeHandle(C,()=>({props:e,element:o.current&&o.current.element})),r.useImperativeHandle(w,()=>C.current),r.useImperativeHandle(x,()=>o.current),r.useImperativeHandle(Z,()=>o.current);const te=S||Y.item,b=fe.useInternationalization(),[re]=Q.useSchedulerViewItemsContext(),[ne]=Q.useSchedulerViewSlotsContext(),_=ge.useSchedulerElementContext(),[ce,V]=r.useState(!0),[ie,oe]=r.useState(!1),W=r.useRef(0),f=r.useRef(null),g=r.useRef([]),p=P.useDir(_),B=r.useMemo(()=>e.isAllDay?b.toString(e.zonedStart,"t"):b.format("{0:t} - {1:t}",e.zonedStart,e.zonedEnd),[b,e.isAllDay,e.zonedEnd,e.zonedStart]),N=r.useMemo(()=>`(${B}): ${e.title}`,[B,e.title]),se=(c,n)=>{let i=0;return n.forEach(l=>{l._order!==void 0&&l._order!==null&&i<l._order&&(i=l._order)}),i+1},le=(c,n,i)=>{const[l,h]=n,a=new Date(Math.min(h.props.end.getTime()-i,Math.max(e.start.getTime(),l.props.start.getTime()))),R=new Date(Math.max(a.getTime()+i,Math.min(e.end.getTime(),h.props.end.getTime())));return c.filter(u=>{const E=Math.max(Math.min(h.props.end.getTime()-i,u.props.start.getTime()),l.props.start.getTime()),T=Math.min(Math.max(E+i,u.props.end.getTime()),h.props.end.getTime());return u.props.id!==e.id&&u.props.group.index===e.group.index&&u.props.range.index===e.range.index&&(e.ignoreIsAllDay||u.props.isAllDay===e.isAllDay)&&m.intersects(new Date(E),new Date(T),a,R)&&m.intersects(l.props.start,h.props.end,u.props.start,u.props.end)})},ae=(c,n)=>c.group.index===n.group.index&&c.range.index===n.range.index&&(e.ignoreIsAllDay||c.isAllDay===n.isAllDay),z=()=>{var G,L,K;const c=ne.filter(t=>t.current&&ae(t.current.props,e)).sort((t,v)=>t.current.props.start.getTime()-v.current.props.start.getTime()),n=c.filter(t=>m.intersects(t.current.props.start,t.current.props.end,e.start,e.end)),i=o.current&&o.current.element;if(!i||!n.length)return;const l=m.first(c),h=m.last(c),a=m.first(n),R=m.last(n);if(!a.current||!o.current||!R.current||!l.current||!h.current)return;if(!m.intersects(a.current.props.start,R.current.props.end,e.start,e.end)){V(!1);return}const O=[],u=[],E=[],T=D.getRect(a.current.element),A=(e.vertical?T.height:T.width)/(a.current.props.end.getTime()-a.current.props.start.getTime()),F=(e.vertical?U:8)/A,y=(Math.min(e.start.getTime(),R.current.props.end.getTime()-F)-a.current.props.start.getTime())*A,$=Math.floor(Math.min(e.end.getTime(),R.current.props.end.getTime())-Math.max(e.start.getTime(),a.current.props.start.getTime()))*A;(re||[]).forEach(t=>{t.current&&(t.current.props.dragHint?u.push(t.current):t.current.props.resizeHint?E.push(t.current):O.push(t.current))}),g.current=le(O,[l.current,h.current],F),f.current=e.resizeHint||e.dragHint?0:m.calculateProportionalOrder(o.current,g.current);let d=1;e.resizeHint||e.dragHint||(d=se(o.current,g.current),g.current.forEach(t=>{t._maxSiblingsPerSlot&&d<t._maxSiblingsPerSlot&&(d=t._maxSiblingsPerSlot)}),g.current.forEach(t=>{t._maxSiblingsPerSlot!==void 0&&t._maxSiblingsPerSlot!==null&&t._maxSiblingsPerSlot<d&&(t._maxSiblingsPerSlot=d)}));let q=0;const s=T;g.current.forEach(t=>{let v=0;t._order!==void 0&&t._order!==null&&t._order<f.current&&(v=D.getRect(t.element).top+D.getRect(t.element).height-s.top-I.BORDER_WIDTH*f.current+Ie),v>q&&(q=v)});const de=20;s.width=e.vertical?s.width/d-I.BORDER_WIDTH-de/d:$-I.BORDER_WIDTH,s.height=e.vertical?$-I.BORDER_WIDTH:(e.resizeHint||e.dragHint)&&d<=1?s.height:e.style&&e.style.height?e.style.height:U,s.left=e.vertical?s.left+((G=f.current)!=null?G:0)+I.BORDER_WIDTH*((L=f.current)!=null?L:0)*s.width:s.left+(y<0?0:y),s.top=e.vertical?s.top+(y<0?0:y):s.top+q+I.BORDER_WIDTH*((K=f.current)!=null?K:0),W.current=d,D.setRect(i,s),oe(!0),V(!0)},j=r.useCallback(c=>{const n=c&&c[0],i=k.current;M.current!==void 0&&window.cancelAnimationFrame(M.current),i&&n&&(i.width!==n.contentRect.width||i.height!==n.contentRect.height)&&(M.current=window.requestAnimationFrame(()=>{z()})),k.current={width:n.contentRect.width,height:n.contentRect.height}},[z]);r.useEffect(z);const ue=o.current&&o.current.element?o.current.element.closest(".k-scheduler-layout"):null;return Se.useRowSync({element:ue,selector:".k-resource-row",horizontalAttribute:"data-depth-index",verticalAttribute:"data-resource-index",applyTo:".k-resource-cell",syncHeight:e.isLast}),r.useEffect(()=>{if(!_.current)return;const c=window.ResizeObserver,n=c&&new c(j);return n&&n.observe(_.current),()=>{n&&n.disconnect()}},[j,_]),r.createElement(te,{...ee,_ref:o,_order:f,_maxSiblingsPerSlot:W,_siblings:g,itemRef:o,style:{visibility:ie?void 0:"hidden",display:ce?void 0:"none",...e.style}},!e.resizeHint&&r.createElement("span",{className:"k-event-actions"},e.tail&&r.createElement(P.IconWrap,{name:p==="rtl"?"caret-alt-right":"caret-alt-left",icon:p==="rtl"?H.caretAltRightIcon:H.caretAltLeftIcon}),e.isRecurring&&!e.isException&&r.createElement(P.IconWrap,{name:"reload",icon:H.arrowRotateCwIcon}),!e.isRecurring&&e.isException&&r.createElement(P.IconWrap,{name:"non-recurrence",icon:H.nonRecurrenceIcon})),!e.resizeHint&&r.createElement("div",{title:N},!e.isAllDay&&r.createElement(J.SchedulerItemContent,{className:"k-event-time"},N),r.createElement(J.SchedulerItemContent,null,e.title)))}),Y={item:he.SchedulerItem};X.displayName="KendoReactSchedulerProportionalViewItem";exports.SchedulerProportionalViewItem=X;exports.schedulerProportionalViewItemDefaultProps=Y;
|
|
@@ -19,7 +19,7 @@ import { useSchedulerElementContext as Ie } from "../context/SchedulerContext.mj
|
|
|
19
19
|
import { useRowSync as Te } from "../hooks/useRowSync.mjs";
|
|
20
20
|
const Ee = 1, j = 25, _e = r.forwardRef(
|
|
21
21
|
(e, J) => {
|
|
22
|
-
const { item: Q, _ref: U, itemRef: X, ...Y } = e, E = r.useRef(), o = r.useRef(null), D = r.useRef(null), b = r.useRef(null);
|
|
22
|
+
const { item: Q, _ref: U, itemRef: X, ...Y } = e, E = r.useRef(void 0), o = r.useRef(null), D = r.useRef(null), b = r.useRef(null);
|
|
23
23
|
r.useImperativeHandle(D, () => ({ props: e, element: o.current && o.current.element })), r.useImperativeHandle(J, () => D.current), r.useImperativeHandle(U, () => o.current), r.useImperativeHandle(X, () => o.current);
|
|
24
24
|
const Z = Q || ye.item, _ = fe(), [ee] = xe(), [te] = Re(), x = Ie(), [re, p] = r.useState(!0), [ne, ie] = r.useState(!1), C = r.useRef(0), f = r.useRef(null), h = r.useRef([]), O = he(x), k = r.useMemo(
|
|
25
25
|
() => e.isAllDay ? _.toString(e.zonedStart, "t") : _.format("{0:t} - {1:t}", e.zonedStart, e.zonedEnd),
|
|
@@ -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 ne=require("react"),re=require("./SchedulerItem.js"),I=require("../utils/index.js"),_=require("../views/common/utils.js"),h=require("../constants/index.js"),ie=require("@progress/kendo-react-intl"),M=require("./SchedulerItemContent.js"),w=require("@progress/kendo-react-common"),b=require("@progress/kendo-svg-icons"),ce=require("../hooks/useRowSync.js"),le=require("../hooks/useEditable.js"),N=require("../context/SchedulerViewContext.js"),se=require("../context/SchedulerContext.js");function oe(e){const f=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const d in e)if(d!=="default"){const S=Object.getOwnPropertyDescriptor(e,d);Object.defineProperty(f,d,S.get?S:{enumerable:!0,get:()=>e[d]})}}return f.default=e,Object.freeze(f)}const t=oe(ne),ae=1,j=t.forwardRef((e,f)=>{const{item:d,_ref:S,itemRef:$,...L}=e,E=t.useRef(),c=t.useRef(null),A=t.useRef(null),q=t.useRef(null),G=le.useEditable(e.editable);t.useImperativeHandle(A,()=>({props:e,element:c.current&&c.current.element})),t.useImperativeHandle(f,()=>A.current),t.useImperativeHandle(S,()=>c.current),t.useImperativeHandle($,()=>c.current);const K=d||F.item,
|
|
8
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const ne=require("react"),re=require("./SchedulerItem.js"),I=require("../utils/index.js"),_=require("../views/common/utils.js"),h=require("../constants/index.js"),ie=require("@progress/kendo-react-intl"),M=require("./SchedulerItemContent.js"),w=require("@progress/kendo-react-common"),b=require("@progress/kendo-svg-icons"),ce=require("../hooks/useRowSync.js"),le=require("../hooks/useEditable.js"),N=require("../context/SchedulerViewContext.js"),se=require("../context/SchedulerContext.js");function oe(e){const f=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const d in e)if(d!=="default"){const S=Object.getOwnPropertyDescriptor(e,d);Object.defineProperty(f,d,S.get?S:{enumerable:!0,get:()=>e[d]})}}return f.default=e,Object.freeze(f)}const t=oe(ne),ae=1,j=t.forwardRef((e,f)=>{const{item:d,_ref:S,itemRef:$,...L}=e,E=t.useRef(void 0),c=t.useRef(null),A=t.useRef(null),q=t.useRef(null),G=le.useEditable(e.editable);t.useImperativeHandle(A,()=>({props:e,element:c.current&&c.current.element})),t.useImperativeHandle(f,()=>A.current),t.useImperativeHandle(S,()=>c.current),t.useImperativeHandle($,()=>c.current);const K=d||F.item,v=ie.useInternationalization(),[J]=N.useSchedulerViewItemsContext(),[Q]=N.useSchedulerViewSlotsContext(),R=se.useSchedulerElementContext(),[U,y]=t.useState(!0),[X,Y]=t.useState(!1),u=t.useRef(e.order),P=t.useRef(0),T=w.useDir(R),C=t.useMemo(()=>e.isAllDay?v.toString(e.zonedStart,"t"):v.format("{0:t} - {1:t}",e.zonedStart,e.zonedEnd),[v,e.isAllDay,e.zonedEnd,e.zonedStart]),k=t.useMemo(()=>`(${C}): ${e.title}`,[C,e.title]),V=(n,r)=>{let l=1;return n.forEach(i=>{const a=r.filter(g=>D(i.current.props,g.props));a.length>l&&(l=a.length)}),l},Z=(n,r)=>n.map(i=>r.filter(a=>D(i.current.props,a.props))),D=(n,r)=>I.intersects(n.start,n.end,r.start,r.end)&&n.group.index===r.group.index&&n.range.index===r.range.index&&(e.ignoreIsAllDay||n.isAllDay===r.isAllDay),H=()=>{const n=(Q||[]).filter(s=>s.current&&D(s.current.props,e)),r=c.current&&c.current.element,l=I.first(n);if(n.length===0){y(!1);return}if(!l.current||!r)return;const i=_.getRect(l.current.element),a=[],g=[],x=[];(J||[]).forEach(s=>{s.current&&(s.current.props.dragHint?g.push(s.current):s.current.props.resizeHint?x.push(s.current):a.push(s.current))}),u.current=e.dragHint||e.resizeHint?I.calculateOrder(c.current,e.dragHint?g:x,n,e.ignoreIsAllDay):e.order||0;let m=e.dragHint||e.resizeHint?V(n,e.dragHint?g:x):V(n,a);const ee=Z(n,a);let z=0;if(ee.forEach(s=>{let O=0;s.forEach(o=>{I.intersects(o.props.start,o.props.end,e.start,e.end)&&!(e.dragHint||e.resizeHint)&&o._maxSiblingsPerSlot&&o._maxSiblingsPerSlot>m&&o.element!==r&&(m=o._maxSiblingsPerSlot);const B=_.getRect(o.element);o.props.order!==null&&o.props.order<u.current&&(O=B.top+B.height-i.top-h.BORDER_WIDTH*u.current+ae)}),O>z&&(z=O)}),n.length===0){y(!1);return}const te=G.add?20:0;i.width=e.vertical?i.width/m-h.BORDER_WIDTH-te/m:i.width*n.length-h.BORDER_WIDTH,i.height=e.vertical?i.height*n.length-h.BORDER_WIDTH:(e.resizeHint||e.dragHint)&&m<=1?i.height:e.style&&e.style.height?e.style.height:25,i.left=e.vertical?i.left+u.current*i.width+h.BORDER_WIDTH*u.current:i.left,i.top=e.vertical?i.top:i.top+z+h.BORDER_WIDTH*u.current,P.current=m,_.setRect(r,i),Y(!0),y(!0)},W=t.useCallback(n=>{const r=n&&n[0],l=q.current;E.current!==void 0&&window.cancelAnimationFrame(E.current),l&&r&&(l.width!==r.contentRect.width||l.height!==r.contentRect.height)&&(E.current=window.requestAnimationFrame(()=>{H()})),q.current={width:r.contentRect.width,height:r.contentRect.height}},[H]);t.useEffect(H);const p=c.current&&c.current.element?c.current.element.closest(".k-scheduler-layout"):null;return ce.useRowSync({element:p,selector:".k-resource-row",horizontalAttribute:"data-depth-index",verticalAttribute:"data-resource-index",applyTo:".k-resource-cell",syncHeight:e.isLast}),t.useEffect(()=>{if(!R.current)return;const n=window.ResizeObserver,r=n&&new n(W);return r&&r.observe(R.current),()=>{r&&r.disconnect()}},[W,R]),t.createElement(K,{...L,_ref:c,_maxSiblingsPerSlot:P,_order:u,itemRef:c,style:{visibility:X?void 0:"hidden",display:U?void 0:"none",...e.style}},!e.resizeHint&&t.createElement("span",{className:"k-event-actions"},e.tail&&t.createElement(w.IconWrap,{name:T==="rtl"?"caret-alt-right":"caret-alt-left",icon:T==="rtl"?b.caretAltRightIcon:b.caretAltLeftIcon}),e.isRecurring&&!e.isException&&t.createElement(w.IconWrap,{name:"arrow-rotate-cw",icon:b.arrowRotateCwIcon}),!e.isRecurring&&e.isException&&t.createElement(w.IconWrap,{name:"arrows-no-repeat",icon:b.arrowsNoRepeatIcon})),!e.resizeHint&&t.createElement("div",{title:k},!e.isAllDay&&t.createElement(M.SchedulerItemContent,{className:"k-event-time"},k),t.createElement(M.SchedulerItemContent,null,e.title)))}),F={item:re.SchedulerItem};j.displayName="KendoReactSchedulerViewItem";exports.SchedulerViewItem=j;exports.schedulerViewItemDefaultProps=F;
|
|
@@ -20,7 +20,7 @@ import { useSchedulerViewItemsContext as ue, useSchedulerViewSlotsContext as me
|
|
|
20
20
|
import { useSchedulerElementContext as de } from "../context/SchedulerContext.mjs";
|
|
21
21
|
const fe = 1, he = t.forwardRef(
|
|
22
22
|
(e, N) => {
|
|
23
|
-
const { item: F, _ref: M, itemRef: L, ...W } = e, g = t.useRef(), l = t.useRef(null), H = t.useRef(null), z = t.useRef(null), $ = ae(e.editable);
|
|
23
|
+
const { item: F, _ref: M, itemRef: L, ...W } = e, g = t.useRef(void 0), l = t.useRef(null), H = t.useRef(null), z = t.useRef(null), $ = ae(e.editable);
|
|
24
24
|
t.useImperativeHandle(H, () => ({ props: e, element: l.current && l.current.element })), t.useImperativeHandle(N, () => H.current), t.useImperativeHandle(M, () => l.current), t.useImperativeHandle(L, () => l.current);
|
|
25
25
|
const q = F || ge.item, S = ne(), [B] = ue(), [G] = me(), h = de(), [K, w] = t.useState(!0), [j, J] = t.useState(!1), u = t.useRef(e.order), x = t.useRef(0), A = re(h), D = t.useMemo(
|
|
26
26
|
() => e.isAllDay ? S.toString(e.zonedStart, "t") : S.format("{0:t} - {1:t}", e.zonedStart, e.zonedEnd),
|
|
@@ -39,31 +39,31 @@ const fe = 1, he = t.forwardRef(
|
|
|
39
39
|
}
|
|
40
40
|
if (!c.current || !r)
|
|
41
41
|
return;
|
|
42
|
-
const i = T(c.current.element), a = [], f = [],
|
|
42
|
+
const i = T(c.current.element), a = [], f = [], v = [];
|
|
43
43
|
(B || []).forEach((s) => {
|
|
44
|
-
s.current && (s.current.props.dragHint ? f.push(s.current) : s.current.props.resizeHint ?
|
|
44
|
+
s.current && (s.current.props.dragHint ? f.push(s.current) : s.current.props.resizeHint ? v.push(s.current) : a.push(s.current));
|
|
45
45
|
}), u.current = e.dragHint || e.resizeHint ? ee(
|
|
46
46
|
l.current,
|
|
47
|
-
e.dragHint ? f :
|
|
47
|
+
e.dragHint ? f : v,
|
|
48
48
|
n,
|
|
49
49
|
e.ignoreIsAllDay
|
|
50
50
|
) : e.order || 0;
|
|
51
|
-
let m = e.dragHint || e.resizeHint ? _(n, e.dragHint ? f :
|
|
51
|
+
let m = e.dragHint || e.resizeHint ? _(n, e.dragHint ? f : v) : _(n, a);
|
|
52
52
|
const X = Q(n, a);
|
|
53
|
-
let
|
|
53
|
+
let b = 0;
|
|
54
54
|
if (X.forEach((s) => {
|
|
55
55
|
let E = 0;
|
|
56
56
|
s.forEach((o) => {
|
|
57
57
|
k(o.props.start, o.props.end, e.start, e.end) && !(e.dragHint || e.resizeHint) && o._maxSiblingsPerSlot && o._maxSiblingsPerSlot > m && o.element !== r && (m = o._maxSiblingsPerSlot);
|
|
58
58
|
const O = T(o.element);
|
|
59
59
|
o.props.order !== null && o.props.order < u.current && (E = O.top + O.height - i.top - d * u.current + fe);
|
|
60
|
-
}), E >
|
|
60
|
+
}), E > b && (b = E);
|
|
61
61
|
}), n.length === 0) {
|
|
62
62
|
w(!1);
|
|
63
63
|
return;
|
|
64
64
|
}
|
|
65
65
|
const Y = $.add ? 20 : 0;
|
|
66
|
-
i.width = e.vertical ? i.width / m - d - Y / m : i.width * n.length - d, i.height = e.vertical ? i.height * n.length - d : (e.resizeHint || e.dragHint) && m <= 1 ? i.height : e.style && e.style.height ? e.style.height : 25, i.left = e.vertical ? i.left + u.current * i.width + d * u.current : i.left, i.top = e.vertical ? i.top : i.top +
|
|
66
|
+
i.width = e.vertical ? i.width / m - d - Y / m : i.width * n.length - d, i.height = e.vertical ? i.height * n.length - d : (e.resizeHint || e.dragHint) && m <= 1 ? i.height : e.style && e.style.height ? e.style.height : 25, i.left = e.vertical ? i.left + u.current * i.width + d * u.current : i.left, i.top = e.vertical ? i.top : i.top + b + d * u.current, x.current = m, te(r, i), J(!0), w(!0);
|
|
67
67
|
}, C = t.useCallback(
|
|
68
68
|
(n) => {
|
|
69
69
|
const r = n && n[0], c = z.current;
|
package/package-metadata.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 e={name:"@progress/kendo-react-scheduler",productName:"KendoReact",productCode:"KENDOUIREACT",productCodes:["KENDOUIREACT"],publishDate:
|
|
8
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e={name:"@progress/kendo-react-scheduler",productName:"KendoReact",productCode:"KENDOUIREACT",productCodes:["KENDOUIREACT"],publishDate: 1744271665,version:"10.2.0-develop.4",licensingDocsUrl:"https://www.telerik.com/kendo-react-ui"};exports.packageMetadata=e;
|
package/package-metadata.mjs
CHANGED
|
@@ -10,8 +10,8 @@ const e = {
|
|
|
10
10
|
productName: "KendoReact",
|
|
11
11
|
productCode: "KENDOUIREACT",
|
|
12
12
|
productCodes: ["KENDOUIREACT"],
|
|
13
|
-
publishDate:
|
|
14
|
-
version: "10.2.0-develop.
|
|
13
|
+
publishDate: 1744271665,
|
|
14
|
+
version: "10.2.0-develop.4",
|
|
15
15
|
licensingDocsUrl: "https://www.telerik.com/kendo-react-ui"
|
|
16
16
|
};
|
|
17
17
|
export {
|