@fullcalendar/daygrid 7.0.0-beta.3 → 7.0.0-beta.5

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/esm/index.d.ts ADDED
@@ -0,0 +1,23 @@
1
+ import { PluginDef } from '@fullcalendar/core';
2
+ import { RawOptionsFromRefiners, RefinedOptionsFromRefiners, createFormatter } from '@fullcalendar/core/internal';
3
+
4
+ declare const OPTION_REFINERS: {
5
+ dayHeaders: BooleanConstructor;
6
+ dayHeaderFormat: typeof createFormatter;
7
+ };
8
+ type DayGridOptionRefiners = typeof OPTION_REFINERS;
9
+ type DayGridOptions = RawOptionsFromRefiners<DayGridOptionRefiners>;
10
+ type DayGridOptionsRefined = RefinedOptionsFromRefiners<DayGridOptionRefiners>;
11
+
12
+ declare module '@fullcalendar/core/internal' {
13
+ interface BaseOptions extends DayGridOptions {
14
+ }
15
+ interface BaseOptionsRefined extends DayGridOptionsRefined {
16
+ }
17
+ }
18
+ //# sourceMappingURL=ambient.d.ts.map
19
+
20
+ declare const _default: PluginDef;
21
+ //# sourceMappingURL=index.d.ts.map
22
+
23
+ export { DayGridOptions, _default as default };
@@ -1,11 +1,22 @@
1
- import { createPlugin } from '@fullcalendar/core/index.js';
1
+ import { createPlugin } from '@fullcalendar/core';
2
2
  import { DayGridView, TableDateProfileGenerator } from './internal.js';
3
- import '@fullcalendar/core/internal.js';
4
- import '@fullcalendar/core/preact.js';
3
+ import { createFormatter } from '@fullcalendar/core/internal';
4
+ import '@fullcalendar/core/preact';
5
+ import '@fullcalendar/core/internal-classnames';
6
+
7
+ const OPTION_REFINERS = {
8
+ dayHeaders: Boolean,
9
+ dayHeaderFormat: createFormatter,
10
+ };
11
+ const OPTION_DEFAULTS = {
12
+ dayHeaders: true,
13
+ };
5
14
 
