import { CCBaseShapeUtil } from '../CCBaseShapeUtil' import { CCBaseShape } from '../cc-types' import { NodeProperty } from './cc-graph-shared' import { ccGraphShapeProps, getDefaultCCTimetableLessonNodeProps } from './cc-graph-props' import { getNodeStyles } from './cc-graph-styles' import { NODE_THEMES, NODE_TYPE_THEMES } from './cc-graph-styles' import { CCTimetableLessonNodeProps } from './cc-graph-types' export interface CCTimetableLessonNodeShape extends CCBaseShape { type: 'cc-timetable-lesson-node' props: CCTimetableLessonNodeProps } export class CCTimetableLessonNodeShapeUtil extends CCBaseShapeUtil { static type = 'cc-timetable-lesson-node' as const static props = ccGraphShapeProps['cc-timetable-lesson-node'] getDefaultProps(): CCTimetableLessonNodeShape['props'] { const defaultProps = getDefaultCCTimetableLessonNodeProps() return { ...defaultProps, headerColor: '', school_db_name: '', school_period_id: '', subject_class: '', date: '', start_time: '', end_time: '', period_code: '', } } // Override to nullify the default node component DefaultComponent = () => null renderContent = (shape: CCTimetableLessonNodeShape) => { const styles = getNodeStyles(shape.type) return (
) } }