survey-creator-react 1.12.41 → 1.12.43

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.2.0
2
+ * SurveyJS Creator React v2.2.3
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
@@ -11,7 +11,7 @@ import { ReactElementFactory, SurveyElementBase, attachKey2click, SvgIcon, Surve
11
11
  import { SurveyCreatorModel, assign, RowViewModel, QuestionAdornerViewModel, QuestionDropdownAdornerViewModel, QuestionImageAdornerViewModel, QuestionRatingAdornerViewModel, PageAdorner, LogoImageViewModel, editorLocalization, ItemValueWrapperViewModel, ImageItemValueWrapperViewModel, MatrixCellWrapperViewModel, SurveyResultsModel, ToolboxToolViewModel, editableStringRendererName, StringEditorViewModelBase, initLogicOperator, PageNavigatorViewModel } from 'survey-creator-core';
12
12
  export { PropertyGridEditorCollection, SurveyLogic, SurveyLogicUI, SurveyQuestionEditorDefinition, ToolboxToolViewModel, editorLocalization, localization, settings, svgBundle } from 'survey-creator-core';
13
13
  import * as ReactDOM from 'react-dom';
14
- import { ResponsivityManager, CssClassBuilder, settings, VerticalResponsivityManager, RendererFactory, unwrap, checkLibraryVersion } from 'survey-core';
14
+ import { CssClassBuilder, settings, RendererFactory, unwrap, checkLibraryVersion } from 'survey-core';
15
15
 
16
16
  class TabbedMenuComponent extends SurveyElementBase {
17
17
  get model() {
@@ -26,17 +26,24 @@ class TabbedMenuComponent extends SurveyElementBase {
26
26
  }
27
27
  renderElement() {
28
28
  const items = this.model.renderedActions.map((item) => React.createElement(TabbedMenuItemWrapper, { item: item, key: item.renderedId }));
29
- return (React.createElement("div", { ref: this.rootRef, className: "svc-tabbed-menu", role: "tablist" }, items));
29
+ return (React.createElement("div", { ref: this.rootRef, className: "svc-tabbed-menu", role: "tablist", style: this.model.getRootStyle() }, items));
30
+ }
31
+ componentDidUpdate(prevProps, prevState) {
32
+ super.componentDidUpdate(prevProps, prevState);
33
+ const container = this.rootRef.current;
34
+ if (!container)
35
+ return;
36
+ this.model.initResponsivityManager(container);
30
37
  }
31
38
  componentDidMount() {
32
39
  super.componentDidMount();
33
40
  const container = this.rootRef.current;
34
41
  if (!container)
35
42
  return;
36
- this.manager = new ResponsivityManager(container, this.model);
43
+ this.model.initResponsivityManager(container);
37
44
  }
38
45
  componentWillUnmount() {
39
- this.manager && (this.manager.dispose());
46
+ this.model.resetResponsivityManager();
40
47
  super.componentWillUnmount();
41
48
  }
42
49
  }
@@ -1569,17 +1576,22 @@ class AdaptiveToolbox extends SurveyElementBase {
1569
1576
  super(props);
1570
1577
  this.rootRef = React.createRef();
1571
1578
  }
1579
+ componentDidUpdate(prevProps, prevState) {
1580
+ super.componentDidUpdate(prevProps, prevState);
1581
+ const container = this.rootRef.current;
1582
+ if (container) {
1583
+ this.toolbox.afterRender(container);
1584
+ }
1585
+ }
1572
1586
  componentDidMount() {
1573
1587
  super.componentDidMount();
1574
1588
  const container = this.rootRef.current;
1575
- this.toolbox.setRootElement(container);
1576
- if (!container)
1577
- return;
1578
- this.manager = new VerticalResponsivityManager(this.toolbox.containerElement, this.toolbox);
1589
+ if (container) {
1590
+ this.toolbox.afterRender(container);
1591
+ }
1579
1592
  }
1580
1593
  componentWillUnmount() {
1581
- this.manager && (this.manager.dispose());
1582
- this.toolbox.setRootElement(undefined);
1594
+ this.toolbox.beforeDestroy();
1583
1595
  super.componentWillUnmount();
1584
1596
  }
1585
1597
  get creator() {
@@ -1612,11 +1624,9 @@ class AdaptiveToolbox extends SurveyElementBase {
1612
1624
  React.createElement("div", { className: "svc-toolbox__category-separator svc-toolbox__category-separator--search" })));
1613
1625
  }
1614
1626
  render() {
1615
- if (!this.toolbox.hasActions)
1616
- return null;
1617
1627
  const search = this.toolbox.showSearch ? this.renderSearch() : null;
1618
1628
  const placeholder = this.toolbox.showPlaceholder ? React.createElement("div", { className: "svc-toolbox__placeholder" }, this.toolbox.toolboxNoResultsFound) : null;
1619
- return (React.createElement("div", { ref: this.rootRef, className: this.toolbox.classNames },
1629
+ return (React.createElement("div", { ref: this.rootRef, className: this.toolbox.classNames, style: this.toolbox.getRootStyle() },
1620
1630
  React.createElement("div", { onBlur: (e) => this.toolbox.focusOut(e), className: "svc-toolbox__panel" },
1621
1631
  search,
1622
1632
  placeholder,
@@ -2032,12 +2042,12 @@ class SurveyLocStringEditor extends CreatorModelElement {
2032
2042
  if (this.htmlValue.__html !== this.locString.renderedHtml) {
2033
2043
  this.htmlValue = { __html: this.locString.renderedHtml };
2034
2044
  }
2035
- control = (React.createElement("span", { role: "textbox", ref: this.svStringEditorRef, className: "sv-string-editor sv-string-editor--html", contentEditable: this.contentEditable, spellCheck: false, "aria-placeholder": this.placeholder, "aria-label": this.placeholder || "content editable", suppressContentEditableWarning: true,
2045
+ control = (React.createElement("span", { role: "textbox", ref: this.svStringEditorRef, className: "sv-string-editor sv-string-editor--html", contentEditable: this.contentEditable, spellCheck: false, "aria-placeholder": this.placeholder, "aria-label": this.placeholder || "content editable", suppressContentEditableWarning: true, tabIndex: this.baseModel.tabIndex,
2036
2046
  // style={this.style}
2037
2047
  dangerouslySetInnerHTML: this.htmlValue, onBlur: this.onBlur, onFocus: this.onFocus, onKeyDown: this.onKeyDown, onMouseUp: this.onMouseUp, onClick: this.edit }));
2038
2048
  }
2039
2049
  else {
2040
- control = (React.createElement("span", { role: "textbox", ref: this.svStringEditorRef, className: "sv-string-editor", contentEditable: this.contentEditable, spellCheck: false, "aria-placeholder": this.placeholder, "aria-label": this.placeholder || "content editable", suppressContentEditableWarning: true,
2050
+ control = (React.createElement("span", { role: "textbox", ref: this.svStringEditorRef, className: "sv-string-editor", contentEditable: this.contentEditable, tabIndex: this.baseModel.tabIndex, spellCheck: false, "aria-placeholder": this.placeholder, "aria-label": this.placeholder || "content editable", suppressContentEditableWarning: true,
2041
2051
  // style={this.style}
2042
2052
  key: this.locString.renderedHtml, onBlur: this.onBlur, onInput: this.onInput, onPaste: this.onPaste, onCompositionStart: this.onCompositionStart, onCompositionEnd: this.onCompositionEnd, onFocus: this.onFocus, onKeyDown: this.onKeyDown, onKeyUp: this.onKeyUp, onMouseUp: this.onMouseUp, onClick: this.edit }, this.locString.renderedHtml));
2043
2053
  }
@@ -2834,8 +2844,8 @@ ReactQuestionFactory.Instance.registerQuestion("sv-boolean-switch", (props) => {
2834
2844
  RendererFactory.Instance.registerRenderer("boolean", "switch", "sv-boolean-switch");
2835
2845
 
2836
2846
  let Version;
2837
- Version = `${"2.2.0"}`;
2838
- checkLibraryVersion(`${"2.2.0"}`, "survey-creator-react");
2847
+ Version = `${"2.2.3"}`;
2848
+ checkLibraryVersion(`${"2.2.3"}`, "survey-creator-react");
2839
2849
 
2840
2850
  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 };
2841
2851
  //# sourceMappingURL=survey-creator-react.mjs.map