@kashifsaadat/react-scheduler 0.0.10 → 0.0.12

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.ts CHANGED
@@ -47,6 +47,11 @@ export declare type Config = {
47
47
  maxZoom?: (typeof allZoomLevel)[number];
48
48
  dateFormat?: string;
49
49
  timeFormat?: string;
50
+ /**
51
+ * Enable drag and resize functionality for tiles
52
+ * @default false
53
+ */
54
+ editable?: boolean;
50
55
  };
51
56
 
52
57
  declare type LangCodes = "en" | "pl" | "de" | "lt";
@@ -63,7 +68,7 @@ declare type ParsedDatesRange = {
63
68
  endDate: Date;
64
69
  };
65
70
 
66
- export declare const Scheduler: ({ data, config, startDate, onRangeChange, onVisibleViewportChange, onZoomChange, onTileClick, onFilterData, onClearFilterData, onItemClick, isLoading }: SchedulerProps) => JSX.Element;
71
+ export declare const Scheduler: ({ data, config, startDate, onRangeChange, onVisibleViewportChange, onZoomChange, onTileClick, onFilterData, onClearFilterData, onItemClick, onTileUpdate, isLoading, searchValue, onSearchChange, defaultSearchValue }: SchedulerProps) => JSX.Element;
67
72
 
68
73
  export declare type SchedulerData = SchedulerRow[];
69
74
 
@@ -116,6 +121,28 @@ export declare type SchedulerProps = {
116
121
  onFilterData?: () => void;
117
122
  onClearFilterData?: () => void;
118
123
  onItemClick?: (data: SchedulerItemClickData) => void;
124
+ /**
125
+ * Callback when a tile is updated via drag or resize.
126
+ * Only called when config.editable is true.
127
+ * Returns the tile id, new start date, and new end date.
128
+ */
129
+ onTileUpdate?: (payload: TileUpdatePayload) => void;
130
+ /**
131
+ * Controlled search value. When provided, the search input becomes controlled.
132
+ * The component will display this value and call onSearchChange when user types.
133
+ */
134
+ searchValue?: string;
135
+ /**
136
+ * Callback fired when the search value changes (user types in search box).
137
+ * Required when searchValue is provided for controlled mode.
138
+ * Also fires in uncontrolled mode if provided (useful for tracking).
139
+ */
140
+ onSearchChange?: SearchChangeHandler;
141
+ /**
142
+ * Default search value for uncontrolled mode.
143
+ * Only used on initial mount. Ignored if searchValue is provided.
144
+ */
145
+ defaultSearchValue?: string;
119
146
  };
120
147
 
121
148
  declare type SchedulerRow = {
@@ -130,11 +157,22 @@ declare type SchedulerRowLabel = {
130
157
  subtitle: string;
131
158
  };
132
159
 
160
+ /**
161
+ * Handler type for search value changes
162
+ */
163
+ export declare type SearchChangeHandler = (value: string) => void;
164
+
133
165
  declare type Theme = {
134
166
  light?: Partial<Record<ColorType, string>>;
135
167
  dark?: Partial<Record<ColorType, string>>;
136
168
  };
137
169
 
170
+ export declare type TileUpdatePayload = {
171
+ id: string;
172
+ startDate: Date;
173
+ endDate: Date;
174
+ };
175
+
138
176
  declare type Topbar = {
139
177
  filters: string;
140
178
  next: string;