@fullcalendar/daygrid 7.0.0-beta.4 → 7.0.0-beta.6

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,42 +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>;
65
78
  role?: string;
66
79
  rowIndex?: number;
80
+ rowLevel: number;
81
+ borderBottom?: boolean;
67
82
  }
68
83
  declare class DayGridHeaderRow<RenderProps extends {
69
84
  text: string;
@@ -73,21 +88,24 @@ declare class DayGridHeaderRow<RenderProps extends {
73
88
  private currentInnerHeight?;
74
89
  render(): createElement.JSX.Element;
75
90
  private handleInnerHeights;
91
+ componentWillUnmount(): void;
76
92
  }
77
93
 
78
- declare function buildDayTableModel(dateProfile: DateProfile, dateProfileGenerator: DateProfileGenerator): DayTableModel;
79
- 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): [
80
96
  canvasWidth: number | undefined,
81
97
  colWidth: number | undefined
82
98
  ];
83
- 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): {
84
100
  col: number;
85
101
  left: number;
86
102
  right: number;
87
103
  };
88
104
  declare function getRowEl(rootEl: HTMLElement, row: number): HTMLElement;
89
105
  declare function getCellEl(rowEl: HTMLElement, col: number): HTMLElement;
90
- 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;
91
109
 
92
110
  interface DayGridLayoutProps {
93
111
  labelId: string | undefined;
@@ -109,6 +127,10 @@ interface DayGridLayoutProps {
109
127
  eventDrag: EventSegUiInteractionState<DayGridRange> | null;
110
128
  eventResize: EventSegUiInteractionState<DayGridRange> | null;
111
129
  eventSelection: string;
130
+ borderlessX: boolean;
131
+ borderlessTop: boolean;
132
+ borderlessBottom: boolean;
133
+ noEdgeEffects: boolean;
112
134
  }
113
135
  declare class DayGridLayout extends BaseComponent<DayGridLayoutProps> {
114
136
  private scrollerRef;
@@ -120,9 +142,7 @@ declare class DayGridLayout extends BaseComponent<DayGridLayoutProps> {
120
142
  componentWillUnmount(): void;
121
143
  resetScroll(): void;
122
144
  updateScrollY: () => void;
123
- handleScrollEnd: ({ isUser }: {
124
- isUser: boolean;
125
- }) => void;
145
+ handleScrollEnd: (isUser: boolean) => void;
126
146
  }
127
147
 
128
148
  interface DayGridRowsProps {
@@ -144,6 +164,8 @@ interface DayGridRowsProps {
144
164
  colWidth?: number;
145
165
  width?: number | string;
146
166
  visibleWidth?: number;
167
+ cellIsNarrow: boolean;
168
+ cellIsMicro: boolean;
147
169
  rowHeightRefMap?: RefMap<string, number>;
148
170
  }
149
171
  declare class DayGridRows extends DateComponent<DayGridRowsProps> {
@@ -155,15 +177,12 @@ declare class DayGridRows extends DateComponent<DayGridRowsProps> {
155
177
  private splitEventDrag;
156
178
  private splitEventResize;
157
179
  private rowHeightRefMap;
158
- private disconnectWidth?;
159
180
  render(): createElement.JSX.Element;
160
181
  handleRootEl: (rootEl: HTMLDivElement) => void;
161
- componentDidMount(): void;
162
- componentWillUnmount(): void;
163
- queryHit(positionLeft: number, positionTop: number, elWidth: number): Hit;
182
+ queryHit(isRtl: boolean, positionLeft: number, positionTop: number, elWidth: number): Hit;
164
183
  }
165
- declare function computeRowHeight(visibleWidth: number | undefined, // should INCLUDE any scrollbar width to avoid oscillation
166
- 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;
167
186
 
168
187
  type DayRowRange = SlicedCoordRange;
169
188
  type DayRowEventRange = DayRowRange & EventRangeProps;
@@ -176,12 +195,12 @@ interface DayGridRowProps {
176
195
  dateProfile: DateProfile;
177
196
  todayRange: DateRange;
178
197
  cells: DayTableCell[];
198
+ cellIsNarrow: boolean;
199
+ cellIsMicro: boolean;
179
200
  showDayNumbers: boolean;
180
201
  showWeekNumbers?: boolean;
181
202
  forPrint: boolean;
182
203
  className?: string;
183
- isCompact?: boolean;
184
- isTall?: boolean;
185
204
  role?: string;
186
205
  fgEventSegs: (SlicedCoordRange & EventRangeProps)[];
187
206
  bgEventSegs: (SlicedCoordRange & EventRangeProps)[];
@@ -193,7 +212,7 @@ interface DayGridRowProps {
193
212
  dayMaxEvents: boolean | number;
194
213
  dayMaxEventRows: boolean | number;
195
214
  colWidth?: number;
196
- minHeight?: number | string;
215
+ basis?: number;
197
216
  rootElRef?: Ref<HTMLElement>;
198
217
  heightRef?: Ref<number>;
199
218
  }
@@ -202,11 +221,10 @@ declare class DayGridRow extends BaseComponent<DayGridRowProps> {
202
221
  private headerHeightRefMap;
203
222
  private mainHeightRefMap;
204
223
  private segHeightRefMap;
224
+ private buildWeekNumberRenderProps;
205
225
  private disconnectHeight?;
206
226
  render(): createElement.JSX.Element;
207
- renderFgSegs(headerHeight: number | undefined, segs: DayRowEventRangePart[], segTops: Map<string, number>, todayRange: DateRange, forcedInvisibleMap: {
208
- [instanceId: string]: any;
209
- }, isDragging?: boolean, isResizing?: boolean, isDateSelecting?: boolean): VNode[];
227
+ renderFgSegs(headerHeight: number | undefined, segs: DayRowEventRangePart[], segTops: Map<string, number>, todayRange: DateRange, isMirror: boolean): VNode[];
210
228
  renderFillSegs(segs: DayRowEventRangePart[], fillType: string): VNode;
211
229
  handleRootEl: (rootEl: HTMLElement) => void;
212
230
  componentDidMount(): void;
@@ -217,4 +235,4 @@ declare class DayGridRow extends BaseComponent<DayGridRowProps> {
217
235
  private getHighlightSegs;
218
236
  }
219
237
 
220
- 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 };