survey-creator-react 1.12.42 → 1.12.44
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.
|
|
2
|
+
* SurveyJS Creator React v2.2.4
|
|
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,
|
|
@@ -1924,6 +1934,9 @@ class SurveyLocStringEditor extends CreatorModelElement {
|
|
|
1924
1934
|
this.onCompositionEnd = (event) => {
|
|
1925
1935
|
this.baseModel.onCompositionEnd(event.nativeEvent);
|
|
1926
1936
|
};
|
|
1937
|
+
this.onBeforeInput = (event) => {
|
|
1938
|
+
this.baseModel.onBeforeInput(event);
|
|
1939
|
+
};
|
|
1927
1940
|
this.onInput = (event) => {
|
|
1928
1941
|
this.baseModel.onInput(event.nativeEvent);
|
|
1929
1942
|
};
|
|
@@ -2039,7 +2052,7 @@ class SurveyLocStringEditor extends CreatorModelElement {
|
|
|
2039
2052
|
else {
|
|
2040
2053
|
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
2054
|
// style={this.style}
|
|
2042
|
-
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));
|
|
2055
|
+
key: this.locString.renderedHtml, onBlur: this.onBlur, onBeforeInput: this.onBeforeInput, 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
2056
|
}
|
|
2044
2057
|
const counter = this.baseModel.showCharacterCounter ? (React.createElement(CharacterCounterComponent, { counter: this.baseModel.characterCounter, remainingCharacterCounter: this.baseModel.getCharacterCounterClass })) : null;
|
|
2045
2058
|
return (React.createElement("span", { className: this.className },
|
|
@@ -2834,8 +2847,8 @@ ReactQuestionFactory.Instance.registerQuestion("sv-boolean-switch", (props) => {
|
|
|
2834
2847
|
RendererFactory.Instance.registerRenderer("boolean", "switch", "sv-boolean-switch");
|
|
2835
2848
|
|
|
2836
2849
|
let Version;
|
|
2837
|
-
Version = `${"2.2.
|
|
2838
|
-
checkLibraryVersion(`${"2.2.
|
|
2850
|
+
Version = `${"2.2.4"}`;
|
|
2851
|
+
checkLibraryVersion(`${"2.2.4"}`, "survey-creator-react");
|
|
2839
2852
|
|
|
2840
2853
|
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
2854
|
//# sourceMappingURL=survey-creator-react.mjs.map
|