UNPKG

ts-react-scheduler

Version:

Scheduler component based on TypeScript and ReactJS

707 lines (706 loc) 19.6 kB
.ts-react-scheduler { font-size: 0.8125rem; -webkit-touch-callout: none; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; } .ts-react-scheduler-header-component { width: 100%; margin-bottom: 4px; } .ts-react-scheduler-header-component .header-title-wrapper { width: 100%; } .ts-react-scheduler-header-component .header-actions-wrapper { width: 100%; } .ts-react-scheduler-header-component .header-long-lasting-wrapper { width: 100%; } .ts-react-scheduler-header-action-component { width: 100%; display: -webkit-box; display: -webkit-flex; display: -ms-flexbox; display: flex; -webkit-box-orient: horizontal; -webkit-box-direction: normal; -webkit-flex-direction: row; -ms-flex-direction: row; flex-direction: row; -webkit-box-align: center; -webkit-align-items: center; -ms-flex-align: center; align-items: center; -webkit-box-pack: justify; -webkit-justify-content: space-between; -ms-flex-pack: justify; justify-content: space-between; margin-bottom: 4px; overflow: hidden; } .ts-react-scheduler-header-action-component .date-wrapper { width: 250px; text-align: center; font-size: 16px; } .ts-react-scheduler-header-action-btn-group-component .MuiButtonGroup-root .MuiButtonBase-root { width: 88px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .ts-react-scheduler-header-action-btn-group-component .MuiButtonGroup-root .MuiButtonBase-root { width: 88px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .ts-react-scheduler-header-long-lasting-component { height: 66px; border: 1px solid #1976d2; border-radius: 4px; overflow-y: auto; } .ts-react-scheduler-header-long-lasting-component .header-long-lasting-items { width: 100%; height: 100%; } .ts-react-scheduler-header-long-lasting-component .header-long-lasting-items .long-scaled-item { height: 15px; display: -webkit-box; display: -webkit-flex; display: -ms-flexbox; display: flex; -webkit-box-align: center; -webkit-align-items: center; -ms-flex-align: center; align-items: center; padding-left: 4px; cursor: pointer; color: #ffffff; font-size: 10px; margin-bottom: 2px; } .ts-react-scheduler-header-long-lasting-component .header-long-lasting-items .long-scaled-item:hover { opacity: 0.75; } .ts-react-scheduler-header-long-lasting-component .header-long-lasting-items .long-scaled-item:last-child { margin-bottom: 0; } .ts-react-scheduler-header-long-lasting-component .MuiAlert-root { padding: 15px; } .header-title-component { background-color: #1976d2; border: 1px solid #1976d2; color: #ffffff; display: -webkit-box; display: -webkit-flex; display: -ms-flexbox; display: flex; -webkit-box-pack: center; -webkit-justify-content: center; -ms-flex-pack: center; justify-content: center; margin-bottom: 4px; border-radius: 4px; } .MuiDialog-root .input-section { margin-bottom: 4px; } .MuiDialog-root .input-section input { width: 60px; margin-right: 8px; } .MuiDialog-root .input-section input:last-child { margin-right: 0; } .MuiDialog-root .input-section-title .MuiFormControl-root { width: 100%; } .MuiDialog-root .MuiPaper-root { overflow-y: auto; } .event-dialog-content-wrapper { margin: 8px; } .event-dialog-action-wrapper { margin: 0 8px 8px; } .ts-react-scheduler-event-dialog-action-component { font-family: "Roboto" !important; font-size: 12px; color: #ffffff; } .ts-react-scheduler-event-dialog-action-component .create, .ts-react-scheduler-event-dialog-action-component .update { width: 100%; display: -webkit-box; display: -webkit-flex; display: -ms-flexbox; display: flex; -webkit-box-orient: horizontal; -webkit-box-direction: normal; -webkit-flex-direction: row; -ms-flex-direction: row; flex-direction: row; -webkit-box-pack: end; -webkit-justify-content: flex-end; -ms-flex-pack: end; justify-content: flex-end; } .ts-react-scheduler-event-dialog-action-component .dialog-btn-delete { margin-right: auto; } .ts-react-scheduler-dialog-component-content { font-family: "Roboto" !important; } .ts-react-scheduler-dialog-component-content .MuiFormControl-root { width: 100%; margin-bottom: 8px; } .ts-react-scheduler-dialog-component-content .MuiFormControl-root input { font-size: 14px; } .ts-react-scheduler-dialog-component-content .MuiAccordionSummary-root { color: rgba(0, 0, 0, 0.54); } .ts-react-scheduler-dialog-component-content .MuiAccordionSummary-root.read-only { color: rgba(0, 0, 0, 0.38); } .ts-react-scheduler-dialog-component-content .MuiAccordionDetails-root { display: -webkit-box; display: -webkit-flex; display: -ms-flexbox; display: flex; -webkit-box-pack: center; -webkit-justify-content: center; -ms-flex-pack: center; justify-content: center; -webkit-box-orient: vertical; -webkit-box-direction: normal; -webkit-flex-direction: column; -ms-flex-direction: column; flex-direction: column; } .ts-react-scheduler-dialog-component-content .MuiAccordionDetails-root textarea { font-size: 12px; } .ts-react-scheduler-dialog-component-content .MuiFormControlLabel-label { font-size: 14px; } .ts-react-scheduler-dialog-component-content .content-color-picker { -webkit-box-orient: unset; -webkit-box-direction: unset; -webkit-flex-direction: unset; -ms-flex-direction: unset; flex-direction: unset; } .event-dialog-content-wrapper { width: 368px; } .ts-react-scheduler-dialog-component-header { font-family: 'Roboto' !important; font-size: 14px; background-color: #1976d2; color: #ffffff; padding: 4px 8px; display: -webkit-box; display: -webkit-flex; display: -ms-flexbox; display: flex; -webkit-box-pack: center; -webkit-justify-content: center; -ms-flex-pack: center; justify-content: center; } .ts-react-scheduler-content-component .content-scale { background-color: #1976d2; color: #ffffff !important; border: 1px solid rgba(0, 0, 0, 0.27); border-top-left-radius: 4px; border-top-right-radius: 4px; padding: 4px; width: calc(100% - 10px); } .ts-react-scheduler-content-component .content-event-grid { width: calc(100% - 2px); height: 100%; border: 1px solid rgba(0, 0, 0, 0.27); border-radius: 4px; border-top-width: 0; border-top-left-radius: 0; border-top-right-radius: 0; } .ts-react-scheduler-content-day-component { width: 100%; height: 100%; overflow-y: auto; display: -webkit-box; display: -webkit-flex; display: -ms-flexbox; display: flex; -webkit-box-orient: horizontal; -webkit-box-direction: normal; -webkit-flex-direction: row; -ms-flex-direction: row; flex-direction: row; font-size: 12px; } .ts-react-scheduler-content-day-component .time-column { width: 50px; height: 100%; cursor: pointer; } .ts-react-scheduler-content-day-component .time-column .time-slot { height: 43px; border-bottom: 1px solid rgba(0, 0, 0, 0.27); border-right: 1px solid rgba(0, 0, 0, 0.27); display: -webkit-box; display: -webkit-flex; display: -ms-flexbox; display: flex; -webkit-box-align: center; -webkit-align-items: center; -ms-flex-align: center; align-items: center; -webkit-box-pack: center; -webkit-justify-content: center; -ms-flex-pack: center; justify-content: center; color: rgba(0, 0, 0, 0.27); } .ts-react-scheduler-content-day-component .time-column .time-slot:last-child { border-bottom-width: 0; } .ts-react-scheduler-content-day-component .event-column { width: calc(100% - 50px); cursor: pointer; } .ts-react-scheduler-content-day-component .event-column .event-slot { height: 43px; border-bottom: 1px solid rgba(0, 0, 0, 0.27); display: -webkit-box; display: -webkit-flex; display: -ms-flexbox; display: flex; -webkit-box-orient: horizontal; -webkit-box-direction: normal; -webkit-flex-direction: row; -ms-flex-direction: row; flex-direction: row; } .ts-react-scheduler-content-day-component .event-column .event-slot .event-item { position: relative; color: #ffffff; cursor: pointer; word-break: normal; font-size: 10px; overflow: hidden; border-right: 1px solid #ffffff; } .ts-react-scheduler-content-day-component .event-column .event-slot .event-item .content { position: relative; top: -1px; left: 2px; } .ts-react-scheduler-content-day-component .event-column .event-slot .event-item:hover { z-index: 100; opacity: 0.8; } .ts-react-scheduler-content-day-component .event-column .event-slot .event-item:last-child { border-right-width: 0; } .ts-react-scheduler-content-day-component .event-column .event-slot:last-child { border-bottom-width: 0; } .ts-react-scheduler-content-month-component { width: 100%; height: 100%; overflow: hidden; } .ts-react-scheduler-content-month-component .day-row { width: 100%; height: 24px; border-bottom: 1px solid rgba(0, 0, 0, 0.27); overflow: hidden; display: -webkit-box; display: -webkit-flex; display: -ms-flexbox; display: flex; -webkit-box-orient: horizontal; -webkit-box-direction: normal; -webkit-flex-direction: row; -ms-flex-direction: row; flex-direction: row; background-color: rgba(0, 0, 0, 0.15); } .ts-react-scheduler-content-month-component .day-row .day-column { width: 14.285%; height: 100%; border-right: 1px solid rgba(0, 0, 0, 0.27); overflow: hidden; display: -webkit-box; display: -webkit-flex; display: -ms-flexbox; display: flex; -webkit-box-pack: center; -webkit-justify-content: center; -ms-flex-pack: center; justify-content: center; -webkit-box-align: center; -webkit-align-items: center; -ms-flex-align: center; align-items: center; } .ts-react-scheduler-content-month-component .day-row .day-column:last-child { border-width: 0; } .ts-react-scheduler-content-month-component .month-row { height: 15%; border-bottom: 1px solid rgba(0, 0, 0, 0.27); display: -webkit-box; display: -webkit-flex; display: -ms-flexbox; display: flex; -webkit-box-orient: horizontal; -webkit-box-direction: normal; -webkit-flex-direction: row; -ms-flex-direction: row; flex-direction: row; overflow: hidden; } .ts-react-scheduler-content-month-component .month-row .month-column { width: 14.285%; height: 100%; border-right: 1px solid rgba(0, 0, 0, 0.27); overflow: hidden; } .ts-react-scheduler-content-month-component .month-row .month-column .month-item { width: 100%; height: 100%; display: -webkit-box; display: -webkit-flex; display: -ms-flexbox; display: flex; -webkit-box-pack: center; -webkit-justify-content: center; -ms-flex-pack: center; justify-content: center; -webkit-box-align: center; -webkit-align-items: center; -ms-flex-align: center; align-items: center; cursor: pointer; } .ts-react-scheduler-content-month-component .month-row .month-column .month-item.disabled { color: rgba(0, 0, 0, 0.27); pointer-events: none; } .ts-react-scheduler-content-month-component .month-row .month-column .month-item.active { background-color: #1976d2; color: #ffffff; } .ts-react-scheduler-content-month-component .month-row .month-column .month-item:hover { background-color: rgba(0, 0, 0, 0.15); } .ts-react-scheduler-content-month-component .month-row .month-column:last-child { border-width: 0; } .ts-react-scheduler-content-month-component .month-row:last-child { border-width: 0; } .ts-react-scheduler-content-month-component .highlighted { background-color: #3f51b5; color: #ffffff; width: 26px; height: 23px; border-radius: 4px; display: -webkit-box; display: -webkit-flex; display: -ms-flexbox; display: flex; -webkit-box-pack: center; -webkit-justify-content: center; -ms-flex-pack: center; justify-content: center; -webkit-box-align: center; -webkit-align-items: center; -ms-flex-align: center; align-items: center; pointer-events: none; } .ts-react-scheduler-content-scale-component { width: 100%; display: -webkit-box; display: -webkit-flex; display: -ms-flexbox; display: flex; -webkit-box-orient: horizontal; -webkit-box-direction: normal; -webkit-flex-direction: row; -ms-flex-direction: row; flex-direction: row; } .ts-react-scheduler-content-scale-component .time-column { width: 41px; } .ts-react-scheduler-content-scale-component .event-column { width: calc(100% - 41px - 2px); display: -webkit-box; display: -webkit-flex; display: -ms-flexbox; display: flex; -webkit-box-orient: horizontal; -webkit-box-direction: normal; -webkit-flex-direction: row; -ms-flex-direction: row; flex-direction: row; } .ts-react-scheduler-content-scale-component .event-column .scale-day { width: 100%; display: -webkit-box; display: -webkit-flex; display: -ms-flexbox; display: flex; -webkit-box-orient: horizontal; -webkit-box-direction: normal; -webkit-flex-direction: row; -ms-flex-direction: row; flex-direction: row; -webkit-box-pack: center; -webkit-justify-content: center; -ms-flex-pack: center; justify-content: center; } .ts-react-scheduler-content-scale-component .event-column .scale-week { width: 100%; display: -webkit-box; display: -webkit-flex; display: -ms-flexbox; display: flex; -webkit-box-orient: horizontal; -webkit-box-direction: normal; -webkit-flex-direction: row; -ms-flex-direction: row; flex-direction: row; } .ts-react-scheduler-content-scale-component .event-column .scale-week .scale-week-item { width: 15%; display: -webkit-box; display: -webkit-flex; display: -ms-flexbox; display: flex; -webkit-box-pack: center; -webkit-justify-content: center; -ms-flex-pack: center; justify-content: center; } .ts-react-scheduler-content-scale-component .event-column .scale-month { width: 100%; display: -webkit-box; display: -webkit-flex; display: -ms-flexbox; display: flex; -webkit-box-orient: horizontal; -webkit-box-direction: normal; -webkit-flex-direction: row; -ms-flex-direction: row; flex-direction: row; -webkit-box-pack: center; -webkit-justify-content: center; -ms-flex-pack: center; justify-content: center; } .ts-react-scheduler-content-scale-component .event-column .scale-year { width: 100%; display: -webkit-box; display: -webkit-flex; display: -ms-flexbox; display: flex; -webkit-box-orient: horizontal; -webkit-box-direction: normal; -webkit-flex-direction: row; -ms-flex-direction: row; flex-direction: row; -webkit-box-pack: center; -webkit-justify-content: center; -ms-flex-pack: center; justify-content: center; } .ts-react-scheduler-content-week-component { width: 100%; height: 100%; overflow-y: auto; display: -webkit-box; display: -webkit-flex; display: -ms-flexbox; display: flex; -webkit-box-orient: horizontal; -webkit-box-direction: normal; -webkit-flex-direction: row; -ms-flex-direction: row; flex-direction: row; font-size: 12px; } .ts-react-scheduler-content-week-component .time-column { width: 50px; height: 100%; } .ts-react-scheduler-content-week-component .time-column .time-slot { height: 43px; border-bottom: 1px solid rgba(0, 0, 0, 0.27); border-right: 1px solid rgba(0, 0, 0, 0.27); display: -webkit-box; display: -webkit-flex; display: -ms-flexbox; display: flex; -webkit-box-align: center; -webkit-align-items: center; -ms-flex-align: center; align-items: center; -webkit-box-pack: center; -webkit-justify-content: center; -ms-flex-pack: center; justify-content: center; color: rgba(0, 0, 0, 0.27); } .ts-react-scheduler-content-week-component .time-column .time-slot:last-child { border-bottom-width: 0; } .ts-react-scheduler-content-week-component .event-column { width: calc(100% - 50px); } .ts-react-scheduler-content-week-component .event-column .event-slot { height: 43px; border-bottom: 1px solid rgba(0, 0, 0, 0.27); display: -webkit-box; display: -webkit-flex; display: -ms-flexbox; display: flex; -webkit-box-orient: horizontal; -webkit-box-direction: normal; -webkit-flex-direction: row; -ms-flex-direction: row; flex-direction: row; } .ts-react-scheduler-content-week-component .event-column .event-slot .event-slot-item { width: 14.285%; height: 100%; border-right: 1px solid rgba(0, 0, 0, 0.27); overflow-y: auto; } .ts-react-scheduler-content-week-component .event-column .event-slot .event-slot-item.active { background-color: rgba(0, 0, 0, 0.05); color: #ffffff; } .ts-react-scheduler-content-week-component .event-column .event-slot .event-slot-item .event-item { position: relative; color: #ffffff; cursor: pointer; word-break: normal; font-size: 10px; overflow: hidden; height: 15px; border-bottom: 1px solid #ffffff; } .ts-react-scheduler-content-week-component .event-column .event-slot .event-slot-item .event-item .content { position: relative; top: -2px; left: 2px; } .ts-react-scheduler-content-week-component .event-column .event-slot .event-slot-item .event-item:hover { z-index: 100; opacity: 0.8; } .ts-react-scheduler-content-week-component .event-column .event-slot .event-slot-item .event-item:last-child { border-bottom-width: 0; } .ts-react-scheduler-content-week-component .event-column .event-slot .event-slot-item:last-child { border-right-width: 0; } .ts-react-scheduler-content-week-component .event-column .event-slot .event-slot-item:hover { height: 100%; overflow: unset; } .ts-react-scheduler-content-week-component .event-column .event-slot .week-column:last-child { border-width: 0; } .ts-react-scheduler-content-week-component .event-column .event-slot:last-child { border-bottom-width: 0; } .ts-react-scheduler-content-year-component { width: 100%; height: 100%; overflow: hidden; } .ts-react-scheduler-content-year-component .year-row { height: 16.4%; border-bottom: 1px solid rgba(0, 0, 0, 0.27); display: -webkit-box; display: -webkit-flex; display: -ms-flexbox; display: flex; -webkit-box-orient: horizontal; -webkit-box-direction: normal; -webkit-flex-direction: row; -ms-flex-direction: row; flex-direction: row; overflow: hidden; } .ts-react-scheduler-content-year-component .year-row .year-column { width: 14.285%; height: 100%; border-right: 1px solid rgba(0, 0, 0, 0.27); overflow: hidden; } .ts-react-scheduler-content-year-component .year-row .year-column .year-item { width: 100%; height: 100%; display: -webkit-box; display: -webkit-flex; display: -ms-flexbox; display: flex; -webkit-box-pack: center; -webkit-justify-content: center; -ms-flex-pack: center; justify-content: center; -webkit-box-align: center; -webkit-align-items: center; -ms-flex-align: center; align-items: center; cursor: pointer; } .ts-react-scheduler-content-year-component .year-row .year-column .year-item.active { background-color: #1976d2; color: #ffffff; } .ts-react-scheduler-content-year-component .year-row .year-column .year-item:hover { background-color: rgba(0, 0, 0, 0.15); } .ts-react-scheduler-content-year-component .year-row .year-column:last-child { border-width: 0; } .ts-react-scheduler-content-year-component .highlighted { background-color: #3f51b5; color: #ffffff; width: 40px; height: 24px; border-radius: 4px; display: -webkit-box; display: -webkit-flex; display: -ms-flexbox; display: flex; -webkit-box-pack: center; -webkit-justify-content: center; -ms-flex-pack: center; justify-content: center; -webkit-box-align: center; -webkit-align-items: center; -ms-flex-align: center; align-items: center; pointer-events: none; }