@progress/kendo-react-scheduler 9.2.0-develop.8 → 9.2.0

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/index.d.ts CHANGED
@@ -13,6 +13,7 @@ import { DateFormatOptions } from '@progress/kendo-react-intl';
13
13
  import { DatePickerCloseEvent } from '@progress/kendo-react-dateinputs';
14
14
  import { DatePickerOpenEvent } from '@progress/kendo-react-dateinputs';
15
15
  import { DatePickerProps } from '@progress/kendo-react-dateinputs';
16
+ import { DateRange as DateRange_2 } from '../..';
16
17
  import { DateTimePickerCloseEvent } from '@progress/kendo-react-dateinputs';
17
18
  import { DateTimePickerOpenEvent } from '@progress/kendo-react-dateinputs';
18
19
  import { DateTimePickerProps } from '@progress/kendo-react-dateinputs';
@@ -36,10 +37,27 @@ import { LocalizationService } from '@progress/kendo-react-intl';
36
37
  import { MultiSelectProps } from '@progress/kendo-react-dropdowns';
37
38
  import * as React_2 from 'react';
38
39
  import { ReactNodeLike } from 'prop-types';
40
+ import { RecurrenceEditorProps } from '../recurrence/RecurrenceEditor';
39
41
  import { Requireable } from 'prop-types';
42
+ import { ResourceEditorProps } from './ResourceEditor';
43
+ import { SchedulerFooterHandle as SchedulerFooterHandle_2 } from './components/footer/SchedulerFooter';
44
+ import { SchedulerFormHandle as SchedulerFormHandle_2 } from '../components/SchedulerForm';
45
+ import { SchedulerHeaderHandle as SchedulerHeaderHandle_2 } from './components/header/SchedulerHeader';
46
+ import { SchedulerItemHandle as SchedulerItemHandle_2 } from '../../items/SchedulerItem';
47
+ import { SchedulerNavigationHandle } from './components/header/navigation/SchedulerNavigation';
48
+ import { SchedulerNavigationProps } from './components/header/navigation/SchedulerNavigation';
49
+ import { SchedulerOccurrenceDialogHandle as SchedulerOccurrenceDialogHandle_2 } from '../components/SchedulerOccurrenceDialog';
50
+ import { SchedulerRemoveDialogHandle as SchedulerRemoveDialogHandle_2 } from '../components/SchedulerRemoveDialog';
51
+ import { SchedulerTaskHandle as SchedulerTaskHandle_2 } from './SchedulerTask';
52
+ import { SchedulerViewDateRangeArgs as SchedulerViewDateRangeArgs_2 } from '../..';
53
+ import { SchedulerViewItemHandle as SchedulerViewItemHandle_2 } from '../../items/SchedulerViewItem';
54
+ import { SchedulerViewItemHandle as SchedulerViewItemHandle_3 } from './SchedulerViewItem';
55
+ import { SchedulerViewSelectorHandle } from './components/header/view-selector/SchedulerViewSelector';
56
+ import { SchedulerViewSelectorProps } from './components/header/view-selector/SchedulerViewSelector';
57
+ import { SchedulerViewSlotHandle as SchedulerViewSlotHandle_2 } from './SchedulerViewSlot';
58
+ import { SchedulerViewTaskHandle as SchedulerViewTaskHandle_2 } from './SchedulerViewTask';
40
59
  import { TextAreaHandle } from '@progress/kendo-react-inputs';
41
60
  import { TextAreaProps } from '@progress/kendo-react-inputs';
42
- import { ToolbarItemProps } from '@progress/kendo-react-buttons';
43
61
  import { ToolbarProps } from '@progress/kendo-react-buttons';
44
62
  import { ZonedDate } from '@progress/kendo-date-math';
45
63
 
