From 10a0277b4aa86883799f0f55c4fb34fced7d33ac Mon Sep 17 00:00:00 2001 From: tsv2013 Date: Wed, 10 Jul 2024 09:29:09 +0300 Subject: [PATCH 1/2] Reverted entry files changes --- src/entries/jquery-ui.ts | 8 ++------ src/entries/react-ui.ts | 4 +--- 2 files changed, 3 insertions(+), 9 deletions(-) diff --git a/src/entries/jquery-ui.ts b/src/entries/jquery-ui.ts index 55424a22bf..476a896aa2 100644 --- a/src/entries/jquery-ui.ts +++ b/src/entries/jquery-ui.ts @@ -3,6 +3,8 @@ import * as ReactDOM from "react-dom"; import jQuery from "jquery"; import { Survey, PopupSurvey } from "./jquery-ui-model"; +// localization +import "./chunks/localization"; import { SurveyModel } from "./core"; @@ -16,15 +18,12 @@ 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; // } @@ -43,11 +42,8 @@ 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 c4c6cfda91..5b1657484d 100644 --- a/src/entries/react-ui.ts +++ b/src/entries/react-ui.ts @@ -5,6 +5,4 @@ export { SurveyModel as Model } from "survey-core"; export * from "../utils/responsivity-manager"; export { unwrap } from "../utils/utils"; -import { checkLibraryVersion } from "survey-core"; - -checkLibraryVersion(`${process.env.VERSION}`, "survey-react-ui"); \ No newline at end of file +import { checkLibraryVersion } from "survey-core"; \ No newline at end of file From 5022180763b49e7f41aa65077e989f6b2288b8a4 Mon Sep 17 00:00:00 2001 From: tsv2013 Date: Wed, 10 Jul 2024 10:07:10 +0300 Subject: [PATCH 2/2] Full revert for #8529 --- src/entries/jquery-ui.ts | 6 ++++++ src/entries/react-ui.ts | 4 +++- src/react/reactquestion_file.tsx | 3 +-- 3 files changed, 10 insertions(+), 3 deletions(-) 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) {