1 line
120 KiB
Plaintext
1 line
120 KiB
Plaintext
|
{"version":3,"file":"main.js","sources":["src/AllDaySplitter.ts","src/TimeColsAxisCell.tsx","src/TimeBodyAxis.tsx","src/TimeColsView.tsx","src/TimeColsSlatsCoords.ts","src/TimeColsSlatsBody.tsx","src/TimeColsSlats.tsx","src/TimeColsSeg.ts","src/TimeColMoreLink.tsx","src/seg-web.ts","src/event-placement.ts","src/TimeColEvent.tsx","src/TimeColMisc.tsx","src/TimeCol.tsx","src/TimeColsContent.tsx","src/TimeCols.tsx","src/DayTimeColsSlicer.ts","src/DayTimeCols.tsx","src/time-slat-meta.ts","src/DayTimeColsView.tsx","src/options.ts","src/main.ts"],"sourcesContent":["import {\n Splitter,\n hasBgRendering,\n EventDef,\n DateSpan,\n} from '@fullcalendar/common'\n\nexport class AllDaySplitter extends Splitter {\n getKeyInfo() {\n return {\n allDay: {},\n timed: {},\n }\n }\n\n getKeysForDateSpan(dateSpan: DateSpan): string[] {\n if (dateSpan.allDay) {\n return ['allDay']\n }\n\n return ['timed']\n }\n\n getKeysForEventDef(eventDef: EventDef): string[] {\n if (!eventDef.allDay) {\n return ['timed']\n }\n\n if (hasBgRendering(eventDef)) {\n return ['timed', 'allDay']\n }\n\n return ['allDay']\n }\n}\n","import {\n createElement,\n ViewContext,\n createFormatter,\n ViewContextType,\n RenderHook,\n SlotLabelContentArg,\n} from '@fullcalendar/common'\nimport { TimeSlatMeta } from './time-slat-meta'\n\nconst DEFAULT_SLAT_LABEL_FORMAT = createFormatter({\n hour: 'numeric',\n minute: '2-digit',\n omitZeroMinute: true,\n meridiem: 'short',\n})\n\nexport function TimeColsAxisCell(props: TimeSlatMeta) {\n let classNames = [\n 'fc-timegrid-slot',\n 'fc-timegrid-slot-label',\n props.isLabeled ? 'fc-scrollgrid-shrink' : 'fc-timegrid-slot-minor',\n ]\n\n return (\n <ViewContextType.Consumer>\n {(context: ViewContext) => {\n if (!props.isLabeled) {\n return (\n <td className={classNames.join(' ')} data-time={props.isoTimeStr} />\n )\n }\n\n let { dateEnv, options, viewApi } = context\n let labelFormat = // TODO: fully pre-parse\n options.slotLabelFormat == null ? DEFAULT_SLAT_LABEL_FORMAT :\n Array.isArray(options.slotLabelFormat) ? createFormatter(options.slotLabelFormat[0]) :\n createFormatter(options.slotLabelFormat)\n\n let hookProps: SlotLabelContentArg = {\n level: 0,\n time: props.time,\n date: dateEnv.toDate(props.date),\n view: viewApi,\n text: dateEnv.format(props.date, labelFormat),\n }\n\n return (\n <RenderHook<SlotLabelContentArg> // needed?\n hookProps={hookProps}\n classNames={options.slotLabelClassNames}\n content={options.slotLabelContent}\n defaultContent={renderInnerContent}\n didMount={options.slotLabelDidMount}\n willUnmount={options.slotLabelWillUnmount}\n >\n {(rootElRef, customClassNames, innerElRef, innerContent) => (\n <td ref={rootElRef} className={classNames.concat(customClassNames).join(' ')} data-time={props.isoTimeStr}>\n <div className=\"fc-timegrid-slot-label-frame fc-scrollgrid-shrink-frame\">\n <div className=\"fc-timegrid-slot-label-cushion fc-scrollgrid-shrink-cushion\" ref={innerElRef}>\n {innerContent}\n </div>\n </div>\n </td>\n )}\n </RenderHook>\n )\n }}\n </ViewContextType.Consumer>\n )\n}\n\nfunction renderInnerContent(props) { // TODO: add types\n return props.text\n}\n","import { createElement, BaseComponent } from '@fullcalendar/common'\nimport { TimeColsAxisCell } from './TimeColsAxisCell'\nimport { TimeSlatMeta } from './time-slat-meta'\n\n/* Thin Axis\n------------------------------------------------------------------------------------------------------------------*/\n\ninterface TimeBodyAxisProps {\n slatMetas: TimeSlatMeta[]\n}\n\nexport class TimeBodyAxis extends BaseComponent<TimeBodyAxisProps> { // just <tr>
|