survey-creator-react 1.12.59 → 1.12.61

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.5.7
2
+ * SurveyJS Creator v2.5.15
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
@@ -247,7 +247,7 @@ class SurveyCreator extends SurveyCreatorModel {
247
247
  return (React.createElement("div", { key: key },
248
248
  React.createElement("span", { className: cssClasses.error.icon, "aria-hidden": "true" }),
249
249
  React.createElement("span", { className: cssClasses.error.item },
250
- React.createElement(SurveyLocStringViewer, { locStr: error.locText }))));
250
+ React.createElement(SurveyLocStringViewer, { model: error.locText }))));
251
251
  }
252
252
  questionTitleLocation() {
253
253
  return this.survey.questionTitleLocation;
@@ -1024,19 +1024,34 @@ ReactQuestionFactory.Instance.registerQuestion("linkvalue", (props) => {
1024
1024
  });
1025
1025
 
1026
1026
  class SurveyElementEmbeddedSurvey extends SurveyQuestionElementBase {
1027
+ constructor() {
1028
+ super(...arguments);
1029
+ this.rootRef = React.createRef();
1030
+ }
1027
1031
  get embeddedSurvey() {
1028
- return (this.props.element || this.props.question);
1032
+ const element = (this.props.element || this.props.question);
1033
+ if (!element)
1034
+ return null;
1035
+ const survey = element.embeddedSurvey;
1036
+ if (!survey || !survey.currentPage)
1037
+ return null;
1038
+ return survey;
1029
1039
  }
1030
1040
  get creator() {
1031
1041
  return this.props.creator;
1032
1042
  }
1043
+ componentDidMount() {
1044
+ super.componentDidMount();
1045
+ if (this.embeddedSurvey) {
1046
+ this.embeddedSurvey.rootElement = this.rootRef.current;
1047
+ }
1048
+ }
1033
1049
  render() {
1034
- if (!this.embeddedSurvey)
1050
+ const survey = this.embeddedSurvey;
1051
+ if (!survey)
1035
1052
  return null;
1036
- const survey = this.embeddedSurvey.embeddedSurvey;
1037
- if (!survey || !survey.currentPage)
1038
- return null;
1039
- return React.createElement(SurveyPage, { survey: survey, page: survey.currentPage, css: survey.css, creator: this.creator });
1053
+ return React.createElement("div", { style: { display: "contents" }, ref: this.rootRef },
1054
+ React.createElement(SurveyPage, { survey: survey, page: survey.currentPage, css: survey.css, creator: this.creator }));
1040
1055
  }
1041
1056
  }
1042
1057
  ReactQuestionFactory.Instance.registerQuestion("embeddedsurvey", (props) => {
@@ -1357,7 +1372,7 @@ class SurveyResultsByRow extends CreatorModelElement {
1357
1372
  React.createElement("td", { key: 1, style: { paddingLeft: this.row.textMargin }, className: "svd-dark-border-color" },
1358
1373
  this.row.isNode ? (React.createElement("span", { style: { left: this.row.markerMargin }, className: "svd-test-results__marker " + (this.row.collapsed ? "" : "svd-test-results__marker--expanded") },
1359
1374
  React.createElement(SvgIcon, { iconName: "icon-expand_16x16", size: 16 }))) : null,
1360
- this.row.question ? React.createElement(SurveyLocStringViewer, { locStr: this.row.question.locTitle }) : React.createElement("span", null, this.row.title)),
1375
+ this.row.question ? React.createElement(SurveyLocStringViewer, { model: this.row.question.locTitle }) : React.createElement("span", null, this.row.title)),
1361
1376
  React.createElement("td", { key: 2, className: this.row.isNode ? "svd-test-results__node-value" : "svd-dark-border-color" }, this.row.getString(this.row.displayValue)))),
1362
1377
  this.row.isNode && !this.row.collapsed ? SurveyResults.renderRows(this.row.data) : null));
1363
1378
  }
@@ -1605,9 +1620,12 @@ class SearchComponent extends SurveyElementBase {
1605
1620
  if (!this.model.isVisible)
1606
1621
  return null;
1607
1622
  const onChange = (e) => {
1608
- const { root } = settings.environment;
1609
- if (e.target === root.activeElement) {
1610
- this.model.filterString = e.target.value;
1623
+ const target = e.target;
1624
+ const root = (target === null || target === void 0 ? void 0 : target.getRootNode()) || settings.environment.root;
1625
+ if (!(root instanceof Document || root instanceof ShadowRoot))
1626
+ return;
1627
+ if (target === root.activeElement) {
1628
+ this.model.filterString = target.value;
1611
1629
  }
1612
1630
  };
1613
1631
  return (React.createElement("div", { className: "svc-search" },
@@ -2039,10 +2057,10 @@ class SurveyLocStringEditor extends CreatorModelElement {
2039
2057
  return ["creator", "locString"];
2040
2058
  }
2041
2059
  get locString() {
2042
- return this.props.locStr.locStr;
2060
+ return this.props.model.locStr;
2043
2061
  }
2044
2062
  get creator() {
2045
- return this.props.locStr.creator;
2063
+ return this.props.model.creator;
2046
2064
  }
2047
2065
  get style() {
2048
2066
  return this.props.style;
@@ -2131,7 +2149,7 @@ class QuestionErrorComponent extends React.Component {
2131
2149
  return (React.createElement("div", null,
2132
2150
  React.createElement(SvgIcon, { "aria-hidden": "true", iconName: "icon-alert_24x24", size: "24", className: this.props.cssClasses.error.icon }),
2133
2151
  React.createElement("span", { className: this.props.cssClasses.error.item || undefined },
2134
- React.createElement(SurveyLocStringViewer, { locStr: this.props.error.locText }))));
2152
+ React.createElement(SurveyLocStringViewer, { model: this.props.error.locText }))));
2135
2153
  }
2136
2154
  }
2137
2155
  ReactElementFactory.Instance.registerElement("svc-question-error", (props) => {
@@ -2724,8 +2742,8 @@ class ComponentContainer extends React.Component {
2724
2742
  super(props);
2725
2743
  }
2726
2744
  render() {
2727
- return (React.createElement("div", { className: "svc-component-container" }, this.props.model.elements.map((element, index) => {
2728
- return ReactElementFactory.Instance.createElement(element.componentName, { model: element.componentData, key: index });
2745
+ return (React.createElement("div", { className: this.props.model.cssClass }, this.props.model.elements.map((element, index) => {
2746
+ return ReactElementFactory.Instance.createElement(element.componentName, Object.assign(Object.assign({}, element.componentData), { key: index }));
2729
2747
  })));
2730
2748
  }
2731
2749
  }
@@ -2947,8 +2965,8 @@ ReactQuestionFactory.Instance.registerQuestion("sv-boolean-switch", (props) => {
2947
2965
  RendererFactory.Instance.registerRenderer("boolean", "switch", "sv-boolean-switch");
2948
2966
 
2949
2967
  let Version;
2950
- Version = `${"2.5.7"}`;
2951
- checkLibraryVersion(`${"2.5.7"}`, "survey-creator-react");
2968
+ Version = `${"2.5.15"}`;
2969
+ checkLibraryVersion(`${"2.5.15"}`, "survey-creator-react");
2952
2970
 
2953
2971
  export { ActionButton, AdaptiveToolbox, CellQuestionAdornerComponent, CellQuestionDropdownAdornerComponent, ComponentContainer, 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 };
2954
2972
  //# sourceMappingURL=survey-creator-react.mjs.map