Merge branch 'feature/page-events' into 'release'
Page events See merge request theappsmith/internal-tools-client!395
This commit is contained in:
commit
b377502720
|
|
@ -144,10 +144,19 @@ const DraggableComponent = (props: DraggableComponentProps) => {
|
|||
props.widgetId === propertyPaneState.widgetId) ||
|
||||
props.widgetId !== propertyPaneState.widgetId
|
||||
) {
|
||||
AnalyticsUtil.logEvent("PROPERTY_PANE_OPEN_CLICK", {
|
||||
widgetType: props.type,
|
||||
widgetId: props.widgetId,
|
||||
});
|
||||
showPropertyPane && showPropertyPane(props.widgetId, undefined, true);
|
||||
} else {
|
||||
AnalyticsUtil.logEvent("PROPERTY_PANE_CLOSE_CLICK", {
|
||||
widgetType: props.type,
|
||||
widgetId: props.widgetId,
|
||||
});
|
||||
showPropertyPane && showPropertyPane();
|
||||
}
|
||||
|
||||
e.preventDefault();
|
||||
e.stopPropagation();
|
||||
};
|
||||
|
|
|
|||
|
|
@ -82,6 +82,12 @@ class PropertyPane extends Component<
|
|||
|
||||
<CloseButton
|
||||
onClick={(e: any) => {
|
||||
AnalyticsUtil.logEvent("PROPERTY_PANE_CLOSE_CLICK", {
|
||||
widgetType: this.props.widgetProperties
|
||||
? this.props.widgetProperties.type
|
||||
: "",
|
||||
widgetId: this.props.widgetId,
|
||||
});
|
||||
this.props.hidePropertyPane();
|
||||
e.preventDefault();
|
||||
e.stopPropagation();
|
||||
|
|
@ -167,6 +173,40 @@ class PropertyPane extends Component<
|
|||
}
|
||||
};
|
||||
|
||||
shouldComponentUpdate(nextProps: PropertyPaneProps & PropertyPaneFunctions) {
|
||||
if (
|
||||
nextProps.widgetId !== this.props.widgetId &&
|
||||
nextProps.widgetId !== undefined
|
||||
) {
|
||||
if (this.props.widgetId && this.props.widgetProperties) {
|
||||
AnalyticsUtil.logEvent("PROPERTY_PANE_CLOSE", {
|
||||
widgetType: this.props.widgetProperties.type,
|
||||
widgetId: this.props.widgetId,
|
||||
});
|
||||
}
|
||||
if (nextProps.widgetProperties) {
|
||||
AnalyticsUtil.logEvent("PROPERTY_PANE_OPEN", {
|
||||
widgetType: nextProps.widgetProperties.type,
|
||||
widgetId: nextProps.widgetId,
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
if (
|
||||
nextProps.widgetId === this.props.widgetId &&
|
||||
nextProps.isVisible &&
|
||||
!this.props.isVisible &&
|
||||
nextProps.widgetProperties !== undefined
|
||||
) {
|
||||
AnalyticsUtil.logEvent("PROPERTY_PANE_OPEN", {
|
||||
widgetType: nextProps.widgetProperties.type,
|
||||
widgetId: nextProps.widgetId,
|
||||
});
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
onPropertyChange(propertyName: string, propertyValue: any) {
|
||||
this.props.updateWidgetProperty(
|
||||
this.props.widgetId,
|
||||
|
|
|
|||
|
|
@ -42,7 +42,11 @@ export type EventName =
|
|||
| "SAVE_DATA_SOURCE"
|
||||
| "NAVIGATE"
|
||||
| "PAGE_LOAD"
|
||||
| "NAVIGATE_EDITOR";
|
||||
| "NAVIGATE_EDITOR"
|
||||
| "PROPERTY_PANE_OPEN"
|
||||
| "PROPERTY_PANE_CLOSE"
|
||||
| "PROPERTY_PANE_OPEN_CLICK"
|
||||
| "PROPERTY_PANE_CLOSE_CLICK";
|
||||
|
||||
export type Gender = "MALE" | "FEMALE";
|
||||
export interface User {
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user