survey-creator-react 2.2.1 → 2.2.2
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.
- package/fesm/survey-creator-react.mjs +26 -16
- package/fesm/survey-creator-react.mjs.map +1 -1
- package/package.json +4 -4
- package/survey-creator-react.js +46 -42
- package/survey-creator-react.js.map +1 -1
- package/survey-creator-react.min.js +1 -1
- package/survey-creator-react.min.js.LICENSE.txt +1 -1
- package/typings/TabbedMenu.d.ts +1 -1
- package/typings/toolbox/AdaptiveToolbox.d.ts +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* SurveyJS Creator React v2.2.
|
|
2
|
+
* SurveyJS Creator React v2.2.2
|
|
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 {
|
|
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.
|
|
43
|
+
this.model.initResponsivityManager(container);
|
|
37
44
|
}
|
|
38
45
|
componentWillUnmount() {
|
|
39
|
-
this.
|
|
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
|
-
|
|
1576
|
-
|
|
1577
|
-
|
|
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.
|
|
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,
|
|
@@ -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.
|
|
2838
|
-
checkLibraryVersion(`${"2.2.
|
|
2847
|
+
Version = `${"2.2.2"}`;
|
|
2848
|
+
checkLibraryVersion(`${"2.2.2"}`, "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
|