@@ -248,7 +266,7 @@ export declare const dayViewDefaultProps: {
248
266
  selectedDateFormat: string;
249
267
  selectedShortDateFormat: string;
250
268
  currentTimeMarker: boolean;
251
- dateRange: ({ date, numberOfDays, timezone }: SchedulerViewDateRangeArgs) => DateRange;
269
+ dateRange: ({ date, numberOfDays, timezone }: SchedulerViewDateRangeArgs_2) => DateRange_2;
252
270
  startTime: string;
253
271
  endTime: string;
254
272
  isWorkDayStart: string;
@@ -890,16 +908,6 @@ declare interface Range_2 {
890
908
  }
891
909
  export { Range_2 as Range }
892
910
 
893
- /** @hidden */
894
- declare interface RecurrenceEditorProps {
895
- value: string;
896
- start: Date;
897
- timezone: string;
898
- onChange: ({ value }: {
899
- value: string | null;
900
- }) => void;
901
- }
902
-
903
911
  /**
904
912
  * Represents the available `action` types for the `SchedulerItemRemoveItemAction` objects.
905
913
  *
@@ -951,17 +959,6 @@ export declare interface Resource {
951
959
  multiple?: boolean;
952
960
  }
953
961
 
954
- /** @hidden */
955
- declare interface ResourceEditorProps extends FieldRenderProps {
956
- resource: SchedulerResource;
957
- data: any[];
958
- textField: string;
959
- valueField: string;
960
- colorField?: string;
961
- multiple?: boolean;
962
- validationMessage: string;
963
- }
964
-
965
962
  /**
966
963
  * Represents the [KendoReact Scheduler component]({% slug overview_scheduler %})
967
964
  *
@@ -1111,8 +1108,8 @@ export declare const schedulerDefaultProps: {
1111
1108
  tabIndex: number;
1112
1109
  editable: boolean;
1113
1110
  defaultDate: Date;
1114
- header: React_2.ForwardRefExoticComponent<SchedulerHeaderProps & React_2.RefAttributes<SchedulerHeaderHandle>>;
1115
- footer: React_2.ForwardRefExoticComponent<SchedulerFooterProps & React_2.RefAttributes<SchedulerFooterHandle>>;
1111
+ header: React_2.ForwardRefExoticComponent<SchedulerHeaderProps & React_2.RefAttributes<SchedulerHeaderHandle_2>>;
1112
+ footer: React_2.ForwardRefExoticComponent<SchedulerFooterProps & React_2.RefAttributes<SchedulerFooterHandle_2>>;
1116
1113
  navigation: React_2.ForwardRefExoticComponent<SchedulerNavigationProps & React_2.RefAttributes<SchedulerNavigationHandle>>;
1117
1114
  viewSelector: React_2.ForwardRefExoticComponent<SchedulerViewSelectorProps & React_2.RefAttributes<SchedulerViewSelectorHandle>>;
1118
1115
  };
@@ -1123,8 +1120,8 @@ export declare const schedulerDefaultProps: {
1123
1120
  export declare const SchedulerDrag: React_2.FunctionComponent<SchedulerDragProps>;
1124
1121
 
1125
1122
  export declare const schedulerDragDefaultProps: {
1126
- viewItem: React_2.ForwardRefExoticComponent<SchedulerViewItemProps & React_2.RefAttributes<SchedulerViewItemHandle>>;
1127
- item: React_2.ForwardRefExoticComponent<SchedulerItemProps & React_2.RefAttributes<SchedulerItemHandle>>;
1123
+ viewItem: React_2.ForwardRefExoticComponent<SchedulerViewItemProps & React_2.RefAttributes<SchedulerViewItemHandle_2>>;
1124
+ item: React_2.ForwardRefExoticComponent<SchedulerItemProps & React_2.RefAttributes<SchedulerItemHandle_2>>;
1128
1125
  };
1129
1126
 
1130
1127
  /**
@@ -1185,12 +1182,12 @@ export declare const SchedulerEditItem: React_2.ForwardRefExoticComponent<Schedu
1185
1182
  export declare type SchedulerEditItemAction = SchedulerItemFormItemAction | SchedulerItemDragItemAction | SchedulerItemResizeItemAction | SchedulerItemRemoveItemAction | SchedulerItemShowRemoveDialogAction | SchedulerItemShowOccurrenceDialogAction | SchedulerItemSeriesAction | SchedulerItemsFocusAction | SchedulerItemsSelectAction | SchedulerSlotsFocusAction | SchedulerSlotsSelectAction | null | false | undefined;
1186
1183
 
1187
1184
  export declare const schedulerEditItemDefaultProps: {
1188
- viewItem: React_2.ForwardRefExoticComponent<SchedulerViewItemProps & React_2.RefAttributes<SchedulerViewItemHandle>>;
1185
+ viewItem: React_2.ForwardRefExoticComponent<SchedulerViewItemProps & React_2.RefAttributes<SchedulerViewItemHandle_3>>;
1189
1186
  drag: React_2.FunctionComponent<SchedulerDragProps>;
1190
1187
  resize: React_2.FunctionComponent<SchedulerResizeProps>;
1191
- form: React_2.ForwardRefExoticComponent<SchedulerFormProps & React_2.RefAttributes<SchedulerFormHandle | null>>;
1192
- occurrenceDialog: React_2.ForwardRefExoticComponent<SchedulerOccurrenceDialogProps & React_2.RefAttributes<SchedulerOccurrenceDialogHandle | null>>;
1193
- removeDialog: React_2.ForwardRefExoticComponent<SchedulerRemoveDialogProps & React_2.RefAttributes<SchedulerRemoveDialogHandle | null>>;
1188
+ form: React_2.ForwardRefExoticComponent<SchedulerFormProps & React_2.RefAttributes<SchedulerFormHandle_2 | null>>;
1189
+ occurrenceDialog: React_2.ForwardRefExoticComponent<SchedulerOccurrenceDialogProps & React_2.RefAttributes<SchedulerOccurrenceDialogHandle_2 | null>>;
1190
+ removeDialog: React_2.ForwardRefExoticComponent<SchedulerRemoveDialogProps & React_2.RefAttributes<SchedulerRemoveDialogHandle_2 | null>>;
1194
1191
  onClickAction: (event: SchedulerItemMouseEvent, _: SchedulerEditItemProps, state: SchedulerEditItemState) => SchedulerEditItemAction[];
1195
1192
  onDoubleClickAction: (_: any, props: SchedulerEditItemProps) => (false | {
1196
1193
  type: FORM_ITEM_ACTION;
@@ -1696,8 +1693,8 @@ export declare interface SchedulerEditItemStateChangeEvent<T> {
1696
1693
  export declare const SchedulerEditSlot: React_2.ForwardRefExoticComponent<SchedulerEditSlotProps & React_2.RefAttributes<SchedulerEditSlotHandle>>;
1697
1694
 
1698
1695
  export declare const schedulerEditSlotDefaultProps: {
1699
- viewSlot: React_2.ForwardRefExoticComponent<SchedulerViewSlotProps & React_2.RefAttributes<SchedulerViewSlotHandle>>;
1700
- form: React_2.ForwardRefExoticComponent<SchedulerFormProps & React_2.RefAttributes<SchedulerFormHandle | null>>;
1696
+ viewSlot: React_2.ForwardRefExoticComponent<SchedulerViewSlotProps & React_2.RefAttributes<SchedulerViewSlotHandle_2>>;
1697
+ form: React_2.ForwardRefExoticComponent<SchedulerFormProps & React_2.RefAttributes<SchedulerFormHandle_2 | null>>;
1701
1698
  };
1702
1699
 
1703
1700
  /**
@@ -1771,9 +1768,9 @@ export declare type SchedulerEditSlotPropsContextType = SchedulerEditSlotProps;
1771
1768
  export declare const SchedulerEditTask: React_2.ForwardRefExoticComponent<SchedulerEditTaskProps & React_2.RefAttributes<SchedulerEditTaskHandle>>;
1772
1769
 
1773
1770
  export declare const schedulerEditTaskDefaultProps: {
1774
- viewTask: React_2.ForwardRefExoticComponent<SchedulerViewTaskProps & React_2.RefAttributes<SchedulerViewTaskHandle>>;
1775
- occurrenceDialog: React_2.ForwardRefExoticComponent<SchedulerOccurrenceDialogProps & React_2.RefAttributes<SchedulerOccurrenceDialogHandle | null>>;
1776
- removeDialog: React_2.ForwardRefExoticComponent<SchedulerRemoveDialogProps & React_2.RefAttributes<SchedulerRemoveDialogHandle | null>>;
1771
+ viewTask: React_2.ForwardRefExoticComponent<SchedulerViewTaskProps & React_2.RefAttributes<SchedulerViewTaskHandle_2>>;
1772
+ occurrenceDialog: React_2.ForwardRefExoticComponent<SchedulerOccurrenceDialogProps & React_2.RefAttributes<SchedulerOccurrenceDialogHandle_2 | null>>;
1773
+ removeDialog: React_2.ForwardRefExoticComponent<SchedulerRemoveDialogProps & React_2.RefAttributes<SchedulerRemoveDialogHandle_2 | null>>;
1777
1774
  };
1778
1775
 
1779
1776
  /**
@@ -1901,8 +1898,8 @@ export declare const schedulerFormEditorDefaultProps: {
1901
1898
  propTypes: {
1902
1899
  id: Requireable<string>;
1903
1900
  editorId: Requireable<string>;
1904
- editorRef: Requireable<NonNullable<((...args: any[]) => any) | InferProps<{
1905
- current: Requireable<any>;
1901
+ editorRef: Requireable<NonNullable<((...args: any[]) => any) | InferProps< {
1902
+ current: Requireable<any>;
1906
1903
  }> | null | undefined>>;
1907
1904
  editorValid: Requireable<boolean>;
1908
1905
  editorDisabled: Requireable<boolean>;
@@ -1932,8 +1929,8 @@ export declare const schedulerFormEditorDefaultProps: {
1932
1929
  propTypes: {
1933
1930
  id: Requireable<string>;
1934
1931
  editorId: Requireable<string>;
1935
- editorRef: Requireable<NonNullable<((...args: any[]) => any) | InferProps<{
1936
- current: Requireable<any>;
1932
+ editorRef: Requireable<NonNullable<((...args: any[]) => any) | InferProps< {
1933
+ current: Requireable<any>;
1937
1934
  }> | null | undefined>>;
1938
1935
  editorValid: Requireable<boolean>;
1939
1936
  editorDisabled: Requireable<boolean>;
@@ -1963,8 +1960,8 @@ export declare const schedulerFormEditorDefaultProps: {
1963
1960
  propTypes: {
1964
1961
  id: Requireable<string>;
1965
1962
  editorId: Requireable<string>;
1966
- editorRef: Requireable<NonNullable<((...args: any[]) => any) | InferProps<{
1967
- current: Requireable<any>;
1963
+ editorRef: Requireable<NonNullable<((...args: any[]) => any) | InferProps< {
1964
+ current: Requireable<any>;
1968
1965
  }> | null | undefined>>;
1969
1966
  editorValid: Requireable<boolean>;
1970
1967
  editorDisabled: Requireable<boolean>;
@@ -1994,8 +1991,8 @@ export declare const schedulerFormEditorDefaultProps: {
1994
1991
  propTypes: {
1995
1992
  id: Requireable<string>;
1996
1993
  editorId: Requireable<string>;
1997
- editorRef: Requireable<NonNullable<((...args: any[]) => any) | InferProps<{
1998
- current: Requireable<any>;
1994
+ editorRef: Requireable<NonNullable<((...args: any[]) => any) | InferProps< {
1995
+ current: Requireable<any>;
1999
1996
  }> | null | undefined>>;
2000
1997
  editorValid: Requireable<boolean>;
2001
1998
  editorDisabled: Requireable<boolean>;
@@ -2011,8 +2008,8 @@ export declare const schedulerFormEditorDefaultProps: {
2011
2008
  propTypes: {
2012
2009
  id: Requireable<string>;
2013
2010
  editorId: Requireable<string>;
2014
- editorRef: Requireable<NonNullable<((...args: any[]) => any) | InferProps<{
2015
- current: Requireable<any>;
2011
+ editorRef: Requireable<NonNullable<((...args: any[]) => any) | InferProps< {
2012
+ current: Requireable<any>;
2016
2013
  }> | null | undefined>>;
2017
2014
  editorValid: Requireable<boolean>;
2018
2015
  editorDisabled: Requireable<boolean>;
@@ -2042,8 +2039,8 @@ export declare const schedulerFormEditorDefaultProps: {
2042
2039
  propTypes: {
2043
2040
  id: Requireable<string>;
2044
2041
  editorId: Requireable<string>;
2045
- editorRef: Requireable<NonNullable<((...args: any[]) => any) | InferProps<{
2046
- current: Requireable<any>;
2042
+ editorRef: Requireable<NonNullable<((...args: any[]) => any) | InferProps< {
2043
+ current: Requireable<any>;
2047
2044
  }> | null | undefined>>;
2048
2045
  editorValid: Requireable<boolean>;
2049
2046
  editorDisabled: Requireable<boolean>;
@@ -2073,8 +2070,8 @@ export declare const schedulerFormEditorDefaultProps: {
2073
2070
  propTypes: {
2074
2071
  id: Requireable<string>;
2075
2072
  editorId: Requireable<string>;
2076
- editorRef: Requireable<NonNullable<((...args: any[]) => any) | InferProps<{
2077
- current: Requireable<any>;
2073
+ editorRef: Requireable<NonNullable<((...args: any[]) => any) | InferProps< {
2074
+ current: Requireable<any>;
2078
2075
  }> | null | undefined>>;
2079
2076
  editorValid: Requireable<boolean>;
2080
2077
  editorDisabled: Requireable<boolean>;
@@ -2090,8 +2087,8 @@ export declare const schedulerFormEditorDefaultProps: {
2090
2087
  propTypes: {
2091
2088
  id: Requireable<string>;
2092
2089
  editorId: Requireable<string>;
2093
- editorRef: Requireable<NonNullable<((...args: any[]) => any) | InferProps<{
2094
- current: Requireable<any>;
2090
+ editorRef: Requireable<NonNullable<((...args: any[]) => any) | InferProps< {
2091
+ current: Requireable<any>;
2095
2092
  }> | null | undefined>>;
2096
2093
  editorValid: Requireable<boolean>;
2097
2094
  editorDisabled: Requireable<boolean>;
@@ -2108,8 +2105,8 @@ export declare const schedulerFormEditorDefaultProps: {
2108
2105
  propTypes: {
2109
2106
  id: Requireable<string>;
2110
2107
  editorId: Requireable<string>;
2111
- editorRef: Requireable<NonNullable<((...args: any[]) => any) | InferProps<{
2112
- current: Requireable<any>;
2108
+ editorRef: Requireable<NonNullable<((...args: any[]) => any) | InferProps< {
2109
+ current: Requireable<any>;
2113
2110
  }> | null | undefined>>;
2114
2111
  editorValid: Requireable<boolean>;
2115
2112
  editorDisabled: Requireable<boolean>;
@@ -2139,8 +2136,8 @@ export declare const schedulerFormEditorDefaultProps: {
2139
2136
  propTypes: {
2140
2137
  id: Requireable<string>;
2141
2138
  editorId: Requireable<string>;
2142
- editorRef: Requireable<NonNullable<((...args: any[]) => any) | InferProps<{
2143
- current: Requireable<any>;
2139
+ editorRef: Requireable<NonNullable<((...args: any[]) => any) | InferProps< {
2140
+ current: Requireable<any>;
2144
2141
  }> | null | undefined>>;
2145
2142
  editorValid: Requireable<boolean>;
2146
2143
  editorDisabled: Requireable<boolean>;
@@ -2330,7 +2327,7 @@ export declare interface SchedulerFormEditorProps extends Omit_2<FormElementProp
2330
2327
  *
2331
2328
  * For more information, please refer to the [`Scheduler Form Editor Customization`]({% slug overview_customization_form_editor_scheduler %}) article.
2332
2329
  */
2333
- recurrenceEditor?: React_2.ComponentType<TargetlessChangeEvent<any & FieldProps, string>>;
2330
+ recurrenceEditor?: React_2.ComponentType<TargetlessChangeEvent<FieldProps, string>>;
2334
2331
  /**
2335
2332
  * Overrides the component used for visualizing the `description` field label.
2336
2333
  * The [KendoReact Label]({% slug label_labels %}) component is used, by default.
@@ -2876,25 +2873,6 @@ export declare interface SchedulerModelFields {
2876
2873
  recurrenceExceptions?: string;
2877
2874
  }
2878
2875
 
2879
- /**
2880
- * Represents the object which is returned from the `ref` callback of the [SchedulerNavigation]({% slug api_scheduler_schedulernavigation %}).
2881
- *
2882
- * For more information about Refs, refer to the [React Refs & Dom](https://react.dev/learn/referencing-values-with-refs#refs-and-the-dom) article.
2883
- */
2884
- /** @hidden */
2885
- declare interface SchedulerNavigationHandle {
2886
- props: SchedulerNavigationProps;
2887
- element: HTMLSpanElement | null;
2888
- }
2889
-
2890
- /**
2891
- * Represents the props of the KendoReact [SchedulerNavigation]({% slug api_scheduler_schedulernavigation %}) component.
2892
- */
2893
- /** @hidden */
2894
- declare interface SchedulerNavigationProps extends ToolbarItemProps {
2895
- children?: React_2.ReactNode;
2896
- }
2897
-
2898
2876
  /**
2899
2877
  * Represents the default `occurrenceDialog` component rendered by the [KendoReact SchedulerEditItem component]({% slug api_scheduler_scheduleredititem %}).
2900
2878
  */
@@ -3244,8 +3222,8 @@ export declare interface SchedulerRemoveDialogStateChangeEvent<T> {
3244
3222
  export declare const SchedulerResize: React_2.FunctionComponent<SchedulerResizeProps>;
3245
3223
 
3246
3224
  export declare const schedulerResizeDefaultProps: {
3247
- viewItem: React_2.ForwardRefExoticComponent<SchedulerViewItemProps & React_2.RefAttributes<SchedulerViewItemHandle>>;
3248
- item: React_2.ForwardRefExoticComponent<SchedulerItemProps & React_2.RefAttributes<SchedulerItemHandle>>;
3225
+ viewItem: React_2.ForwardRefExoticComponent<SchedulerViewItemProps & React_2.RefAttributes<SchedulerViewItemHandle_2>>;
3226
+ item: React_2.ForwardRefExoticComponent<SchedulerItemProps & React_2.RefAttributes<SchedulerItemHandle_2>>;
3249
3227
  };
3250
3228
 
3251
3229
  /**
@@ -3684,25 +3662,6 @@ export declare const SchedulerViewsContext: React_2.Context<SchedulerViewsContex
3684
3662
  */
3685
3663
  export declare type SchedulerViewsContextType = SchedulerView[];
3686
3664
 
3687
- /**
3688
- * Represents the object which is returned from the `ref` callback of the [SchedulerViewSelector]({% slug api_scheduler_schedulerviewselector %}).
3689
- *
3690
- * For more information about Refs, refer to the [React Refs & Dom](https://react.dev/learn/referencing-values-with-refs#refs-and-the-dom) article.
3691
- */
3692
- /** @hidden */
3693
- declare interface SchedulerViewSelectorHandle {
3694
- element: HTMLSpanElement | null;
3695
- props: SchedulerViewSelectorProps;
3696
- }
3697
-
3698
- /**
3699
- * Represents the props of the KendoReact [SchedulerViewSelector]({% slug api_scheduler_schedulerviewselector %}) component.
3700
- */
3701
- /** @hidden */
3702
- declare interface SchedulerViewSelectorProps extends ToolbarItemProps {
3703
- children?: React_2.ReactNode;
3704
- }
3705
-
3706
3665
  /**
3707
3666
  * Represents the default `viewSlot` component rendered by the [KendoReact Scheduler component]({% slug overview_scheduler %}).
3708
3667
  *
@@ -3750,7 +3709,7 @@ export declare interface SchedulerViewSlotProps extends SchedulerSlotProps {
3750
3709
  export declare const SchedulerViewTask: React_2.ForwardRefExoticComponent<SchedulerViewTaskProps & React_2.RefAttributes<SchedulerViewTaskHandle>>;
3751
3710
 
3752
3711
  export declare const schedulerViewTaskDefaultProps: {
3753
- task: React_2.ForwardRefExoticComponent<SchedulerTaskProps & React_2.RefAttributes<SchedulerTaskHandle>>;
3712
+ task: React_2.ForwardRefExoticComponent<SchedulerTaskProps & React_2.RefAttributes<SchedulerTaskHandle_2>>;
3754
3713
  };
3755
3714
 
3756
3715
  /**
@@ -3973,7 +3932,7 @@ export declare const timeLineViewDefaultProps: {
3973
3932
  selectedDateFormat: string;
3974
3933
  selectedShortDateFormat: string;
3975
3934
  currentTimeMarker: boolean;
3976
- dateRange: ({ date, numberOfDays, timezone }: SchedulerViewDateRangeArgs) => DateRange;
3935
+ dateRange: ({ date, numberOfDays, timezone }: SchedulerViewDateRangeArgs_2) => DateRange_2;
3977
3936
  startTime: string;
3978
3937
  endTime: string;
3979
3938
  isWorkDayStart: string;
@@ -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 client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const se=require("react"),le=require("./SchedulerItem.js"),f=require("../utils/index.js"),E=require("../views/common/utils.js"),g=require("../constants/index.js"),ae=require("@progress/kendo-react-intl"),L=require("./SchedulerItemContent.js"),P=require("@progress/kendo-react-common"),H=require("@progress/kendo-svg-icons"),p=require("../context/SchedulerViewContext.js"),ue=require("../context/SchedulerContext.js"),de=require("../hooks/useRowSync.js");function me(e){const S=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const h in e)if(h!=="default"){const T=Object.getOwnPropertyDescriptor(e,h);Object.defineProperty(S,h,T.get?T:{enumerable:!0,get:()=>e[h]})}}return S.default=e,Object.freeze(S)}const t=me(se),he=1,G=t.forwardRef((e,S)=>{const{item:h,_ref:T,itemRef:J,...Q}=e,b=t.useRef(),o=t.useRef(null),M=t.useRef(null),q=t.useRef(null);t.useImperativeHandle(M,()=>({props:e,element:o.current&&o.current.element})),t.useImperativeHandle(S,()=>M.current),t.useImperativeHandle(T,()=>o.current),t.useImperativeHandle(J,()=>o.current);const U=h||K.item,z=ae.useInternationalization(),[X]=p.useSchedulerViewItemsContext(),[Y]=p.useSchedulerViewSlotsContext(),v=ue.useSchedulerElementContext(),[Z,C]=t.useState(!0),[ee,te]=t.useState(!1),k=t.useRef(0),d=t.useRef(null),m=t.useRef([]),W=P.useDir(v),V=t.useMemo(()=>e.isAllDay?z.toString(e.zonedStart,"t"):z.format("{0:t} - {1:t}",e.zonedStart,e.zonedEnd),[z,e.isAllDay,e.zonedEnd,e.zonedStart]),B=t.useMemo(()=>`(${V}): ${e.title}`,[V,e.title]),re=(i,n)=>{let c=0;return n.forEach(s=>{s._order!==void 0&&s._order!==null&&c<s._order&&(c=s._order)}),c+1},ne=(i,n,c)=>{const[s,R]=n,D=new Date(Math.max(e.start.getTime(),s.props.start.getTime())),_=new Date(Math.min(e.end.getTime(),R.props.end.getTime())),I=new Date(Math.max(D.getTime()+c,_.getTime()));return i.filter(l=>{const w=Math.max(l.props.start.getTime(),s.props.start.getTime()),u=Math.min(Math.max(w+c,l.props.end.getTime()),_.getTime());return l.props.id!==e.id&&l.props.group.index===e.group.index&&l.props.range.index===e.range.index&&(e.ignoreIsAllDay||l.props.isAllDay===e.isAllDay)&&f.intersects(new Date(w),new Date(u),D,I)&&f.intersects(s.props.start,R.props.end,l.props.start,l.props.end)})},ce=(i,n)=>i.group.index===n.group.index&&i.range.index===n.range.index&&(e.ignoreIsAllDay||i.isAllDay===n.isAllDay),O=()=>{var N,F,$;const i=(Y||[]).filter(r=>r.current&&ce(r.current.props,e)).sort((r,x)=>r.current.props.start.getTime()-x.current.props.start.getTime()),n=o.current&&o.current.element;if(!n||!i.length)return;const c=f.first(i),s=f.last(i);if(!c.current||!o.current||!s.current)return;if(!f.intersects(c.current.props.start,s.current.props.end,e.start,e.end)){C(!1);return}const R=[],D=[],_=[],I=E.getRect(c.current.element),y=(e.vertical?I.height:I.width)/(c.current.props.end.getTime()-c.current.props.start.getTime()),l=(e.start.getTime()-c.current.props.start.getTime())*y,w=(Math.min(e.end.getTime(),s.current.props.end.getTime())-Math.max(e.start.getTime(),c.current.props.start.getTime()))*y;(X||[]).forEach(r=>{r.current&&(r.current.props.dragHint?D.push(r.current):r.current.props.resizeHint?_.push(r.current):R.push(r.current))}),m.current=ne(R,[c.current,s.current],25/y),d.current=e.resizeHint||e.dragHint?0:f.calculateProportionalOrder(o.current,m.current);let u=1;e.resizeHint||e.dragHint||(u=re(o.current,m.current),m.current.forEach(r=>{r._maxSiblingsPerSlot&&u<r._maxSiblingsPerSlot&&(u=r._maxSiblingsPerSlot)}),m.current.forEach(r=>{r._maxSiblingsPerSlot!==void 0&&r._maxSiblingsPerSlot!==null&&r._maxSiblingsPerSlot<u&&(r._maxSiblingsPerSlot=u)}));let A=0;const a=I;m.current.forEach(r=>{let x=0;r._order!==void 0&&r._order!==null&&r._order<d.current&&(x=E.getRect(r.element).top+E.getRect(r.element).height-a.top-g.BORDER_WIDTH*d.current+he),x>A&&(A=x)});const oe=20;a.width=e.vertical?a.width/u-g.BORDER_WIDTH-oe/u:w+g.BORDER_WIDTH,a.height=e.vertical?w-g.BORDER_WIDTH:(e.resizeHint||e.dragHint)&&u<=1?a.height:e.style&&e.style.height?e.style.height:25,a.left=e.vertical?a.left+((N=d.current)!=null?N:0)+g.BORDER_WIDTH*((F=d.current)!=null?F:0)*a.width:a.left+(l<0?0:l),a.top=e.vertical?a.top+(l<0?0:l):a.top+A+g.BORDER_WIDTH*(($=d.current)!=null?$:0),k.current=u,E.setRect(n,a),te(!0),C(!0)},j=t.useCallback(i=>{const n=i&&i[0],c=q.current;b.current!==void 0&&window.cancelAnimationFrame(b.current),c&&n&&(c.width!==n.contentRect.width||c.height!==n.contentRect.height)&&(b.current=window.requestAnimationFrame(()=>{O()})),q.current={width:n.contentRect.width,height:n.contentRect.height}},[O]);t.useEffect(O);const ie=o.current&&o.current.element?o.current.element.closest(".k-scheduler-layout"):null;return de.useRowSync({element:ie,selector:".k-resource-row",horizontalAttribute:"data-depth-index",verticalAttribute:"data-resource-index",applyTo:".k-resource-cell",syncHeight:e.isLast}),t.useEffect(()=>{if(!v.current)return;const i=window.ResizeObserver,n=i&&new i(j);return n&&n.observe(v.current),()=>{n&&n.disconnect()}},[j,v]),t.createElement(U,{...Q,_ref:o,_order:d,_maxSiblingsPerSlot:k,_siblings:m,itemRef:o,style:{visibility:ee?void 0:"hidden",display:Z?void 0:"none",...e.style}},!e.resizeHint&&t.createElement("span",{className:"k-event-actions"},e.tail&&t.createElement(P.IconWrap,{name:W==="rtl"?"caret-alt-right":"caret-alt-left",icon:W==="rtl"?H.caretAltRightIcon:H.caretAltLeftIcon}),e.isRecurring&&!e.isException&&t.createElement(P.IconWrap,{name:"reload",icon:H.arrowRotateCwIcon}),!e.isRecurring&&e.isException&&t.createElement(P.IconWrap,{name:"non-recurrence",icon:H.nonRecurrenceIcon})),!e.resizeHint&&t.createElement("div",{title:B},!e.isAllDay&&t.createElement(L.SchedulerItemContent,{className:"k-event-time"},B),t.createElement(L.SchedulerItemContent,null,e.title)))}),K={item:le.SchedulerItem};G.displayName="KendoReactSchedulerProportionalViewItem";exports.SchedulerProportionalViewItem=G;exports.schedulerProportionalViewItemDefaultProps=K;
8
+ "use client";"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;
@@ -6,124 +6,138 @@
6
6
  *-------------------------------------------------------------------------------------------
7
7
  */
8
8
  "use client";
9
- import * as t from "react";
10
- import { SchedulerItem as ne } from "./SchedulerItem.mjs";
11
- import { first as ie, last as ce, intersects as D, calculateProportionalOrder as oe } from "../utils/index.mjs";
12
- import { getRect as P, setRect as se } from "../views/common/utils.mjs";
13
- import { BORDER_WIDTH as f } from "../constants/index.mjs";
14
- import { useInternationalization as le } from "@progress/kendo-react-intl";
15
- import { SchedulerItemContent as p } from "./SchedulerItemContent.mjs";
16
- import { useDir as ae, IconWrap as z } from "@progress/kendo-react-common";
17
- import { caretAltRightIcon as ue, caretAltLeftIcon as me, arrowRotateCwIcon as de, nonRecurrenceIcon as fe } from "@progress/kendo-svg-icons";
18
- import { useSchedulerViewItemsContext as he, useSchedulerViewSlotsContext as ge } from "../context/SchedulerViewContext.mjs";
19
- import { useSchedulerElementContext as Se } from "../context/SchedulerContext.mjs";
20
- import { useRowSync as we } from "../hooks/useRowSync.mjs";
21
- const xe = 1, Re = t.forwardRef(
22
- (e, L) => {
23
- const { item: $, _ref: q, itemRef: B, ...G } = e, T = t.useRef(), o = t.useRef(null), A = t.useRef(null), H = t.useRef(null);
24
- t.useImperativeHandle(A, () => ({ props: e, element: o.current && o.current.element })), t.useImperativeHandle(L, () => A.current), t.useImperativeHandle(q, () => o.current), t.useImperativeHandle(B, () => o.current);
25
- const K = $ || ve.item, E = le(), [j] = he(), [J] = ge(), x = Se(), [Q, M] = t.useState(!0), [U, X] = t.useState(!1), b = t.useRef(0), m = t.useRef(null), d = t.useRef([]), C = ae(x), O = t.useMemo(
26
- () => e.isAllDay ? E.toString(e.zonedStart, "t") : E.format("{0:t} - {1:t}", e.zonedStart, e.zonedEnd),
27
- [E, e.isAllDay, e.zonedEnd, e.zonedStart]
28
- ), k = t.useMemo(() => `(${O}): ${e.title}`, [O, e.title]), Y = (c, n) => {
29
- let i = 0;
30
- return n.forEach((s) => {
31
- s._order !== void 0 && s._order !== null && i < s._order && (i = s._order);
32
- }), i + 1;
33
- }, Z = (c, n, i) => {
34
- const [s, h] = n, R = new Date(Math.max(e.start.getTime(), s.props.start.getTime())), v = new Date(Math.min(e.end.getTime(), h.props.end.getTime())), g = new Date(Math.max(R.getTime() + i, v.getTime()));
35
- return c.filter((l) => {
36
- const S = Math.max(l.props.start.getTime(), s.props.start.getTime()), u = Math.min(
37
- Math.max(S + i, l.props.end.getTime()),
38
- v.getTime()
9
+ import * as r from "react";
10
+ import { SchedulerItem as ue } from "./SchedulerItem.mjs";
11
+ import { intersects as T, first as q, last as B, calculateProportionalOrder as me } from "../utils/index.mjs";
12
+ import { getRect as z, setRect as de } from "../views/common/utils.mjs";
13
+ import { BORDER_WIDTH as S } from "../constants/index.mjs";
14
+ import { useInternationalization as fe } from "@progress/kendo-react-intl";
15
+ import { SchedulerItemContent as K } from "./SchedulerItemContent.mjs";
16
+ import { useDir as he, IconWrap as A } from "@progress/kendo-react-common";
17
+ import { caretAltRightIcon as ge, caretAltLeftIcon as Se, arrowRotateCwIcon as we, nonRecurrenceIcon as ve } from "@progress/kendo-svg-icons";
18
+ import { useSchedulerViewItemsContext as xe, useSchedulerViewSlotsContext as Re } from "../context/SchedulerViewContext.mjs";
19
+ import { useSchedulerElementContext as Ie } from "../context/SchedulerContext.mjs";
20
+ import { useRowSync as Te } from "../hooks/useRowSync.mjs";
21
+ const Ee = 1, j = 25, _e = r.forwardRef(
22
+ (e, J) => {
23
+ const { item: Q, _ref: U, itemRef: X, ...Y } = e, E = r.useRef(), o = r.useRef(null), D = r.useRef(null), b = r.useRef(null);
24
+ 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);
25
+ 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(
26
+ () => e.isAllDay ? _.toString(e.zonedStart, "t") : _.format("{0:t} - {1:t}", e.zonedStart, e.zonedEnd),
27
+ [_, e.isAllDay, e.zonedEnd, e.zonedStart]
28
+ ), V = r.useMemo(() => `(${k}): ${e.title}`, [k, e.title]), ce = (i, n) => {
29
+ let c = 0;
30
+ return n.forEach((l) => {
31
+ l._order !== void 0 && l._order !== null && c < l._order && (c = l._order);
32
+ }), c + 1;
33
+ }, oe = (i, n, c) => {
34
+ const [l, d] = n, a = new Date(
35
+ Math.min(
36
+ d.props.end.getTime() - c,
37
+ Math.max(e.start.getTime(), l.props.start.getTime())
38
+ )
39
+ ), g = new Date(
40
+ Math.max(a.getTime() + c, Math.min(e.end.getTime(), d.props.end.getTime()))
41
+ );
42
+ return i.filter((u) => {
43
+ const R = Math.max(
44
+ Math.min(d.props.end.getTime() - c, u.props.start.getTime()),
45
+ l.props.start.getTime()
46
+ ), w = Math.min(
47
+ Math.max(R + c, u.props.end.getTime()),
48
+ d.props.end.getTime()
39
49
  );
40
- return l.props.id !== e.id && l.props.group.index === e.group.index && l.props.range.index === e.range.index && (e.ignoreIsAllDay || l.props.isAllDay === e.isAllDay) && D(new Date(S), new Date(u), R, g) && D(s.props.start, h.props.end, l.props.start, l.props.end);
50
+ 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) && T(new Date(R), new Date(w), a, g) && T(l.props.start, d.props.end, u.props.start, u.props.end);
41
51
  });
42
- }, ee = (c, n) => c.group.index === n.group.index && c.range.index === n.range.index && (e.ignoreIsAllDay || c.isAllDay === n.isAllDay), y = () => {
43
- var F, N, W;
44
- const c = (J || []).filter((r) => r.current && ee(r.current.props, e)).sort((r, w) => r.current.props.start.getTime() - w.current.props.start.getTime()), n = o.current && o.current.element;
45
- if (!n || !c.length)
52
+ }, se = (i, n) => i.group.index === n.group.index && i.range.index === n.range.index && (e.ignoreIsAllDay || i.isAllDay === n.isAllDay), y = () => {
53
+ var L, W, $;
54
+ const i = te.filter((t) => t.current && se(t.current.props, e)).sort((t, v) => t.current.props.start.getTime() - v.current.props.start.getTime()), n = i.filter(
55
+ (t) => T(t.current.props.start, t.current.props.end, e.start, e.end)
56
+ ), c = o.current && o.current.element;
57
+ if (!c || !n.length)
46
58
  return;
47
- const i = ie(c), s = ce(c);
48
- if (!i.current || !o.current || !s.current)
59
+ const l = q(i), d = B(i), a = q(n), g = B(n);
60
+ if (!a.current || !o.current || !g.current || !l.current || !d.current)
49
61
  return;
50
- if (!D(i.current.props.start, s.current.props.end, e.start, e.end)) {
51
- M(!1);
62
+ if (!T(a.current.props.start, g.current.props.end, e.start, e.end)) {
63
+ p(!1);
52
64
  return;
53
65
  }
54
- const h = [], R = [], v = [], g = P(i.current.element), I = (e.vertical ? g.height : g.width) / (i.current.props.end.getTime() - i.current.props.start.getTime()), l = (e.start.getTime() - i.current.props.start.getTime()) * I, S = (Math.min(e.end.getTime(), s.current.props.end.getTime()) - Math.max(e.start.getTime(), i.current.props.start.getTime())) * I;
55
- (j || []).forEach((r) => {
56
- r.current && (r.current.props.dragHint ? R.push(r.current) : r.current.props.resizeHint ? v.push(r.current) : h.push(r.current));
57
- }), d.current = Z(h, [i.current, s.current], 25 / I), m.current = e.resizeHint || e.dragHint ? 0 : oe(o.current, d.current);
58
- let u = 1;
59
- e.resizeHint || e.dragHint || (u = Y(o.current, d.current), d.current.forEach((r) => {
60
- r._maxSiblingsPerSlot && u < r._maxSiblingsPerSlot && (u = r._maxSiblingsPerSlot);
61
- }), d.current.forEach((r) => {
62
- r._maxSiblingsPerSlot !== void 0 && r._maxSiblingsPerSlot !== null && r._maxSiblingsPerSlot < u && (r._maxSiblingsPerSlot = u);
66
+ const M = [], u = [], R = [], w = z(a.current.element), H = (e.vertical ? w.height : w.width) / (a.current.props.end.getTime() - a.current.props.start.getTime()), F = (e.vertical ? j : 8) / H, I = (Math.min(e.start.getTime(), g.current.props.end.getTime() - F) - a.current.props.start.getTime()) * H, G = Math.floor(
67
+ Math.min(e.end.getTime(), g.current.props.end.getTime()) - Math.max(e.start.getTime(), a.current.props.start.getTime())
68
+ ) * H;
69
+ (ee || []).forEach((t) => {
70
+ t.current && (t.current.props.dragHint ? u.push(t.current) : t.current.props.resizeHint ? R.push(t.current) : M.push(t.current));
71
+ }), h.current = oe(M, [l.current, d.current], F), f.current = e.resizeHint || e.dragHint ? 0 : me(o.current, h.current);
72
+ let m = 1;
73
+ e.resizeHint || e.dragHint || (m = ce(o.current, h.current), h.current.forEach((t) => {
74
+ t._maxSiblingsPerSlot && m < t._maxSiblingsPerSlot && (m = t._maxSiblingsPerSlot);
75
+ }), h.current.forEach((t) => {
76
+ t._maxSiblingsPerSlot !== void 0 && t._maxSiblingsPerSlot !== null && t._maxSiblingsPerSlot < m && (t._maxSiblingsPerSlot = m);
63
77
  }));
64
- let _ = 0;
65
- const a = g;
66
- d.current.forEach((r) => {
67
- let w = 0;
68
- r._order !== void 0 && r._order !== null && r._order < m.current && (w = P(r.element).top + P(r.element).height - a.top - f * m.current + xe), w > _ && (_ = w);
78
+ let P = 0;
79
+ const s = w;
80
+ h.current.forEach((t) => {
81
+ let v = 0;
82
+ t._order !== void 0 && t._order !== null && t._order < f.current && (v = z(t.element).top + z(t.element).height - s.top - S * f.current + Ee), v > P && (P = v);
69
83
  });
70
- const re = 20;
71
- a.width = e.vertical ? a.width / u - f - re / u : S + f, a.height = e.vertical ? S - f : (e.resizeHint || e.dragHint) && u <= 1 ? a.height : e.style && e.style.height ? e.style.height : 25, a.left = e.vertical ? a.left + ((F = m.current) != null ? F : 0) + f * ((N = m.current) != null ? N : 0) * a.width : a.left + (l < 0 ? 0 : l), a.top = e.vertical ? a.top + (l < 0 ? 0 : l) : a.top + _ + f * ((W = m.current) != null ? W : 0), b.current = u, se(n, a), X(!0), M(!0);
72
- }, V = t.useCallback(
73
- (c) => {
74
- const n = c && c[0], i = H.current;
75
- T.current !== void 0 && window.cancelAnimationFrame(T.current), i && n && (i.width !== n.contentRect.width || i.height !== n.contentRect.height) && (T.current = window.requestAnimationFrame(() => {
84
+ const ae = 20;
85
+ s.width = e.vertical ? s.width / m - S - ae / m : G - S, s.height = e.vertical ? G - S : (e.resizeHint || e.dragHint) && m <= 1 ? s.height : e.style && e.style.height ? e.style.height : j, s.left = e.vertical ? s.left + ((L = f.current) != null ? L : 0) + S * ((W = f.current) != null ? W : 0) * s.width : s.left + (I < 0 ? 0 : I), s.top = e.vertical ? s.top + (I < 0 ? 0 : I) : s.top + P + S * (($ = f.current) != null ? $ : 0), C.current = m, de(c, s), ie(!0), p(!0);
86
+ }, N = r.useCallback(
87
+ (i) => {
88
+ const n = i && i[0], c = b.current;
89
+ E.current !== void 0 && window.cancelAnimationFrame(E.current), c && n && (c.width !== n.contentRect.width || c.height !== n.contentRect.height) && (E.current = window.requestAnimationFrame(() => {
76
90
  y();
77
- })), H.current = { width: n.contentRect.width, height: n.contentRect.height };
91
+ })), b.current = { width: n.contentRect.width, height: n.contentRect.height };
78
92
  },
79
93
  [y]
80
94
  );
81
- t.useEffect(y);
82
- const te = o.current && o.current.element ? o.current.element.closest(".k-scheduler-layout") : null;
83
- return we({
84
- element: te,
95
+ r.useEffect(y);
96
+ const le = o.current && o.current.element ? o.current.element.closest(".k-scheduler-layout") : null;
97
+ return Te({
98
+ element: le,
85
99
  selector: ".k-resource-row",
86
100
  horizontalAttribute: "data-depth-index",
87
101
  verticalAttribute: "data-resource-index",
88
102
  applyTo: ".k-resource-cell",
89
103
  syncHeight: e.isLast
90
- }), t.useEffect(() => {
104
+ }), r.useEffect(() => {
91
105
  if (!x.current)
92
106
  return;
93
- const c = window.ResizeObserver, n = c && new c(V);
107
+ const i = window.ResizeObserver, n = i && new i(N);
94
108
  return n && n.observe(x.current), () => {
95
109
  n && n.disconnect();
96
110
  };
97
- }, [V, x]), /* @__PURE__ */ t.createElement(
98
- K,
111
+ }, [N, x]), /* @__PURE__ */ r.createElement(
112
+ Z,
99
113
  {
100
- ...G,
114
+ ...Y,
101
115
  _ref: o,
102
- _order: m,
103
- _maxSiblingsPerSlot: b,
104
- _siblings: d,
116
+ _order: f,
117
+ _maxSiblingsPerSlot: C,
118
+ _siblings: h,
105
119
  itemRef: o,
106
120
  style: {
107
- visibility: U ? void 0 : "hidden",
108
- display: Q ? void 0 : "none",
121
+ visibility: ne ? void 0 : "hidden",
122
+ display: re ? void 0 : "none",
109
123
  ...e.style
110
124
  }
111
125
  },
112
- !e.resizeHint && /* @__PURE__ */ t.createElement("span", { className: "k-event-actions" }, e.tail && /* @__PURE__ */ t.createElement(
113
- z,
126
+ !e.resizeHint && /* @__PURE__ */ r.createElement("span", { className: "k-event-actions" }, e.tail && /* @__PURE__ */ r.createElement(
127
+ A,
114
128
  {
115
- name: C === "rtl" ? "caret-alt-right" : "caret-alt-left",
116
- icon: C === "rtl" ? ue : me
129
+ name: O === "rtl" ? "caret-alt-right" : "caret-alt-left",
130
+ icon: O === "rtl" ? ge : Se
117
131
  }
118
- ), e.isRecurring && !e.isException && /* @__PURE__ */ t.createElement(z, { name: "reload", icon: de }), !e.isRecurring && e.isException && /* @__PURE__ */ t.createElement(z, { name: "non-recurrence", icon: fe })),
119
- !e.resizeHint && /* @__PURE__ */ t.createElement("div", { title: k }, !e.isAllDay && /* @__PURE__ */ t.createElement(p, { className: "k-event-time" }, k), /* @__PURE__ */ t.createElement(p, null, e.title))
132
+ ), e.isRecurring && !e.isException && /* @__PURE__ */ r.createElement(A, { name: "reload", icon: we }), !e.isRecurring && e.isException && /* @__PURE__ */ r.createElement(A, { name: "non-recurrence", icon: ve })),
133
+ !e.resizeHint && /* @__PURE__ */ r.createElement("div", { title: V }, !e.isAllDay && /* @__PURE__ */ r.createElement(K, { className: "k-event-time" }, V), /* @__PURE__ */ r.createElement(K, null, e.title))
120
134
  );
121
135
  }
122
- ), ve = {
123
- item: ne
136
+ ), ye = {
137
+ item: ue
124
138
  };
125
- Re.displayName = "KendoReactSchedulerProportionalViewItem";
139
+ _e.displayName = "KendoReactSchedulerProportionalViewItem";
126
140
  export {
127
- Re as SchedulerProportionalViewItem,
128
- ve as schedulerProportionalViewItemDefaultProps
141
+ _e as SchedulerProportionalViewItem,
142
+ ye as schedulerProportionalViewItemDefaultProps
129
143
  };