Skip to content

Commit 3ecf1ac

Browse files
author
FalkWolsky
committed
Extending Event Handler Controllers 2 and increase SDK version
1 parent f28604f commit 3ecf1ac

File tree

5 files changed

+50
-8
lines changed

5 files changed

+50
-8
lines changed

client/packages/lowcoder-comps/src/comps/calendarComp/calendarComp.tsx

+6-5
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ import {
3131
StringControl,
3232
hiddenPropertyView,
3333
ChangeEventHandlerControl,
34-
// DragEventHandlerControl,
34+
DragEventHandlerControl,
3535
Section,
3636
sectionNames,
3737
dropdownControl,
@@ -75,7 +75,7 @@ const childrenMap = {
7575
resources: jsonValueExposingStateControl("resources", resourcesDefaultData),
7676
resourceName: withDefault(StringControl, trans("calendar.resourcesDefault")),
7777
onEvent: ChangeEventHandlerControl,
78-
// onDropEvent: DragEventHandlerControl,
78+
onDropEvent: DragEventHandlerControl,
7979
editable: withDefault(BoolControl, true),
8080
showEventTime: withDefault(BoolControl, true),
8181
showWeekends: withDefault(BoolControl, true),
@@ -524,11 +524,11 @@ let CalendarBasicComp = (function () {
524524
props.onEvent("change");
525525
}
526526
}}
527-
/* eventDragStop={(info) => {
527+
eventDragStop={(info) => {
528528
if (info.view) {
529529
props.onEventDrop("dropEvent");
530530
}
531-
}} */
531+
}}
532532
/>
533533
</ErrorBoundary>
534534
</Wrapper>
@@ -541,7 +541,7 @@ let CalendarBasicComp = (function () {
541541
resources: { propertyView: (arg0: {}) => any; };
542542
resourceName: { propertyView: (arg0: {}) => any; };
543543
onEvent: { getPropertyView: () => any; };
544-
// onDropEvent: { getPropertyView: () => any; };
544+
onDropEvent: { getPropertyView: () => any; };
545545
editable: { propertyView: (arg0: { label: string; }) => any; };
546546
showEventTime: { propertyView: (arg0: { label: string; tooltip: string; }) => any; };
547547
showWeekends: { propertyView: (arg0: { label: string; }) => any; };
@@ -574,6 +574,7 @@ let CalendarBasicComp = (function () {
574574
<Section name={sectionNames.interaction}>
575575
{hiddenPropertyView(children)}
576576
{children.onEvent.getPropertyView()}
577+
{children.onDropEvent.getPropertyView()}
577578
{children.editable.propertyView({ label: trans("calendar.editable"), })}
578579
</Section>
579580
<Section name={sectionNames.advanced}>

client/packages/lowcoder-sdk/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "lowcoder-sdk",
3-
"version": "2.4.0-beta-3",
3+
"version": "2.4.0-beta-4",
44
"type": "module",
55
"files": [
66
"src",

client/packages/lowcoder/src/comps/comps/meetingComp/videoMeetingControllerComp.tsx

+3
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ import { PositionControl } from "comps/controls/dropdownControl";
1717
import {
1818
closeEvent,
1919
eventHandlerControl,
20+
MeetingEventHandlerControl,
2021
} from "comps/controls/eventHandlerControl";
2122
import { styleControl } from "comps/controls/styleControl";
2223
import { DrawerStyle } from "comps/controls/styleControlConstants";
@@ -226,6 +227,7 @@ const rtmInit = async (appId: any, uid: any, token: any, channel: any) => {
226227
const meetingControllerChildren = {
227228
visible: withDefault(BooleanStateControl, "false"),
228229
onEvent: eventHandlerControl(EventOptions),
230+
onMeetingEvent: MeetingEventHandlerControl,
229231
width: StringControl,
230232
height: StringControl,
231233
autoHeight: AutoHeightControl,
@@ -589,6 +591,7 @@ let MTComp = (function () {
589591
</Section>
590592
<Section name={sectionNames.interaction}>
591593
{children.onEvent.getPropertyView()}
594+
{children.onMeetingEvent.getPropertyView()}
592595
</Section>
593596
</>
594597
)}

client/packages/lowcoder/src/comps/controls/eventHandlerControl.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -619,7 +619,7 @@ export const InputEventHandlerControl = eventHandlerControl([
619619
focusEvent,
620620
blurEvent,
621621
submitEvent,
622-
] as const);
622+
] as const); // , { title: trans("eventHandler.inputEventHandlers"), description: trans("eventHandler.inputEventHandlersDesc"), icon : "" } as const);
623623

624624
export const ButtonEventHandlerControl = eventHandlerControl([
625625
clickEvent,

client/packages/lowcoder/src/i18n/locales/en.ts

+39-1
Original file line numberDiff line numberDiff line change
@@ -275,7 +275,45 @@ export const en = {
275275
"throttle": "Throttle for",
276276
"slowdownTooltip": "Use debounce or throttle to control the frequency of action triggers. Time unit can be 'ms' (millisecond, default) or 's' (second).",
277277
"notHandledError": "Not Handled",
278-
"currentApp": "Current"
278+
"currentApp": "Current",
279+
280+
"inputEventHandlers": "Input Event Handlers",
281+
"inputEventHandlersDesc": "Event Handlers related to User Input",
282+
"buttonEventHandlers": "Button Event Handlers",
283+
"buttonEventHandlersDesc": "Event Handlers related to Button Clicks",
284+
"changeEventHandlers": "Change Event Handlers",
285+
"changeEventHandlersDesc": "Event Handlers related to Value Changes",
286+
"editedEventHandlers": "Edit Event Handlers",
287+
"editedEventHandlersDesc": "Event Handlers related to edited state of Elements",
288+
"clickEventHandlers": "Click Event Handlers",
289+
"clickEventHandlersDesc": "Event Handlers related to Clicks",
290+
"keyDownEventHandlers": "Key Down Event Handlers",
291+
"keyDownEventHandlersDesc": "Event Handlers related to Key Down Events",
292+
"checkboxEventHandlers": "Checkbox Event Handlers",
293+
"checkboxEventHandlersDesc": "Event Handlers related to Checkbox Changes",
294+
"dragEventHandlers": "Drag Event Handlers",
295+
"dragEventHandlersDesc": "Event Handlers related to Drag and Drop Events",
296+
"elementEventHandlers": "Element Event Handlers",
297+
"elementEventHandlersDesc": "Event Handlers related to generic Data Element Events",
298+
"mediaEventHandlers": "Media Event Handlers",
299+
"mediaEventHandlersDesc": "Event Handlers related to Media Events",
300+
"scannerEventHandlers": "Scanner Event Handlers",
301+
"scannerEventHandlersDesc": "Event Handlers related to Scanner Events",
302+
"chartEventHandlers": "Chart Event Handlers",
303+
"chartEventHandlersDesc": "Event Handlers related to Chart Events",
304+
"geoMapEventHandlers": "Geo Map Event Handlers",
305+
"geoMapEventHandlersDesc": "Event Handlers related to Geo Map Events",
306+
"stepEventHandlers": "Step Event Handlers",
307+
"stepEventHandlersDesc": "Event Handlers related to Step UI Events",
308+
"shareEventHandlers": "Share Event Handlers",
309+
"shareEventHandlersDesc": "Event Handlers related to Share Events",
310+
"selectEventHandlers": "Select Event Handlers",
311+
"selectEventHandlersDesc": "Event Handlers related to Select Events",
312+
"meetingEventHandlers": "Meeting Event Handlers",
313+
"meetingEventHandlersDesc": "Event Handlers related to Meeting Events",
314+
"collaborationEventHandlers": "Collaboration Event Handlers",
315+
"collaborationEventHandlersDesc": "Event Handlers related to Collaboration Events",
316+
279317
},
280318
"event": {
281319
"submit": "Submit",

0 commit comments

Comments
 (0)