PluginProbe
HubSpot All-In-One Marketing – Forms, Popups, Live Chat / 11.1.21
HubSpot All-In-One Marketing – Forms, Popups, Live Chat v11.1.21
11.3.75 11.3.73 11.3.71 11.3.70 11.3.69 11.3.64 11.3.65 11.3.62 11.3.61 11.3.56 11.3.58 11.0.31 11.0.52 11.0.54 11.0.56 11.0.58 11.0.7 11.1.10 11.1.11 11.1.13 11.1.14 11.1.15 11.1.2 11.1.20 11.1.21 All 73 releases
leadin / scripts / elementor / MeetingWidget / registerMeetingWidget.ts

registerMeetingWidget.ts in HubSpot All-In-One Marketing – Forms, Popups, Live Chat 11.1.21, at scripts/elementor/MeetingWidget/registerMeetingWidget.ts

43 lines 1.1 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 import ReactDOM from 'react-dom';
2 import MeetingControlController from './MeetingControlController';
3 import MeetingWidgetController from './MeetingWidgetController';
4
5 export interface IMeetingAttributes {
6 url: string;
7 }
8
9 export default class registerMeetingsWidget {
10 widgetContainer: Element;
11 controlContainer: Element;
12 setValue: Function;
13 attributes: IMeetingAttributes;
14
15 constructor(controlContainer: any, widgetContainer: any, setValue: Function) {
16 const attributes = widgetContainer.dataset.attributes
17 ? JSON.parse(widgetContainer.dataset.attributes)
18 : {};
19
20 this.widgetContainer = widgetContainer;
21 this.controlContainer = controlContainer;
22 this.setValue = setValue;
23 this.attributes = attributes;
24 }
25
26 render() {
27 ReactDOM.render(
28 MeetingWidgetController(this.attributes, this.setValue)(),
29 this.widgetContainer
30 );
31
32 ReactDOM.render(
33 MeetingControlController(this.attributes, this.setValue)(),
34 this.controlContainer
35 );
36 }
37
38 done() {
39 ReactDOM.unmountComponentAtNode(this.widgetContainer);
40 ReactDOM.unmountComponentAtNode(this.controlContainer);
41 }
42 }
43