survey-creator-react 2.3.7 → 2.3.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * SurveyJS Creator React v2.3.7
2
+ * SurveyJS Creator React v2.3.9
3
3
  * (c) 2015-2025 Devsoft Baltic OÜ - http://surveyjs.io/
4
4
  * Github: https://github.com/surveyjs/survey-creator
5
5
  * License: https://surveyjs.io/Licenses#SurveyCreator
@@ -51,6 +51,7 @@ class TabbedMenuItemWrapper extends SurveyElementBase {
51
51
  constructor(props) {
52
52
  super(props);
53
53
  this.ref = React.createRef();
54
+ this.state = { changed: 0 };
54
55
  }
55
56
  get item() {
56
57
  return this.props.item;
@@ -71,14 +72,22 @@ class TabbedMenuItemWrapper extends SurveyElementBase {
71
72
  componentDidMount() {
72
73
  super.componentDidMount();
73
74
  this.item.updateModeCallback = (mode, callback) => {
75
+ const update = () => {
76
+ if (this.item.mode == mode) {
77
+ this.setState({ changed: this.state.changed + 1 });
78
+ }
79
+ else {
80
+ this.item.mode = mode;
81
+ }
82
+ };
74
83
  queueMicrotask(() => {
75
84
  if (ReactDOM["flushSync"]) {
76
85
  ReactDOM["flushSync"](() => {
77
- this.item.mode = mode;
86
+ update();
78
87
  });
79
88
  }
80
89
  else {
81
- this.item.mode = mode;
90
+ update();
82
91
  }
83
92
  queueMicrotask(() => {
84
93
  callback(mode, this.ref.current);
@@ -620,7 +629,7 @@ class QuestionImageAdornerComponent extends QuestionAdornerComponent {
620
629
  return [this.model, this.imageModel.filePresentationModel];
621
630
  }
622
631
  renderElementContent() {
623
- if (this.imageModel.isEmptyImageLink) {
632
+ if (this.imageModel.isEmptyElement) {
624
633
  const fileQuestion = ReactQuestionFactory.Instance.createQuestion("file", {
625
634
  creator: this.imageModel.question.survey,
626
635
  isDisplayMode: false,
@@ -2881,8 +2890,8 @@ ReactQuestionFactory.Instance.registerQuestion("sv-boolean-switch", (props) => {
2881
2890
  RendererFactory.Instance.registerRenderer("boolean", "switch", "sv-boolean-switch");
2882
2891
 
2883
2892
  let Version;
2884
- Version = `${"2.3.7"}`;
2885
- checkLibraryVersion(`${"2.3.7"}`, "survey-creator-react");
2893
+ Version = `${"2.3.9"}`;
2894
+ checkLibraryVersion(`${"2.3.9"}`, "survey-creator-react");
2886
2895
 
2887
2896
  export { ActionButton, AdaptiveToolbox, CellQuestionAdornerComponent, CellQuestionDropdownAdornerComponent, CreatorSurveyPageComponent, ImageItemValueAdornerComponent, ItemValueAdornerComponent, LogoImageComponent, MatrixCellAdornerComponent, PanelAdornerComponent, PropertyGridComponent, PropertyGridPlaceholderComponent, QuestionAdornerComponent, QuestionBanner, QuestionDropdownAdornerComponent, QuestionEditorContentComponent, QuestionErrorComponent, QuestionImageAdornerComponent, QuestionRatingAdornerComponent, QuestionWidgetAdornerComponent, QuestionWrapperFooter, QuestionWrapperHeader, ReactDragEvent, ReactMouseEvent, RowWrapper, SearchComponent, SideBarDefaultHeader, SidebarComponent, SurveyCreator, SurveyCreatorComponent, SurveyCreatorToolboxCategory, SurveyCreatorToolboxItem, SurveyCreatorToolboxItemGroup, SurveyCreatorToolboxTool, SurveyElementEmbeddedSurvey, SurveyLocStringEditor, SurveyLogicOpertor, SurveyNavigation, SurveyQuestionBooleanSwitch, SurveyQuestionColor, SurveyQuestionFileEditor, SurveyQuestionLinkValue, SurveyQuestionSpinEditor, SurveyQuestionTextWithReset, SurveyResults, SurveyResultsByRow, SurveySimulator, SwitcherComponent, TabButtonComponent, TabDesignerComponent, TabJsonEditorAceComponent, TabJsonEditorErrorsComponent, TabJsonEditorTextareaComponent, TabLogicAddButtonComponent, TabLogicComponent, TabPreviewSurveyComponent, TabPreviewTestSurveyAgainComponent, TabThemeSurveyComponent, TabTranslationComponent, TabbedMenuComponent, TabbedMenuItemComponent, ToolboxList, TranslateFromAction, TranslationLineSkeleton, Version };
2888
2897
  //# sourceMappingURL=survey-creator-react.mjs.map