1 line
92 KiB
Plaintext
1 line
92 KiB
Plaintext
|
{"version":3,"file":"main.js","sources":["src/TableView.tsx","src/TableSeg.ts","src/TableCellTop.tsx","src/event-rendering.ts","src/TableBlockEvent.tsx","src/TableListItemEvent.tsx","src/TableCellMoreLink.tsx","src/TableCell.tsx","src/event-placement.ts","src/TableRow.tsx","src/Table.tsx","src/DayTableSlicer.tsx","src/DayTable.tsx","src/DayTableView.tsx","src/TableDateProfileGenerator.ts","src/main.ts"],"sourcesContent":["import {\n VNode, createElement,\n SimpleScrollGrid,\n SimpleScrollGridSection,\n ChunkContentCallbackArgs,\n createRef,\n ScrollGridSectionConfig,\n ViewRoot,\n DateComponent,\n ViewProps,\n RefObject,\n renderScrollShim,\n getStickyHeaderDates,\n getStickyFooterScrollbar,\n ChunkConfigRowContent,\n Dictionary,\n} from '@fullcalendar/common'\n\n/* An abstract class for the daygrid views, as well as month view. Renders one or more rows of day cells.\n----------------------------------------------------------------------------------------------------------------------*/\n// It is a manager for a Table subcomponent, which does most of the heavy lifting.\n// It is responsible for managing width/height.\n\nexport abstract class TableView<State=Dictionary> extends DateComponent<ViewProps, State> {\n protected headerElRef: RefObject<HTMLTableCellElement> = createRef<HTMLTableCellElement>()\n\n renderSimpleLayout(\n headerRowContent: ChunkConfigRowContent,\n bodyContent: (contentArg: ChunkContentCallbackArgs) => VNode,\n ) {\n let { props, context } = this\n let sections: SimpleScrollGridSection[] = []\n let stickyHeaderDates = getStickyHeaderDates(context.options)\n\n if (headerRowContent) {\n sections.push({\n type: 'header',\n key: 'header',\n isSticky: stickyHeaderDates,\n chunk: {\n elRef: this.headerElRef,\n tableClassName: 'fc-col-header',\n rowContent: headerRowContent,\n },\n })\n }\n\n sections.push({\n type: 'body',\n key: 'body',\n liquid: true,\n chunk: { content: bodyContent },\n })\n\n return (\n <ViewRoot viewSpec={context.viewSpec}>\n {(rootElRef, classNames) => (\n <div ref={rootElRef} className={['fc-daygrid'].concat(classNames).join(' ')}>\n <SimpleScrollGrid\n liquid={!props.isHeightAuto && !props.forPrint}\n collapsibleWidth={props.forPrint}\n cols={[] /* TODO: make optional? */}\n sections={sections}\n />\n </div>\n )}\n </ViewRoot>\n )\n }\n\n renderHScrollLayout(\n headerRowContent: ChunkConfigRowContent,\n bodyContent: (contentArg: ChunkContentCallbackArgs) => VNode,\n colCnt: number,\n dayMinWidth: number,\n ) {\n let ScrollGrid = this.context.pluginHooks.scrollGridImpl\n\n if (!ScrollGrid) {\n throw new Error('No ScrollGrid implementation')\n }\n\n let { props, context } = this\n let stickyHeaderDates = !props.forPrint && getStickyHeaderDates(context.options)\n let stickyFooterScrollbar = !props.forPrint && getStickyFooterScrollbar(context.options)\n let sections: ScrollGridSectionConfig[] = []\n\n if (headerRowContent) {\n sections.push({\n type: 'header',\n key: 'header',\n isSticky: stickyHeaderDates,\n chunks: [{\n key: 'main',\n elRef: this.headerElRef,\n tableClassName: 'fc-col-header',\n rowContent: headerRowContent,\n }],\n })\n }\n\n sections.push({\n type: 'body',\n key: 'body',\n liquid: true,\n chunks: [{\n key: 'main',\n content: bodyContent,\n }],\n })\n\n if (stickyFooterScrollbar) {\n sections.push({\n type: 'footer',\n key: 'footer',\n isSticky: true,\n chunks: [{\n key: 'main',\n content: renderScrollShim,\n }],\n })\n }\n\n return (\n <ViewRoot viewSpec={context.viewSpec}>\n {(rootElRef, classNames) => (\n <div ref={rootElRef} className={['fc-daygr
|