diff --git a/src/entries/jquery-ui.ts b/src/entries/jquery-ui.ts index 476a896aa2..e1a20dc0ba 100644 --- a/src/entries/jquery-ui.ts +++ b/src/entries/jquery-ui.ts @@ -18,12 +18,15 @@ jQuery["fn"].extend({ PopupSurvey: doPopupSurvey, SurveyWindow: doPopupSurvey }); + function doPopupSurvey(props: any): void { return this.each(function () { var model: Survey = props.model; const survey = React.createElement(PopupSurvey, { ...props }); ReactDOM.render(survey, this); + // var popupSurvey = props.popupModel || new PopupSurvey(model); + // if (props.expanded !== undefined) { // popupSurvey.isExpanded = props.expanded; // } @@ -42,8 +45,11 @@ function doPopupSurvey(props: any): void { // popupSurvey.show(); }); } + SurveyModel.platform = "jquery"; + export const preact: any = React; + export * from "./jquery-ui-model"; export * from "./core-export"; diff --git a/src/entries/react-ui.ts b/src/entries/react-ui.ts index 5b1657484d..c4c6cfda91 100644 --- a/src/entries/react-ui.ts +++ b/src/entries/react-ui.ts @@ -5,4 +5,6 @@ export { SurveyModel as Model } from "survey-core"; export * from "../utils/responsivity-manager"; export { unwrap } from "../utils/utils"; -import { checkLibraryVersion } from "survey-core"; \ No newline at end of file +import { checkLibraryVersion } from "survey-core"; + +checkLibraryVersion(`${process.env.VERSION}`, "survey-react-ui"); \ No newline at end of file diff --git a/src/react/reactquestion_file.tsx b/src/react/reactquestion_file.tsx index 634492f69a..68f80a85c6 100644 --- a/src/react/reactquestion_file.tsx +++ b/src/react/reactquestion_file.tsx @@ -7,8 +7,7 @@ import { ReactQuestionFactory } from "./reactquestion_factory"; import { attachKey2click } from "./reactSurvey"; import { LoadingIndicatorComponent } from "./components/loading-indicator"; import { SurveyAction } from "./components/action-bar/action-bar-item"; -import { ReactElementFactory } from "./element-factory"; -import { SurveyFileChooseButton } from "./components/file/file-choose-button"; +import { ReactElementFactory, SurveyFileChooseButton } from "../entries/react-ui-model"; export class SurveyQuestionFile extends SurveyQuestionElementBase { constructor(props: any) {