diff --git a/client/packages/lowcoder-comps/package.json b/client/packages/lowcoder-comps/package.json index 9f1e232dd..e9f152b89 100644 --- a/client/packages/lowcoder-comps/package.json +++ b/client/packages/lowcoder-comps/package.json @@ -10,11 +10,13 @@ "@fullcalendar/interaction": "^6.1.6", "@fullcalendar/list": "^6.1.9", "@fullcalendar/moment": "^6.1.6", + "@fullcalendar/multimonth": "^6.1.6", "@fullcalendar/react": "^6.1.6", "@fullcalendar/resource": "^6.1.11", "@fullcalendar/resource-timegrid": "^6.1.11", "@fullcalendar/resource-timeline": "^6.1.11", "@fullcalendar/timegrid": "^6.1.6", + "@fullcalendar/timeline": "^6.1.6", "@types/react": "^18.2.45", "@types/react-dom": "^18.2.18", "big.js": "^6.2.1", diff --git a/client/packages/lowcoder-comps/src/comps/calendarComp/calendarComp.tsx b/client/packages/lowcoder-comps/src/comps/calendarComp/calendarComp.tsx index c65de7873..0909dfe27 100644 --- a/client/packages/lowcoder-comps/src/comps/calendarComp/calendarComp.tsx +++ b/client/packages/lowcoder-comps/src/comps/calendarComp/calendarComp.tsx @@ -6,6 +6,7 @@ import { UICompBuilder, withDefault, withExposingConfigs, + withMethodExposing, NumberControl, StringControl, hiddenPropertyView, @@ -20,6 +21,7 @@ import { CustomModal, jsonValueExposingStateControl, CalendarDeleteIcon, + jsonValueStateControl, Tooltip, } from "lowcoder-sdk"; import { default as Form } from "antd/es/form"; @@ -32,12 +34,16 @@ import adaptivePlugin from "@fullcalendar/adaptive"; import FullCalendar from "@fullcalendar/react"; import dayGridPlugin from "@fullcalendar/daygrid"; +import multiMonthPlugin from '@fullcalendar/multimonth'; import timeGridPlugin from "@fullcalendar/timegrid"; import interactionPlugin from "@fullcalendar/interaction"; import listPlugin from "@fullcalendar/list"; import allLocales from "@fullcalendar/core/locales-all"; import { EventContentArg, DateSelectArg } from "@fullcalendar/core"; import momentPlugin from "@fullcalendar/moment"; + +import ErrorBoundary from "./errorBoundary"; + import { DefaultWithFreeViewOptions, DefaultWithPremiumViewOptions, @@ -52,25 +58,27 @@ import { headerToolbar, views, slotLabelFormat, + slotLabelFormatWeek, + slotLabelFormatMonth, viewClassNames, FormWrapper, + resourcesDefaultData, + resourcesEventsDefaultData, + resourceTimeLineHeaderToolbar, + resourceTimeGridHeaderToolbar, } from "./calendarConstants"; import dayjs from "dayjs"; - -function filterViews() {} - + const childrenMap = { events: jsonValueExposingStateControl("events", defaultData), + resourcesEvents: jsonValueExposingStateControl("resourcesEvents", resourcesEventsDefaultData), + resources: jsonValueExposingStateControl("resources", resourcesDefaultData), onEvent: ChangeEventHandlerControl, - + resourceName: withDefault(StringControl, trans("calendar.resourcesDefault")), editable: withDefault(BoolControl, true), defaultDate: withDefault(StringControl, "{{ new Date() }}"), defaultFreeView: dropdownControl(DefaultWithFreeViewOptions, "timeGridWeek"), - defaultPremiumView: dropdownControl( - DefaultWithPremiumViewOptions, - "timeGridWeek" - ), - + defaultPremiumView: dropdownControl(DefaultWithPremiumViewOptions, "resourceTimelineDay"), firstDay: dropdownControl(FirstDayOptions, "1"), showEventTime: withDefault(BoolControl, true), showWeekends: withDefault(BoolControl, true), @@ -78,11 +86,11 @@ const childrenMap = { dayMaxEvents: withDefault(NumberControl, 2), eventMaxStack: withDefault(NumberControl, 0), style: styleControl(CalendarStyle), - licenceKey: withDefault(StringControl, ""), + licenceKey: withDefault( StringControl, "" ), }; let CalendarBasicComp = (function () { - return new UICompBuilder(childrenMap, (props) => { + return new UICompBuilder(childrenMap, (props: { events?: any; style: any; onEvent?: any; resourcesEvents?: any; resources?: any; defaultDate?: any; defaultFreeView?: any; defaultPremiumView?: any; showEventTime?: any; showWeekends?: any; showAllDay?: any; dayMaxEvents?: any; eventMaxStack?: any; firstDay?: any; editable?: any; licenceKey?: string; resourceName : string }) => { const theme = useContext(ThemeContext); const ref = createRef(); const editEvent = useRef(); @@ -96,6 +104,7 @@ let CalendarBasicComp = (function () { start: dayjs(item.start, DateParser).format(), end: dayjs(item.end, DateParser).format(), allDay: item.allDay, + resourceId: item.resourceId ? item.resourceId : null, color: isValidColor(item.color || "") ? item.color : theme?.theme?.primary, @@ -103,7 +112,24 @@ let CalendarBasicComp = (function () { }; }); - const { + const resources = props.resources.value; + + const resourcesEvents = props.resourcesEvents.value.map((item: EventType) => { + return { + title: item.title, + id: item.id, + start: dayjs(item.start, DateParser).format(), + end: dayjs(item.end, DateParser).format(), + allDay: item.allDay, + resourceIds: item.resourceId ? [item.resourceId] : [], + color: isValidColor(item.color || "") + ? item.color + : theme?.theme?.primary, + ...(item.groupId ? { groupId: item.groupId } : null), + }; + }); + + let { defaultDate, defaultFreeView, defaultPremiumView, @@ -116,6 +142,7 @@ let CalendarBasicComp = (function () { firstDay, editable, licenceKey, + resourceName, } = props; function renderEventContent(eventInfo: EventContentArg) { @@ -145,9 +172,9 @@ let CalendarBasicComp = (function () { return ( @@ -307,7 +334,7 @@ let CalendarBasicComp = (function () { } props.onEvent("change"); form.resetFields(); - }); + }); //small change }, onCancel: () => { form.resetFields(); @@ -315,6 +342,40 @@ let CalendarBasicComp = (function () { }); }; + const toolBar = (defaultView: any) => { + switch (defaultView) { + case "resourceTimelineDay": + return resourceTimeLineHeaderToolbar; + break; + case "resourceTimeGridDay": + return resourceTimeGridHeaderToolbar; + break; + default: + return headerToolbar; + break; + } + }; + + + const [currentSlotLabelFormat, setCurrentSlotLabelFormat] = useState(slotLabelFormat); + + const handleDatesSet = (arg: { view: { type: any; }; }) => { + switch (arg.view.type) { + case "resourceTimelineDay": + setCurrentSlotLabelFormat(slotLabelFormat); + break; + case "resourceTimelineWeek": + setCurrentSlotLabelFormat(slotLabelFormatWeek); + break; + case "resourceTimelineMonth": + setCurrentSlotLabelFormat(slotLabelFormatMonth); + break; + default: + setCurrentSlotLabelFormat(slotLabelFormat); + break; + } + }; + let initialDate = defaultDate; try { initialDate = new Date(defaultDate).toISOString(); @@ -322,9 +383,32 @@ let CalendarBasicComp = (function () { initialDate = undefined; } let defaultView = defaultFreeView; - if (licenceKey != "") { - defaultView = defaultPremiumView; + if (licenceKey != "") { + defaultView = defaultPremiumView; } + + const plugins = [ + dayGridPlugin, + timeGridPlugin, + interactionPlugin, + listPlugin, + momentPlugin, + resourceTimelinePlugin, + resourceTimeGridPlugin, + adaptivePlugin, + multiMonthPlugin, + ]; + const filteredPlugins = plugins.filter((plugin) => { + if (licenceKey === "") { + return ![ + resourceTimelinePlugin, + resourceTimeGridPlugin, + adaptivePlugin, + ].includes(plugin); + } else { + return true; + } + }); return ( - { - let left = 0; - const ele = info.jsEvent.target as HTMLElement; - if (info.view.type === ViewType.DAY) { - if (info.allDay) { - left = ele.offsetParent?.parentElement?.offsetLeft || 0; - } else { - left = ele.parentElement?.offsetLeft || 0; - } - } else { - if (info.allDay) { - left = - ele.offsetParent?.parentElement?.parentElement?.offsetLeft || - 0; + + { + let left = 0; + const ele = info.jsEvent.target as HTMLElement; + if (info.view.type === ViewType.DAY) { + if (info.allDay) { + left = ele.offsetParent?.parentElement?.offsetLeft || 0; + } else { + left = ele.parentElement?.offsetLeft || 0; + } } else { - left = - ele.offsetParent?.parentElement?.parentElement?.parentElement - ?.offsetLeft || 0; + if (info.allDay) { + left = + ele.offsetParent?.parentElement?.parentElement?.offsetLeft || + 0; + } else { + left = + ele.offsetParent?.parentElement?.parentElement?.parentElement + ?.offsetLeft || 0; + } } - } - setLeft(left); - }} - buttonText={buttonText} - schedulerLicenseKey={licenceKey} - views={views} - eventClassNames={() => (!showEventTime ? "no-time" : "")} - slotLabelFormat={slotLabelFormat} - viewClassNames={viewClassNames} - moreLinkText={trans("calendar.more")} - initialDate={initialDate} - initialView={defaultView} - editable={editable} - selectable={editable} - selectMirror={false} - displayEventTime={showEventTime} - dayMaxEvents={dayMaxEvents} - eventMaxStack={eventMaxStack || undefined} - weekends={showWeekends} - allDaySlot={showAllDay} - eventContent={renderEventContent} - select={(info) => handleCreate(info)} - eventClick={(info) => { - const event = events.find( - (item: EventType) => item.id === info.event.id - ); - editEvent.current = event; - setTimeout(() => { - editEvent.current = undefined; - }, 500); - }} - eventsSet={(info) => { - let needChange = false; - let changeEvents: EventType[] = []; - info.forEach((item) => { - const event = events.find((i: EventType) => i.id === item.id); - const start = dayjs(item.start, DateParser).format(); - const end = dayjs(item.end, DateParser).format(); - if ( - start !== event?.start || - end !== event?.end || - !!item.allDay !== !!event?.allDay - ) { - needChange = true; - changeEvents.push({ - ...event, - allDay: item.allDay, - start: item.startStr, - end: item.endStr, - }); - } else { - changeEvents.push(event); + setLeft(left); + }} + buttonText={buttonText} + schedulerLicenseKey={licenceKey} + views={views} + resources={ defaultView == "resourceTimelineDay" || defaultView == "resourceTimeGridDay" ? resources : [] } + eventClassNames={() => (!showEventTime ? "no-time" : "")} + slotLabelFormat={currentSlotLabelFormat} + viewClassNames={viewClassNames} + moreLinkText={trans("calendar.more")} + initialDate={initialDate} + initialView={defaultView} + editable={editable} + selectable={editable} + datesSet={handleDatesSet} + selectMirror={false} + displayEventTime={showEventTime} + dayMaxEvents={dayMaxEvents} + eventMaxStack={eventMaxStack || undefined} + weekends={showWeekends} + allDaySlot={showAllDay} + eventContent={renderEventContent} + select={(info) => handleCreate(info)} + eventClick={(info) => { + const event = events.find( + (item: EventType) => item.id === info.event.id + ); + editEvent.current = event; + setTimeout(() => { + editEvent.current = undefined; + }, 500); + }} + eventsSet={(info) => { + let needChange = false; + let changeEvents: EventType[] = []; + info.forEach((item) => { + const event = events.find((i: EventType) => i.id === item.id); + const start = dayjs(item.start, DateParser).format(); + const end = dayjs(item.end, DateParser).format(); + if ( + start !== event?.start || + end !== event?.end || + !!item.allDay !== !!event?.allDay + ) { + needChange = true; + changeEvents.push({ + ...event, + allDay: item.allDay, + start: item.startStr, + end: item.endStr, + }); + } else { + changeEvents.push(event); + } + }); + if (needChange) { + // props.events.onChange(changeEvents); + props.onEvent("change"); } - }); - if (needChange) { - props.events.onChange(changeEvents); - props.onEvent("change"); - } - }} - /> + }} + /> + ); }) - .setPropertyViewFn((children) => { + .setPropertyViewFn((children: { + licenceKey: { getView: () => any; propertyView: (arg0: { label: string; }) => any; }; + events: { propertyView: (arg0: {}) => any; }; + resources: { propertyView: (arg0: {}) => any; }; + onEvent: { getPropertyView: () => any; }; + editable: { propertyView: (arg0: { label: string; }) => any; }; + defaultDate: { propertyView: (arg0: { label: string; tooltip: string; }) => any; }; + defaultFreeView: { propertyView: (arg0: { label: string; tooltip: string; }) => any; }; + defaultPremiumView: { propertyView: (arg0: { label: string; tooltip: string; }) => any; }; + firstDay: { propertyView: (arg0: { label: string; }) => any; }; + showEventTime: { propertyView: (arg0: { label: string; tooltip: string; }) => any; }; + showWeekends: { propertyView: (arg0: { label: string; }) => any; }; + showAllDay: { propertyView: (arg0: { label: string; tooltip: string; }) => any; }; + dayMaxEvents: { propertyView: (arg0: { label: string; tooltip: string; }) => any; }; + eventMaxStack: { propertyView: (arg0: { label: string; tooltip: string; }) => any; }; + style: { getPropertyView: () => any; }; + resourceName: { propertyView: (arg0: {}) => any; }; + }) => { + let licence = children.licenceKey.getView(); + return ( <>
{children.events.propertyView({})} + {children.defaultDate.propertyView({ label: trans("calendar.defaultDate"), tooltip: trans("calendar.defaultDateTooltip"), })} +
+
+ {licence == "" ? null : children.resources.propertyView({})} + {licence == "" ? null : children.resourceName.propertyView({})}
- {children.licenceKey.propertyView({ - label: trans("calendar.licence"), - })} + {hiddenPropertyView(children)} {children.onEvent.getPropertyView()} + {children.editable.propertyView({ label: trans("calendar.editable"), })}
- {children.editable.propertyView({ - label: trans("calendar.editable"), - })} - {children.defaultDate.propertyView({ - label: trans("calendar.defaultDate"), - tooltip: trans("calendar.defaultDateTooltip"), - })} - {licence == "" - ? children.defaultFreeView.propertyView({ - label: trans("calendar.defaultView"), - tooltip: trans("calendar.defaultViewTooltip"), - }) - : children.defaultPremiumView.propertyView({ - label: trans("calendar.defaultView"), - tooltip: trans("calendar.defaultViewTooltip"), - })} - {children.firstDay.propertyView({ - label: trans("calendar.startWeek"), - })} - {children.showEventTime.propertyView({ - label: trans("calendar.showEventTime"), - tooltip: trans("calendar.showEventTimeTooltip"), - })} - {children.showWeekends.propertyView({ - label: trans("calendar.showWeekends"), - })} - {children.showAllDay.propertyView({ - label: trans("calendar.showAllDay"), - tooltip: trans("calendar.showAllDayTooltip"), - })} - {children.dayMaxEvents.propertyView({ - label: trans("calendar.dayMaxEvents"), - tooltip: trans("calendar.dayMaxEventsTooltip"), - })} - {children.eventMaxStack.propertyView({ - label: trans("calendar.eventMaxStack"), - tooltip: trans("calendar.eventMaxStackTooltip"), - })} + {children.showEventTime.propertyView({ label: trans("calendar.showEventTime"), tooltip: trans("calendar.showEventTimeTooltip"), })} + {children.showWeekends.propertyView({ label: trans("calendar.showWeekends"), })} + {children.showAllDay.propertyView({ label: trans("calendar.showAllDay"), tooltip: trans("calendar.showAllDayTooltip"), })} + {children.dayMaxEvents.propertyView({ label: trans("calendar.dayMaxEvents"), tooltip: trans("calendar.dayMaxEventsTooltip"), })} + {children.eventMaxStack.propertyView({ label: trans("calendar.eventMaxStack"), tooltip: trans("calendar.eventMaxStackTooltip"), })}
- {hiddenPropertyView(children)} + {children.licenceKey.propertyView({ label: trans("calendar.licence"), tooltip: trans("calendar.licenseTooltip"), })} + {licence == "" + ? children.defaultFreeView.propertyView({ label: trans("calendar.defaultView"), tooltip: trans("calendar.defaultViewTooltip"), }) + : children.defaultPremiumView.propertyView({ label: trans("calendar.defaultView"), tooltip: trans("calendar.defaultViewTooltip"), })} + {children.firstDay.propertyView({ label: trans("calendar.startWeek"), })}
{children.style.getPropertyView()} @@ -508,7 +586,24 @@ CalendarBasicComp = class extends CalendarBasicComp { } }; -export const CalendarComp = withExposingConfigs(CalendarBasicComp, [ +const TmpCalendarComp = withExposingConfigs(CalendarBasicComp, [ new NameConfig("events", trans("calendar.events")), + new NameConfig("resourcesEvents", trans("calendar.resourcesEvents")), + new NameConfig("resources", trans("calendar.resources")), NameConfigHidden, ]); + +export const CalendarComp = withMethodExposing(TmpCalendarComp, [ + { + method: { + name: "setCalendarView", + description: "timeGridWeek || timeGridDay || dayGridMonth || listWeek || resourceTimelineDay || resourceTimeGridDay || resourceTimelineWeek || resourceTimelineMonth", + params: [{ name: "viewType", type: "string" }], + }, + execute: (comp, values) => { + const viewType = values[0] as string; + viewType == "" ? viewType : "timeGridWeek"; + return comp.children.licenceKey.getView() == "" ? comp.children.defaultFreeView.dispatchChangeValueAction(viewType) : comp.children.defaultPremiumView.dispatchChangeValueAction(viewType); + } + }, +]); diff --git a/client/packages/lowcoder-comps/src/comps/calendarComp/calendarConstants.tsx b/client/packages/lowcoder-comps/src/comps/calendarComp/calendarConstants.tsx index 394c0427a..ead91980e 100644 --- a/client/packages/lowcoder-comps/src/comps/calendarComp/calendarConstants.tsx +++ b/client/packages/lowcoder-comps/src/comps/calendarComp/calendarConstants.tsx @@ -763,6 +763,7 @@ export const FormWrapper = styled(Form)` export type EventType = { id?: string; + resourceId?: string; label?: string; title?: string; start?: string; @@ -774,15 +775,28 @@ export type EventType = { }; export enum ViewType { + YEAR = "multiMonthYear", MONTH = "dayGridMonth", WEEK = "timeGridWeek", DAY = "timeGridDay", + DAYLIST = "dayGridDay", LIST = "listWeek", TIMEGRID = "timeGridDay", } - export const DefaultWithPremiumViewOptions = [ + { + label: trans("calendar.resourceTimeGridDay"), + value: "resourceTimeGridDay", + }, + { + label: trans("calendar.timeline"), + value: "resourceTimelineDay", + }, + { + label: trans("calendar.year"), + value: "multiMonthYear", + }, { label: trans("calendar.month"), value: "dayGridMonth", @@ -792,8 +806,12 @@ export const DefaultWithPremiumViewOptions = [ value: "timeGridWeek", }, { - label: trans("calendar.timeline"), - value: "resourceTimeline", + label: trans("calendar.weekdaygrid"), + value: "dayGridWeek", + }, + { + label: trans("calendar.daygrid"), + value: "dayGridDay", }, { label: trans("calendar.day"), @@ -806,6 +824,10 @@ export const DefaultWithPremiumViewOptions = [ ] as const; export const DefaultWithFreeViewOptions = [ + { + label: trans("calendar.year"), + value: "multiMonthYear", + }, { label: trans("calendar.month"), value: "dayGridMonth", @@ -814,6 +836,14 @@ export const DefaultWithFreeViewOptions = [ label: trans("calendar.week"), value: "timeGridWeek", }, + { + label: trans("calendar.weekdaygrid"), + value: "dayGridWeek", + }, + { + label: trans("calendar.daygrid"), + value: "dayGridDay", + }, { label: trans("calendar.day"), value: "timeGridDay", @@ -871,6 +901,58 @@ export const defaultData = [ allDay: true, }, ]; +export const resourcesEventsDefaultData = [ + { + id: "1", + resourceId: "d1", + title: "event 1", + start: dayjs().hour(10).minute(0).second(0).format(DATE_TIME_FORMAT), + end: dayjs().hour(17).minute(30).second(0).format(DATE_TIME_FORMAT), + color: "#079968", + }, + { + id: "2", + resourceId: "b", + title: "event 5", + start: dayjs().hour(8).minute(0).second(0).format(DATE_TIME_FORMAT), + end: dayjs().hour(16).minute(30).second(0).format(DATE_TIME_FORMAT), + color: "#079968", + }, + { + id: "3", + resourceId: "a", + title: "event 3", + start: dayjs().hour(12).minute(0).second(0).format(DATE_TIME_FORMAT), + end: dayjs().hour(21).minute(30).second(0).format(DATE_TIME_FORMAT), + color: "#079968", + }, +]; + +export const resourcesDefaultData = [ + { + id: "a", + title: "Auditorium A", + }, + { + id: "b", + title: "Auditorium B", + eventColor: "green", + }, + { + id: "d", + title: "Auditorium D", + children: [ + { + id: "d1", + title: "Room D1", + }, + { + id: "d2", + title: "Room D2", + }, + ], + }, +]; export const buttonText = { today: trans("calendar.today"), @@ -886,6 +968,16 @@ export const headerToolbar = { right: "prev today next dayGridMonth,timeGridWeek,timeGridDay,listWeek", }; +export const resourceTimeLineHeaderToolbar = { + left: "title", + right: + "prev today next resourceTimelineMonth,resourceTimelineWeek,resourceTimelineDay", +}; +export const resourceTimeGridHeaderToolbar = { + left: "title", + right: "prev today next", +}; + const weekHeadContent = (info: DayHeaderContentArg) => { const text = info.text.split(" "); return { @@ -930,7 +1022,17 @@ export const slotLabelFormat = [ { hour: "2-digit", minute: "2-digit", - }, + }, +] as FormatterInput[]; + +export const slotLabelFormatWeek = [ + { week: "short" }, + { hour: "2-digit" }, +] as FormatterInput[]; + +export const slotLabelFormatMonth = [ + { week: "short" }, + { weekday: "short" } ] as FormatterInput[]; export const viewClassNames = (info: ViewContentArg) => { @@ -943,4 +1045,4 @@ export const viewClassNames = (info: ViewContentArg) => { } } return className; -}; +}; \ No newline at end of file diff --git a/client/packages/lowcoder-comps/src/comps/calendarComp/errorBoundary.tsx b/client/packages/lowcoder-comps/src/comps/calendarComp/errorBoundary.tsx new file mode 100644 index 000000000..7a73fb254 --- /dev/null +++ b/client/packages/lowcoder-comps/src/comps/calendarComp/errorBoundary.tsx @@ -0,0 +1,30 @@ +import { default as Button } from "antd/es/button"; +import React from "react"; + +export default class ErrorBoundary extends React.Component { + constructor(props: any) { + super(props); + this.state = {}; + } + + static getDerivedStateFromError(error: any) { + // Update state so the next render will show the fallback UI. + return { errorMessage: error.toString() }; + } + + componentDidCatch(error: any, errorInfo: any) {} + + render() { + if (this.state.errorMessage) { + return ( + <> +

{this.state.errorMessage}

+ + + ); + } + return this.props.children; + } +} diff --git a/client/packages/lowcoder-comps/src/i18n/comps/locales/en.ts b/client/packages/lowcoder-comps/src/i18n/comps/locales/en.ts index 18c022991..120b47b53 100644 --- a/client/packages/lowcoder-comps/src/i18n/comps/locales/en.ts +++ b/client/packages/lowcoder-comps/src/i18n/comps/locales/en.ts @@ -98,8 +98,12 @@ export const en = { }, calendar: { events: "Events Data", + resources: "Resources", + resourcesDefault: "Rooms", + resourcesEvents : "Resources Events Data", editable: "Editable", licence: "Licence Key", + licenseTooltip: "Get your licence key from https://fullcalendar.io/purchase to enable premium views like Resource Timeline and Resource Grid.", defaultDate: "Default Date", defaultDateTooltip: "Initial display date of the calendar", defaultView: "Default View", @@ -125,9 +129,13 @@ export const en = { today: "Today", month: "Month", week: "Week", + weekdaygrid : "Days of Week", + daygrid : "Day Events List", + year: "Year", day: "Day", - list: "List", - timeline: "TimeLine", //added by fred + list: "Events List", + timeline: "Resource Timeline", //added by fred + resourceTimeGridDay: "Resource Grid", //added by fred monday: "Monday", tuesday: "Tuesday", wednesday: "Wednesday", diff --git a/client/packages/lowcoder-comps/src/i18n/comps/locales/zh.ts b/client/packages/lowcoder-comps/src/i18n/comps/locales/zh.ts index 28c9d202d..dc8975739 100644 --- a/client/packages/lowcoder-comps/src/i18n/comps/locales/zh.ts +++ b/client/packages/lowcoder-comps/src/i18n/comps/locales/zh.ts @@ -94,6 +94,11 @@ export const zh = { }, calendar: { events: "事件数据", + resources: "资源数据", + resourcesDefault: "客房", + resourcesEvents: "资源事件", + licence : "许可证密钥", + licenseTooltip: "从 https://fullcalendar.io/purchase 获取许可证密钥,启用资源时间轴和资源网格等高级视图。", editable: "可编辑", defaultDate: "默认日期", defaultDateTooltip: "日历最初显示的日期", @@ -120,6 +125,8 @@ export const zh = { week: "周", day: "日", list: "列表", + timeline: "时间轴", + resourceTimeGridDay: "资源时间网格日", monday: "星期一", tuesday: "星期二", wednesday: "星期三", diff --git a/client/packages/lowcoder-design/src/i18n/design/locales/en.ts b/client/packages/lowcoder-design/src/i18n/design/locales/en.ts index 543bb813a..3e667abe2 100644 --- a/client/packages/lowcoder-design/src/i18n/design/locales/en.ts +++ b/client/packages/lowcoder-design/src/i18n/design/locales/en.ts @@ -18,13 +18,14 @@ export const en = { }, prop: { basic: "Basic", + resources: "Resources", interaction: "Interaction", advanced: "Advanced", validation: "Validation", layout: "Layout", labelStyle:"Label Style", style: "Style", - meetings : "Meeting Settings", + meetings: "Meeting Settings", data: "Data", }, passwordInput: { diff --git a/client/packages/lowcoder-design/src/i18n/design/locales/zh.ts b/client/packages/lowcoder-design/src/i18n/design/locales/zh.ts index a3622dca0..9b9d6a742 100644 --- a/client/packages/lowcoder-design/src/i18n/design/locales/zh.ts +++ b/client/packages/lowcoder-design/src/i18n/design/locales/zh.ts @@ -18,6 +18,7 @@ export const zh = { }, prop: { basic: "基础", + resources: "资源", interaction: "交互", advanced: "高级", validation: "验证", diff --git a/client/packages/lowcoder/src/i18n/locales/en.ts b/client/packages/lowcoder/src/i18n/locales/en.ts index ee99fcec5..9a842833a 100644 --- a/client/packages/lowcoder/src/i18n/locales/en.ts +++ b/client/packages/lowcoder/src/i18n/locales/en.ts @@ -2643,7 +2643,7 @@ export const en = { "playground": { "url": "https://app.lowcoder.cloud/playground/{compType}/1", "data": "Current Data State", - "preview": "Preview (please mind, that your Editor-Layout/Logic Mode is active here too. You can set it to 'Both' in the App Editor to see all properties here too)", + "preview": "Preview", "property": "Properties", "console": "Visual Script Console", "executeMethods": "Execute Methods", diff --git a/client/packages/lowcoder/src/ide/CompPlayground.tsx b/client/packages/lowcoder/src/ide/CompPlayground.tsx index f458ee184..5446c320e 100644 --- a/client/packages/lowcoder/src/ide/CompPlayground.tsx +++ b/client/packages/lowcoder/src/ide/CompPlayground.tsx @@ -182,7 +182,7 @@ export function CompPlayground(props: IProps) {
- + {methods.length === 0 && (
{trans("playground.noMethods")}
)} diff --git a/client/yarn.lock b/client/yarn.lock index 16ca373cb..1a1530c25 100644 --- a/client/yarn.lock +++ b/client/yarn.lock @@ -2574,6 +2574,17 @@ __metadata: languageName: node linkType: hard +"@fullcalendar/multimonth@npm:^6.1.6": + version: 6.1.11 + resolution: "@fullcalendar/multimonth@npm:6.1.11" + dependencies: + "@fullcalendar/daygrid": ~6.1.11 + peerDependencies: + "@fullcalendar/core": ~6.1.11 + checksum: 213a9ac97e46319bbcfce3f02edaa1b808790f58669fee06e00a7fbb9f638dfabf37c6243234758670e75ee2c1e1cb247131c3a5bb469fec77b60db577b7326c + languageName: node + linkType: hard + "@fullcalendar/premium-common@npm:~6.1.11": version: 6.1.11 resolution: "@fullcalendar/premium-common@npm:6.1.11" @@ -2668,7 +2679,7 @@ __metadata: languageName: node linkType: hard -"@fullcalendar/timeline@npm:~6.1.11": +"@fullcalendar/timeline@npm:^6.1.6, @fullcalendar/timeline@npm:~6.1.11": version: 6.1.11 resolution: "@fullcalendar/timeline@npm:6.1.11" dependencies: @@ -13397,11 +13408,13 @@ __metadata: "@fullcalendar/interaction": ^6.1.6 "@fullcalendar/list": ^6.1.9 "@fullcalendar/moment": ^6.1.6 + "@fullcalendar/multimonth": ^6.1.6 "@fullcalendar/react": ^6.1.6 "@fullcalendar/resource": ^6.1.11 "@fullcalendar/resource-timegrid": ^6.1.11 "@fullcalendar/resource-timeline": ^6.1.11 "@fullcalendar/timegrid": ^6.1.6 + "@fullcalendar/timeline": ^6.1.6 "@types/react": ^18.2.45 "@types/react-dom": ^18.2.18 big.js: ^6.2.1