@progress/kendo-react-scheduler 10.2.0-develop.6 → 10.2.0-develop.8

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.mts CHANGED
@@ -2928,141 +2928,265 @@ export declare const schedulerProportionalViewItemDefaultProps: {
2928
2928
  export declare interface SchedulerProps {
2929
2929
  /**
2930
2930
  * Specifies the `id` of the wrapping element of the Scheduler.
2931
+ *
2932
+ * @example
2933
+ * ```jsx
2934
+ * <Scheduler id="my-scheduler" />
2935
+ * ```
2931
2936
  */
2932
2937
  id?: string;
2933
2938
  /**
2934
2939
  * Specifies the `tabIndex` attribute of the wrapping element of the Scheduler.
2940
+ *
2941
+ * @example
2942
+ * ```jsx
2943
+ * <Scheduler tabIndex={0} />
2944
+ * ```
2935
2945
  */
2936
2946
  tabIndex?: number;
2937
2947
  /**
2938
2948
  * Specifies the `role` attribute of the Scheduler wrapping element.
2939
2949
  *
2940
- * For more information, refer to the [Scheduler Accessibility Compliance]({% slug accessibility_scheduler %}) article
2950
+ * For more information, refer to the [Scheduler Accessibility Compliance]({% slug accessibility_scheduler %}) article.
2951
+ *
2952
+ * @example
2953
+ * ```jsx
2954
+ * <Scheduler role="application" />
2955
+ * ```
2941
2956
  */
2942
2957
  role?: string;
2943
2958
  /**
2944
2959
  * The `aria-labelledby` attribute to be applied to the Scheduler component.
2945
2960
  *
2946
- * For more information, refer to the [Scheduler Accessibility Compliance]({% slug accessibility_scheduler %}) article
2961
+ * For more information, refer to the [Scheduler Accessibility Compliance]({% slug accessibility_scheduler %}) article.
2962
+ *
2963
+ * @example
2964
+ * ```jsx
2965
+ * <Scheduler ariaLabelledby="scheduler-label" />
2966
+ * ```
2947
2967
  */
2948
2968
  ariaLabelledby?: string;
2949
2969
  /**
2950
2970
  * The `aria-label` attribute to be applied to the Scheduler component.
2951
2971
  *
2952
- * For more information, refer to the [Scheduler Accessibility Compliance]({% slug accessibility_scheduler %}) article
2972
+ * For more information, refer to the [Scheduler Accessibility Compliance]({% slug accessibility_scheduler %}) article.
2973
+ *
2974
+ * @example
2975
+ * ```jsx
2976
+ * <Scheduler ariaLabel="Scheduler component" />
2977
+ * ```
2953
2978
  */
2954
2979
  ariaLabel?: string;
2955
2980
  /**
2956
2981
  * Specifies the `style` object of the wrapping element of the Scheduler.
2982
+ *
2983
+ * @example
2984
+ * ```jsx
2985
+ * <Scheduler style={{ height: '500px' }} />
2986
+ * ```
2957
2987
  */
2958
2988
  style?: React_2.CSSProperties;
2959
2989
  /**
2960
2990
  * Specifies the `className` attribute of the wrapping element of the Scheduler.
2991
+ *
2992
+ * @example
2993
+ * ```jsx
2994
+ * <Scheduler className="custom-scheduler" />
2995
+ * ```
2961
2996
  */
2962
2997
  className?: string;
2963
2998
  /**
2964
2999
  * Overrides the default item. Specifying the `item` property of a specific view will override this property.
2965
3000
  *
2966
- * The default component is: [SchedulerItem]({% slug api_scheduler_scheduleritem %})
3001
+ * The default component is: [SchedulerItem]({% slug api_scheduler_scheduleritem %}).
2967
3002
  *
2968
3003
  * For more information on customizing the scheduler items, refer to the [Item Customization]({% slug overview_items_scheduler %}) article.
3004
+ *
3005
+ * @example
3006
+ * ```jsx
3007
+ * const CustomItem = (props) => <div>{props.title}</div>;
3008
+ * <Scheduler item={CustomItem} />
3009
+ * ```
2969
3010
  */
2970
3011
  item?: React_2.ComponentType<SchedulerItemProps>;
2971
3012
  /**
2972
3013
  * Overrides the default viewItem. Specifying the `viewItem` property of a specific view will override this property.
2973
3014
  *
2974
- * The default component is: [SchedulerViewItem]({% slug api_scheduler_schedulerviewitem %})
3015
+ * The default component is: [SchedulerViewItem]({% slug api_scheduler_schedulerviewitem %}).
2975
3016
  *
2976
3017
  * For more information on customizing the scheduler items, refer to the [Item Customization]({% slug overview_items_scheduler %}) article.
3018
+ *
3019
+ * @example
3020
+ * ```jsx
3021
+ * const CustomViewItem = (props) => <div>{props.title}</div>;
3022
+ * <Scheduler viewItem={CustomViewItem} />
3023
+ * ```
2977
3024
  */
2978
3025
  viewItem?: React_2.ComponentType<SchedulerViewItemProps>;
2979
3026
  /**
2980
3027
  * Overrides the default editItem. Specifying the `editItem` property of a specific view will override this property.
2981
3028
  *
2982
- * The default component is: [SchedulerEditItem]({% slug api_scheduler_scheduleredititem %})
3029
+ * The default component is: [SchedulerEditItem]({% slug api_scheduler_scheduleredititem %}).
2983
3030
  *
2984
3031
  * For more information on customizing the scheduler items, refer to the [Item Customization]({% slug overview_items_scheduler %}) article.
3032
+ *
3033
+ * @example
3034
+ * ```jsx
3035
+ * const CustomEditItem = (props) => <div>{props.title}</div>;
3036
+ * <Scheduler editItem={CustomEditItem} />
3037
+ * ```
2985
3038
  */
2986
3039
  editItem?: React_2.ComponentType<SchedulerEditItemProps>;
2987
3040
  /**
2988
3041
  * Overrides the default task. Specifying the `task` property of a specific view will override this property.
2989
3042
  * Currently, the `task` is being used in the [AgendaView]({% slug agenda_view_scheduler %}) only.
2990
3043
  *
2991
- * The default component is: [SchedulerTask]({% slug api_scheduler_schedulertask %})
3044
+ * The default component is: [SchedulerTask]({% slug api_scheduler_schedulertask %}).
2992
3045
  *
2993
3046
  * For more information on customizing the scheduler tasks, refer to the [Task Customization]({% slug overview_tasks_scheduler %}) article.
3047
+ *
3048
+ * @example
3049
+ * ```jsx
3050
+ * const CustomTask = (props) => <div>{props.title}</div>;
3051
+ * <Scheduler task={CustomTask} />
3052
+ * ```
2994
3053
  */
2995
3054
  task?: React_2.ComponentType<SchedulerTaskProps>;
2996
3055
  /**
2997
3056
  * Overrides the default viewTask. Specifying the `viewTask` property of a specific view will override this property.
2998
3057
  * Currently, the `viewTask` is being used in the [AgendaView]({% slug agenda_view_scheduler %}) only.
2999
3058
  *
3000
- * The default component is: [SchedulerViewTask]({% slug api_scheduler_schedulerviewtask %})
3059
+ * The default component is: [SchedulerViewTask]({% slug api_scheduler_schedulerviewtask %}).
3001
3060
  *
3002
3061
  * For more information on customizing the scheduler tasks, refer to the [Task Customization]({% slug overview_tasks_scheduler %}) article.
3062
+ *
3063
+ * @example
3064
+ * ```jsx
3065
+ * const CustomViewTask = (props) => <div>{props.title}</div>;
3066
+ * <Scheduler viewTask={CustomViewTask} />
3067
+ * ```
3003
3068
  */
3004
3069
  viewTask?: React_2.ComponentType<SchedulerTaskProps>;
3005
3070
  /**
3006
3071
  * Overrides the default editTask. Specifying the `editTask` property of a specific view will override this property.
3007
- * Currently, the `viewTask` is being used in the [AgendaView]({% slug agenda_view_scheduler %}) only.
3072
+ * Currently, the `editTask` is being used in the [AgendaView]({% slug agenda_view_scheduler %}) only.
3008
3073
  *
3009
- * The default component is: [SchedulerEditTask]({% slug api_scheduler_scheduleredittask %})
3074
+ * The default component is: [SchedulerEditTask]({% slug api_scheduler_scheduleredittask %}).
3010
3075
  *
3011
3076
  * For more information on customizing the scheduler tasks, refer to the [Task Customization]({% slug overview_tasks_scheduler %}) article.
3077
+ *
3078
+ * @example
3079
+ * ```jsx
3080
+ * const CustomEditTask = (props) => <div>{props.title}</div>;
3081
+ * <Scheduler editTask={CustomEditTask} />
3082
+ * ```
3012
3083
  */
3013
3084
  editTask?: React_2.ComponentType<SchedulerTaskProps>;
3014
3085
  /**
3015
3086
  * Overrides the default header component of the Scheduler.
3016
3087
  *
3017
- * The default component is: [SchedulerHeader]({% slug api_scheduler_schedulerheader %})
3088
+ * The default component is: [SchedulerHeader]({% slug api_scheduler_schedulerheader %}).
3018
3089
  *
3019
3090
  * For more information on customizing the scheduler header, refer to the [Header Customization]({% slug overview_header_footer_scheduler %}) article.
3091
+ *
3092
+ * @example
3093
+ * ```jsx
3094
+ * const CustomHeader = (props) => <div>Custom Header</div>;
3095
+ * <Scheduler header={CustomHeader} />
3096
+ * ```
3020
3097
  */
3021
3098
  header?: React_2.ComponentType<SchedulerHeaderProps>;
3022
3099
  /**
3023
3100
  * Overrides the default footer component of the Scheduler.
3024
3101
  *
3025
- * The default component is: [Scheduler]({% slug api_scheduler_schedulerfooter %})
3102
+ * The default component is: [SchedulerFooter]({% slug api_scheduler_schedulerfooter %}).
3026
3103
  *
3027
3104
  * For more information on customizing the scheduler footer, refer to the [Footer Customization]({% slug overview_header_footer_scheduler %}) article.
3105
+ *
3106
+ * @example
3107
+ * ```jsx
3108
+ * const CustomFooter = (props) => <div>Custom Footer</div>;
3109
+ * <Scheduler footer={CustomFooter} />
3110
+ * ```
3028
3111
  */
3029
3112
  footer?: React_2.ComponentType<SchedulerFooterProps>;
3030
3113
  /**
3031
3114
  * Overrides the default slot component. Specifying the `slot` property of a specific view will override this property.
3032
3115
  *
3033
- * The default component is: [SchedulerSlot]({% slug api_scheduler_schedulerslot %})
3116
+ * The default component is: [SchedulerSlot]({% slug api_scheduler_schedulerslot %}).
3034
3117
  *
3035
3118
  * For more information on customizing the scheduler slots, refer to the [Slot Customization]({% slug overview_slots_scheduler %}) article.
3119
+ *
3120
+ * @example
3121
+ * ```jsx
3122
+ * const CustomSlot = (props) => <div>{props.title}</div>;
3123
+ * <Scheduler slot={CustomSlot} />
3124
+ * ```
3036
3125
  */
3037
3126
  slot?: React_2.ComponentType<SchedulerSlotProps>;
3038
3127
  /**
3039
3128
  * Overrides the default viewSlot component. Specifying the `viewSlot` property of a specific view will override this property.
3040
3129
  *
3041
- * The default component is: [SchedulerViewSlot]({% slug api_scheduler_schedulerviewslot %})
3130
+ * The default component is: [SchedulerViewSlot]({% slug api_scheduler_schedulerviewslot %}).
3042
3131
  *
3043
3132
  * For more information on customizing the scheduler slots, refer to the [Slot Customization]({% slug overview_slots_scheduler %}) article.
3133
+ *
3134
+ * @example
3135
+ * ```jsx
3136
+ * const CustomViewSlot = (props) => <div>{props.title}</div>;
3137
+ * <Scheduler viewSlot={CustomViewSlot} />
3138
+ * ```
3044
3139
  */
3045
3140
  viewSlot?: React_2.ComponentType<SchedulerViewSlotProps>;
3046
3141
  /**
3047
3142
  * Overrides the default editSlot component. Specifying the `editSlot` property of a specific view will override this property.
3048
3143
  *
3049
- * The default component is: [SchedulerEditSlot]({% slug api_scheduler_schedulereditslot %})
3144
+ * The default component is: [SchedulerEditSlot]({% slug api_scheduler_schedulereditslot %}).
3050
3145
  *
3051
3146
  * For more information on customizing the scheduler slots, refer to the [Slot Customization]({% slug overview_slots_scheduler %}) article.
3147
+ *
3148
+ * @example
3149
+ * ```jsx
3150
+ * const CustomEditSlot = (props) => <div>{props.title}</div>;
3151
+ * <Scheduler editSlot={CustomEditSlot} />
3152
+ * ```
3052
3153
  */
3053
3154
  editSlot?: React_2.ComponentType<SchedulerEditSlotProps>;
3054
3155
  /** @hidden */
3055
3156
  form?: React_2.ComponentType<SchedulerFormProps>;
3056
3157
  /**
3057
3158
  * Sets the currently selected view. The value is matched with the `name` property of the view.
3159
+ *
3160
+ * Sets the initially selected view. The available values are:
3161
+ * * `day`
3162
+ * * `week`
3163
+ * * `month`
3164
+ * * `agenda`
3165
+ * * `timeline`
3166
+ *
3167
+ * @example
3168
+ * ```jsx
3169
+ * <Scheduler view="day" />
3170
+ * ```
3058
3171
  */
3059
3172
  view?: string;
3060
3173
  /**
3061
- * Sets the data of the Scheduler component. The data is then parsed and rendered as a visual Scheduler items.
3174
+ * Sets the data of the Scheduler component. The data is then parsed and rendered as visual Scheduler items.
3175
+ *
3176
+ * @example
3177
+ * ```jsx
3178
+ * const data = [{ id: 1, title: 'Event', start: new Date(), end: new Date() }];
3179
+ * <Scheduler data={data} />
3180
+ * ```
3062
3181
  */
3063
3182
  data?: DataItem[];
3064
3183
  /**
3065
3184
  * Sets if the Scheduler component is editable. The value can be either a `boolean` or an Object to specify different types of editing.
3185
+ *
3186
+ * @example
3187
+ * ```jsx
3188
+ * <Scheduler editable={true} />
3189
+ * ```
3066
3190
  */
3067
3191
  editable?: EditableProp | boolean;
3068
3192
  /**
@@ -3076,26 +3200,59 @@ export declare interface SchedulerProps {
3076
3200
  * * `month`
3077
3201
  * * `agenda`
3078
3202
  * * `timeline`
3203
+ *
3204
+ * @example
3205
+ * ```jsx
3206
+ * <Scheduler defaultView="week" />
3207
+ * ```
3079
3208
  */
3080
3209
  defaultView?: string;
3081
3210
  /**
3082
- * Sets the current selected `Date`. The current selected date is passed to the selected view and transformed in to a range.
3211
+ * Sets the current selected `Date`. The current selected date is passed to the selected view and transformed into a range.
3212
+ *
3213
+ * @example
3214
+ * ```jsx
3215
+ * <Scheduler date={new Date()} />
3216
+ * ```
3083
3217
  */
3084
3218
  date?: Date;
3085
3219
  /**
3086
3220
  * Sets a default selected `Date`. The `defaultDate` property is used to specify the initial rendered date, while still remaining in an uncontrolled mode.
3221
+ *
3222
+ * @example
3223
+ * ```jsx
3224
+ * <Scheduler defaultDate={new Date()} />
3225
+ * ```
3087
3226
  */
3088
3227
  defaultDate?: Date;
3089
3228
  /**
3090
- * Force a `rtl` mode. For more information refer to [RTL Support]({% slug globalization_scheduler %}#toc-right-to-left-support)
3229
+ * Force a `rtl` mode. For more information refer to [RTL Support]({% slug globalization_scheduler %}#toc-right-to-left-support).
3230
+ *
3231
+ * @example
3232
+ * ```jsx
3233
+ * <Scheduler rtl={true} />
3234
+ * ```
3091
3235
  */
3092
3236
  rtl?: boolean;
3093
3237
  /**
3094
3238
  * Sets the `height` of the Scheduler.
3239
+ *
3240
+ * @example
3241
+ * ```jsx
3242
+ * <Scheduler height={600} />
3243
+ * ```
3095
3244
  */
3096
3245
  height?: number | string;
3097
3246
  /**
3098
3247
  * Specify the available `view` components as `children` and the Scheduler will match the currently selected view and render it.
3248
+ *
3249
+ * @example
3250
+ * ```jsx
3251
+ * <Scheduler>
3252
+ * <DayView />
3253
+ * <WeekView />
3254
+ * </Scheduler>
3255
+ * ```
3099
3256
  */
3100
3257
  children?: SchedulerView[] | SchedulerView;
3101
3258
  /**
@@ -3103,34 +3260,75 @@ export declare interface SchedulerProps {
3103
3260
  * For example, `Europe/Sofia`.
3104
3261
  *
3105
3262
  * Defaults to `Etc/UTC`.
3263
+ *
3264
+ * @example
3265
+ * ```jsx
3266
+ * <Scheduler timezone="Europe/Sofia" />
3267
+ * ```
3106
3268
  */
3107
3269
  timezone?: string;
3108
3270
  /**
3109
3271
  * Specifies the groups of the Scheduler.
3272
+ *
3273
+ * @example
3274
+ * ```jsx
3275
+ * const group = { resources: ['Rooms'], orientation: 'horizontal' };
3276
+ * <Scheduler group={group} />
3277
+ * ```
3110
3278
  */
3111
3279
  group?: SchedulerGroup;
3112
3280
  /**
3113
3281
  * Specifies the resources of the Scheduler.
3282
+ *
3283
+ * @example
3284
+ * ```jsx
3285
+ * const resources = [{ name: 'Rooms', data: [{ text: 'Room 1', value: 1 }] }];
3286
+ * <Scheduler resources={resources} />
3287
+ * ```
3114
3288
  */
3115
3289
  resources?: SchedulerResource[];
3116
3290
  /**
3117
3291
  * The names of the model fields from which the Scheduler will read its data
3118
3292
  * ([see example]({% slug data_binding_scheduler %})).
3293
+ *
3294
+ * @example
3295
+ * ```jsx
3296
+ * const modelFields = { id: 'TaskID', start: 'Start', end: 'End' };
3297
+ * <Scheduler modelFields={modelFields} />
3298
+ * ```
3119
3299
  */
3120
3300
  modelFields?: SchedulerModelFields;
3121
3301
  /**
3122
3302
  * Called when new `date` is selected.
3303
+ *
3304
+ * @example
3305
+ * ```jsx
3306
+ * const handleDateChange = (args) => console.log(args.value);
3307
+ * <Scheduler onDateChange={handleDateChange} />
3308
+ * ```
3123
3309
  */
3124
3310
  onDateChange?: (args: SchedulerDateChangeEvent) => void;
3125
3311
  /**
3126
- * Called when new `view` is selected. [(see example)]({% slug views_scheduler %}#toc-controlling-the-selected-view)
3312
+ * Called when new `view` is selected. [(see example)]({% slug views_scheduler %}#toc-controlling-the-selected-view).
3313
+ *
3314
+ * @example
3315
+ * ```jsx
3316
+ * const handleViewChange = (args) => console.log(args.value);
3317
+ * <Scheduler onViewChange={handleViewChange} />
3318
+ * ```
3127
3319
  */
3128
3320
  onViewChange?: (args: SchedulerViewChangeEvent) => void;
3129
3321
  /**
3130
3322
  * Called each time when editing occurs.
3131
- * To enable editing set the `editable` property to `true` or an [`EditableProp`]({% slug api_scheduler_editableprop %})
3323
+ * To enable editing set the `editable` property to `true` or an [`EditableProp`]({% slug api_scheduler_editableprop %}).
3132
3324
  *
3133
3325
  * For more information refer to the [Scheduler Editing]({% slug editing_scheduler %}) article.
3326
+ *
3327
+ * @example
3328
+ * ```jsx
3329
+ * const handleDataChange = (event) => console.log(event);
3330
+ * <Scheduler onDataChange={handleDataChange} />
3331
+ * ```
3134
3332
  */
3135
3333
  onDataChange?: (event: SchedulerDataChangeEvent) => void;
3136
3334
  }