survey-creator-js 2.5.21 → 2.5.23

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 v2.5.21
2
+ * SurveyJS Creator v2.5.23
3
3
  * (c) 2015-2026 Devsoft Baltic OÜ - http://surveyjs.io/
4
4
  * Github: https://github.com/surveyjs/survey-creator
5
5
  * License: https://surveyjs.io/Licenses#SurveyCreator
@@ -2191,10 +2191,8 @@ class SurveyPageNavigator extends CreatorModelElement {
2191
2191
  }
2192
2192
  componentDidMount() {
2193
2193
  super.componentDidMount();
2194
- if (this.props.pageEditMode !== "bypage") {
2195
- const el = this.containerRef.current;
2196
- this.model.attachToUI(el);
2197
- }
2194
+ const el = this.containerRef.current;
2195
+ this.model.attachToUI(el);
2198
2196
  }
2199
2197
  componentWillUnmount() {
2200
2198
  super.componentWillUnmount();
@@ -2517,6 +2515,11 @@ ReactElementFactory.Instance.registerElement("svc-tab-logic", (props) => {
2517
2515
  return React.createElement(TabLogicComponent, props);
2518
2516
  });
2519
2517
 
2518
+ function simulatorShellStyle(overlayHeight) {
2519
+ return overlayHeight
2520
+ ? { ["--sv-popup-overlay-height"]: overlayHeight }
2521
+ : {};
2522
+ }
2520
2523
  class SurveySimulator extends SurveyElementBase {
2521
2524
  get model() {
2522
2525
  return this.props.model;
@@ -2524,8 +2527,21 @@ class SurveySimulator extends SurveyElementBase {
2524
2527
  getStateElement() {
2525
2528
  return this.model;
2526
2529
  }
2530
+ componentDidMount() {
2531
+ super.componentDidMount();
2532
+ this.model.queueSurveyLayoutRefresh();
2533
+ }
2534
+ componentDidUpdate(prevProps, prevState) {
2535
+ super.componentDidUpdate(prevProps, prevState);
2536
+ this.model.queueSurveyLayoutRefresh();
2537
+ }
2538
+ componentWillUnmount() {
2539
+ this.model.cancelSurveyLayoutRefresh();
2540
+ super.componentWillUnmount();
2541
+ }
2527
2542
  renderElement() {
2528
2543
  const mainSimulatorClass = this.model.getRootCss();
2544
+ const shellStyle = simulatorShellStyle(this.model.popupOverlayHeight);
2529
2545
  if (!this.model.survey) {
2530
2546
  return React.createElement("div", { className: mainSimulatorClass });
2531
2547
  }
@@ -2542,12 +2558,12 @@ class SurveySimulator extends SurveyElementBase {
2542
2558
  this.model.simulatorFrame.scale +
2543
2559
  ") translate(-50%, -50%)"
2544
2560
  } },
2545
- React.createElement("div", { className: "svd-simulator-content" },
2561
+ React.createElement("div", { className: "svd-simulator-content", style: shellStyle },
2546
2562
  React.createElement(Survey, { model: this.model.survey }))))));
2547
2563
  }
2548
2564
  else {
2549
2565
  return (React.createElement("div", { className: mainSimulatorClass },
2550
- React.createElement("div", { className: "svd-simulator-content" },
2566
+ React.createElement("div", { className: "svd-simulator-content", style: shellStyle },
2551
2567
  React.createElement(Survey, { model: this.model.survey }))));
2552
2568
  }
2553
2569
  }
@@ -2957,8 +2973,8 @@ ReactQuestionFactory.Instance.registerQuestion("sv-boolean-switch", (props) => {
2957
2973
  RendererFactory.Instance.registerRenderer("boolean", "switch", "sv-boolean-switch");
2958
2974
 
2959
2975
  let Version;
2960
- Version = `${"2.5.21"}`;
2961
- checkLibraryVersion(`${"2.5.21"}`, "survey-creator-react");
2976
+ Version = `${"2.5.23"}`;
2977
+ checkLibraryVersion(`${"2.5.23"}`, "survey-creator-react");
2962
2978
 
2963
2979
  function renderSurveyCreator(creator, element, props = {}) {
2964
2980
  let node = element;