6
15
  var index = createPlugin({
7
16
  name: '@fullcalendar/daygrid',
8
17
  initialView: 'dayGridMonth',
18
+ optionRefiners: OPTION_REFINERS,
19
+ optionDefaults: OPTION_DEFAULTS,
9
20
  views: {
10
21
  dayGrid: {
11
22
  component: DayGridView,
@@ -1,6 +1,6 @@
1
- import { Slicer, DayGridRange, DayTableModel, DateRange, DateProfileGenerator, DateEnv, BaseComponent, ViewProps, DateMarker, DateProfile, DateFormatter, ViewContext, DayTableCell, Hit, EventRangeProps, EventSegUiInteractionState, DateComponent, ViewOptionsRefined, RefMap, SlicedCoordRange } from '@fullcalendar/core/internal';
1
+ import { Slicer, DayGridRange, DayTableModel, DateRange, DateProfileGenerator, DateEnv, BaseComponent, ViewProps, DateMarker, DateProfile, DateFormatter, ViewContext, Dictionary, DayTableCell, Hit, EventRangeProps, EventSegUiInteractionState, DateComponent, ViewOptionsRefined, RefMap, SlicedCoordRange } from '@fullcalendar/core/internal';
2
2
  import { createElement, Ref, VNode } from '@fullcalendar/core/preact';
3
- import { CustomContentGenerator, ClassNamesGenerator, DidMountHandler, WillUnmountHandler, DayHeaderContentArg, CssDimValue } from '@fullcalendar/core';
3
+ import { CustomContentGenerator, ClassNameGenerator, DidMountHandler, WillUnmountHandler, DayHeaderData } from '@fullcalendar/core';
4
4
 
5
5
  declare class DayTableSlicer extends Slicer<DayGridRange, [DayTableModel]> {
6
6
  forceDayIfListItem: boolean;
@@ -28,40 +28,57 @@ declare class DayGridView extends BaseComponent<ViewProps> {
28
28
  interface CellRenderConfig<RenderProps> {
29
29
  generatorName: string;
30
30
  customGenerator: CustomContentGenerator<RenderProps>;
31
- classNameGenerator: ClassNamesGenerator<RenderProps>;
31
+ innerClassNameGenerator: ClassNameGenerator<RenderProps>;
32
+ classNameGenerator: ClassNameGenerator<RenderProps>;
32
33
  didMount: DidMountHandler<RenderProps & {
33
34
  el: HTMLElement;
34
35
  }>;
35
36
  willUnmount: WillUnmountHandler<RenderProps & {
36
37
  el: HTMLElement;
37
38
  }>;
39
+ align: 'start' | 'center' | 'end' | ((data: {
40
+ level: number;
41
+ inPopover: boolean;
42
+ isNarrow: boolean;
43
+ }) => 'start' | 'center' | 'end');
44
+ sticky: boolean | number | string;
38
45
  }
39
46
  interface CellDataConfig<RenderProps> {
40
47
  key: string;
48
+ dateMarker: DateMarker;
41
49
  renderProps: RenderProps;
42
50
  className?: string;
43
51
  attrs?: any;
44
52
  innerAttrs?: any;
45
53
  colSpan?: number;
46
- isNavLink?: boolean;
54
+ hasNavLink?: boolean;
47
55
  }
48
56
  interface RowConfig<RenderProps> {
57
+ isDateRow: boolean;
49
58
  renderConfig: CellRenderConfig<RenderProps>;
50
59
  dataConfigs: CellDataConfig<RenderProps>[];
51
60
  }
52
- declare function buildDateRowConfigs(...args: Parameters<typeof buildDateRowConfig>): RowConfig<DayHeaderContentArg>[];
53
- declare function buildDateRowConfig(dates: DateMarker[], datesRepDistinctDays: boolean, dateProfile: DateProfile, todayRange: DateRange, dayHeaderFormat: DateFormatter, // TODO: rename to dateHeaderFormat?
54
- context: ViewContext, colSpan?: number): RowConfig<DayHeaderContentArg>;
55
- declare function buildDateRenderConfig(context: ViewContext): CellRenderConfig<DayHeaderContentArg>;
56
- declare function buildDateDataConfigs(dates: DateMarker[], datesRepDistinctDays: boolean, dateProfile: DateProfile, todayRange: DateRange, dayHeaderFormat: DateFormatter, // TODO: rename to dateHeaderFormat?
57
- context: ViewContext, colSpan?: number, keyPrefix?: string): CellDataConfig<DayHeaderContentArg>[];
61
+ declare function buildDateRowConfigs(dates: DateMarker[], datesRepDistinctDays: boolean, dateProfile: DateProfile, todayRange: DateRange, dayHeaderFormat: DateFormatter, // TODO: rename to dateHeaderFormat?
62
+ context: ViewContext): RowConfig<DayHeaderData>[];
63
+ declare function buildDateRowConfig(dateMarkers: DateMarker[], datesRepDistinctDays: boolean, dateProfile: DateProfile, todayRange: DateRange, dayHeaderFormat: DateFormatter, // TODO: rename to dateHeaderFormat?
64
+ context: ViewContext, colSpan?: number, isMajorMod?: number): RowConfig<DayHeaderData>;
65
+ declare function buildDateRenderConfig(context: ViewContext): CellRenderConfig<DayHeaderData>;
66
+ declare function buildDateDataConfigs(dateMarkers: DateMarker[], datesRepDistinctDays: boolean, dateProfile: DateProfile, todayRange: DateRange, dayHeaderFormat: DateFormatter, // TODO: rename to dateHeaderFormat?
67
+ context: ViewContext, colSpan?: number, keyPrefix?: string, extraRenderProps?: Dictionary, // TODO
68
+ extraAttrs?: Dictionary, // TODO
69
+ className?: string, isMajorMod?: number): CellDataConfig<DayHeaderData>[];
58
70
 
59
71
  interface DayGridHeaderRowProps<RenderProps> extends RowConfig<RenderProps> {
60
- isSticky?: boolean;
72
+ cellIsNarrow: boolean;
73
+ cellIsMicro: boolean;
61
74
  className?: string;
62
75
  height?: number;
63
76
  colWidth?: number;
64
77
  innerHeightRef?: Ref<number>;
78
+ role?: string;
79
+ rowIndex?: number;
80
+ rowLevel: number;
81
+ borderBottom?: boolean;
65
82
  }
66
83
  declare class DayGridHeaderRow<RenderProps extends {
67
84
  text: string;
@@ -71,23 +88,28 @@ declare class DayGridHeaderRow<RenderProps extends {
71
88
  private currentInnerHeight?;
72
89
  render(): createElement.JSX.Element;
73
90
  private handleInnerHeights;
91
+ componentWillUnmount(): void;
74
92
  }
75
93
 
76
- declare function buildDayTableModel(dateProfile: DateProfile, dateProfileGenerator: DateProfileGenerator): DayTableModel;
77
- declare function computeColWidth(colCnt: number, colMinWidth: number, viewportWidth: number | undefined): [
94
+ declare function buildDayTableModel(dateProfile: DateProfile, dateProfileGenerator: DateProfileGenerator, dateEnv: DateEnv): DayTableModel;
95
+ declare function computeColWidth(colCount: number, colMinWidth: number, viewportWidth: number | undefined): [
78
96
  canvasWidth: number | undefined,
79
97
  colWidth: number | undefined
80
98
  ];
81
- declare function computeColFromPosition(positionLeft: number, elWidth: number, colWidth: number | undefined, colCnt: number, isRtl: boolean): {
99
+ declare function computeColFromPosition(positionLeft: number, elWidth: number, colWidth: number | undefined, colCount: number, isRtl: boolean): {
82
100
  col: number;
83
101
  left: number;
84
102
  right: number;
85
103
  };
86
104
  declare function getRowEl(rootEl: HTMLElement, row: number): HTMLElement;
87
105
  declare function getCellEl(rowEl: HTMLElement, col: number): HTMLElement;
88
- declare function createDayHeaderFormatter(explicitFormat: DateFormatter, datesRepDistinctDays: any, dateCnt: any): DateFormatter;
106
+ declare const dayMicroWidth = 50;
107
+ declare const dayHeaderMicroFormat: DateFormatter;
108
+ declare function createDayHeaderFormatter(explicitFormat: DateFormatter, datesRepDistinctDays: boolean, dateCnt: number): DateFormatter;
89
109
 
90
110
  interface DayGridLayoutProps {
111
+ labelId: string | undefined;
112
+ labelStr: string | undefined;
91
113
  dateProfile: DateProfile;
92
114
  todayRange: DateRange;
93
115
  cellRows: DayTableCell[][];
@@ -105,6 +127,10 @@ interface DayGridLayoutProps {
105
127
  eventDrag: EventSegUiInteractionState<DayGridRange> | null;
106
128
  eventResize: EventSegUiInteractionState<DayGridRange> | null;
107
129
  eventSelection: string;
130
+ borderlessX: boolean;
131
+ borderlessTop: boolean;
132
+ borderlessBottom: boolean;
133
+ noEdgeEffects: boolean;
108
134
  }
109
135
  declare class DayGridLayout extends BaseComponent<DayGridLayoutProps> {
110
136
  private scrollerRef;
@@ -116,7 +142,7 @@ declare class DayGridLayout extends BaseComponent<DayGridLayoutProps> {
116
142
  componentWillUnmount(): void;
117
143
  resetScroll(): void;
118
144
  updateScrollY: () => void;
119
- clearScroll: () => void;
145
+ handleScrollEnd: (isUser: boolean) => void;
120
146
  }
121
147
 
122
148
  interface DayGridRowsProps {
@@ -138,6 +164,8 @@ interface DayGridRowsProps {
138
164
  colWidth?: number;
139
165
  width?: number | string;
140
166
  visibleWidth?: number;
167
+ cellIsNarrow: boolean;
168
+ cellIsMicro: boolean;
141
169
  rowHeightRefMap?: RefMap<string, number>;
142
170
  }
143
171
  declare class DayGridRows extends DateComponent<DayGridRowsProps> {
@@ -149,15 +177,12 @@ declare class DayGridRows extends DateComponent<DayGridRowsProps> {
149
177
  private splitEventDrag;
150
178
  private splitEventResize;
151
179
  private rowHeightRefMap;
152
- private disconnectWidth?;
153
180
  render(): createElement.JSX.Element;
154
181
  handleRootEl: (rootEl: HTMLDivElement) => void;
155
- componentDidMount(): void;
156
- componentWillUnmount(): void;
157
- queryHit(positionLeft: number, positionTop: number, elWidth: number): Hit;
182
+ queryHit(isRtl: boolean, positionLeft: number, positionTop: number, elWidth: number): Hit;
158
183
  }
159
- declare function computeRowHeight(visibleWidth: number | undefined, // should INCLUDE any scrollbar width to avoid oscillation
160
- rowCnt: number, isHeightAuto: boolean, forPrint: boolean, options: ViewOptionsRefined): [minHeight: CssDimValue | undefined, isCompact: boolean];
184
+ declare function computeRowBasis(visibleWidth: number | undefined, // should INCLUDE any scrollbar width to avoid oscillation
185
+ rowCount: number, isHeightAuto: boolean, options: ViewOptionsRefined): number;
161
186
 
162
187
  type DayRowRange = SlicedCoordRange;
163
188
  type DayRowEventRange = DayRowRange & EventRangeProps;
@@ -170,12 +195,13 @@ interface DayGridRowProps {
170
195
  dateProfile: DateProfile;
171
196
  todayRange: DateRange;
172
197
  cells: DayTableCell[];
198
+ cellIsNarrow: boolean;
199
+ cellIsMicro: boolean;
173
200
  showDayNumbers: boolean;
174
201
  showWeekNumbers?: boolean;
175
202
  forPrint: boolean;
176
203
  className?: string;
177
- isCompact?: boolean;
178
- isTall?: boolean;
204
+ role?: string;
179
205
  fgEventSegs: (SlicedCoordRange & EventRangeProps)[];
180
206
  bgEventSegs: (SlicedCoordRange & EventRangeProps)[];
181
207
  businessHourSegs: (SlicedCoordRange & EventRangeProps)[];
@@ -186,7 +212,7 @@ interface DayGridRowProps {
186
212
  dayMaxEvents: boolean | number;
187
213
  dayMaxEventRows: boolean | number;
188
214
  colWidth?: number;
189
- minHeight?: number | string;
215
+ basis?: number;
190
216
  rootElRef?: Ref<HTMLElement>;
191
217
  heightRef?: Ref<number>;
192
218
  }
@@ -195,11 +221,10 @@ declare class DayGridRow extends BaseComponent<DayGridRowProps> {
195
221
  private headerHeightRefMap;
196
222
  private mainHeightRefMap;
197
223
  private segHeightRefMap;
224
+ private buildWeekNumberRenderProps;
198
225
  private disconnectHeight?;
199
226
  render(): createElement.JSX.Element;
200
- renderFgSegs(headerHeight: number | undefined, segs: DayRowEventRangePart[], segTops: Map<string, number>, todayRange: DateRange, forcedInvisibleMap: {
201
- [instanceId: string]: any;
202
- }, isDragging?: boolean, isResizing?: boolean, isDateSelecting?: boolean): VNode[];
227
+ renderFgSegs(headerHeight: number | undefined, segs: DayRowEventRangePart[], segTops: Map<string, number>, todayRange: DateRange, isMirror: boolean): VNode[];
203
228
  renderFillSegs(segs: DayRowEventRangePart[], fillType: string): VNode;
204
229
  handleRootEl: (rootEl: HTMLElement) => void;
205
230
  componentDidMount(): void;
@@ -210,4 +235,4 @@ declare class DayGridRow extends BaseComponent<DayGridRowProps> {
210
235
  private getHighlightSegs;
211
236
  }
212
237
 
213
- export { CellDataConfig, CellRenderConfig, DayGridHeaderRow, DayGridHeaderRowProps, DayGridLayout, DayGridLayoutProps, DayGridRow, DayGridRowProps, DayGridRows, DayGridView, DayTableSlicer, RowConfig, TableDateProfileGenerator, buildDateDataConfigs, buildDateRenderConfig, buildDateRowConfig, buildDateRowConfigs, buildDayTableModel, buildDayTableRenderRange, computeColFromPosition, computeColWidth, computeRowHeight, createDayHeaderFormatter, getCellEl, getRowEl };
238
+ export { CellDataConfig, CellRenderConfig, DayGridHeaderRow, DayGridHeaderRowProps, DayGridLayout, DayGridLayoutProps, DayGridRow, DayGridRowProps, DayGridRows, DayGridView, DayTableSlicer, RowConfig, TableDateProfileGenerator, buildDateDataConfigs, buildDateRenderConfig, buildDateRowConfig, buildDateRowConfigs, buildDayTableModel, buildDayTableRenderRange, computeColFromPosition, computeColWidth, computeRowBasis, createDayHeaderFormatter, dayHeaderMicroFormat, dayMicroWidth, getCellEl, getRowEl };