|
@@ -23,6 +23,7 @@ export interface UnscopedEventUiInput {
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
export interface EventUi {
|
|
export interface EventUi {
|
|
|
|
|
+ rendering: string
|
|
|
startEditable: boolean | null
|
|
startEditable: boolean | null
|
|
|
durationEditable: boolean | null
|
|
durationEditable: boolean | null
|
|
|
constraints: Constraint[]
|
|
constraints: Constraint[]
|
|
@@ -37,6 +38,7 @@ export interface EventUi {
|
|
|
export type EventUiHash = { [defId: string]: EventUi }
|
|
export type EventUiHash = { [defId: string]: EventUi }
|
|
|
|
|
|
|
|
export const UNSCOPED_EVENT_UI_PROPS = {
|
|
export const UNSCOPED_EVENT_UI_PROPS = {
|
|
|
|
|
+ rendering: String,
|
|
|
editable: Boolean,
|
|
editable: Boolean,
|
|
|
startEditable: Boolean,
|
|
startEditable: Boolean,
|
|
|
durationEditable: Boolean,
|
|
durationEditable: Boolean,
|
|
@@ -56,6 +58,7 @@ export function processUnscopedUiProps(rawProps: UnscopedEventUiInput, calendar:
|
|
|
let constraint = normalizeConstraint(props.constraint, calendar)
|
|
let constraint = normalizeConstraint(props.constraint, calendar)
|
|
|
|
|
|
|
|
return {
|
|
return {
|
|
|
|
|
+ rendering: props.rendering,
|
|
|
startEditable: props.startEditable != null ? props.startEditable : props.editable,
|
|
startEditable: props.startEditable != null ? props.startEditable : props.editable,
|
|
|
durationEditable: props.durationEditable != null ? props.durationEditable : props.editable,
|
|
durationEditable: props.durationEditable != null ? props.durationEditable : props.editable,
|
|
|
constraints: constraint != null ? [ constraint ] : [],
|
|
constraints: constraint != null ? [ constraint ] : [],
|
|
@@ -94,6 +97,7 @@ export function processScopedUiProps(prefix: string, rawScoped: any, calendar: C
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
const EMPTY_EVENT_UI: EventUi = {
|
|
const EMPTY_EVENT_UI: EventUi = {
|
|
|
|
|
+ rendering: '',
|
|
|
startEditable: null,
|
|
startEditable: null,
|
|
|
durationEditable: null,
|
|
durationEditable: null,
|
|
|
constraints: [],
|
|
constraints: [],
|
|
@@ -112,6 +116,7 @@ export function combineEventUis(uis: EventUi[]): EventUi {
|
|
|
|
|
|
|
|
function combineTwoEventUis(item0: EventUi, item1: EventUi): EventUi { // hash1 has higher precedence
|
|
function combineTwoEventUis(item0: EventUi, item1: EventUi): EventUi { // hash1 has higher precedence
|
|
|
return {
|
|
return {
|
|
|
|
|
+ rendering: item1.rendering || item0.rendering,
|
|
|
startEditable: item1.startEditable != null ? item1.startEditable : item0.startEditable,
|
|
startEditable: item1.startEditable != null ? item1.startEditable : item0.startEditable,
|
|
|
durationEditable: item1.durationEditable != null ? item1.durationEditable : item0.durationEditable,
|
|
durationEditable: item1.durationEditable != null ? item1.durationEditable : item0.durationEditable,
|
|
|
constraints: item0.constraints.concat(item1.constraints),
|
|
constraints: item0.constraints.concat(item1.constraints),
|