survey-creator-js 2.2.0 → 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-js.mjs +28 -18
- package/fesm/survey-creator-js.mjs.map +1 -1
- package/package.json +4 -4
- package/survey-creator-js.js +34 -30
- package/survey-creator-js.js.map +1 -1
- package/survey-creator-js.min.js +1 -1
- package/survey-creator-js.min.js.LICENSE.txt +1 -1
- package/typings/survey-creator-react/src/TabbedMenu.d.ts +1 -1
- package/typings/survey-creator-react/src/toolbox/AdaptiveToolbox.d.ts +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* SurveyJS Creator UI v2.2.
|
|
2
|
+
* SurveyJS Creator UI 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
|
|
@@ -9,7 +9,7 @@ import * as React from 'survey-js-ui';
|
|
|
9
9
|
import { ReactElementFactory, SurveyElementBase, attachKey2click, SvgIcon, Survey, SvgBundleComponent, PopupModal, SurveyActionBar, NotifierComponent, ReactQuestionFactory, SurveyLocStringViewer, TitleElement, ReactSurveyElementsWrapper, LoadingIndicatorComponent, SurveyPage, Popup, LogoImage, SurveyQuestionElementBase, SurveyQuestion, createElement, Scroll, CharacterCounterComponent, SurveyQuestionDropdown, SurveyHeader, List, Fragment, SurveyQuestionText, preact } from 'survey-js-ui';
|
|
10
10
|
import { assign, SurveyCreatorModel, RowViewModel, QuestionAdornerViewModel, QuestionDropdownAdornerViewModel, QuestionImageAdornerViewModel, QuestionRatingAdornerViewModel, PageAdorner, LogoImageViewModel, editorLocalization, ItemValueWrapperViewModel, ImageItemValueWrapperViewModel, MatrixCellWrapperViewModel, SurveyResultsModel, ToolboxToolViewModel, editableStringRendererName, StringEditorViewModelBase, initLogicOperator, PageNavigatorViewModel } from 'survey-creator-core';
|
|
11
11
|
export { PropertyGridEditorCollection, SurveyLogic, SurveyLogicUI, SurveyQuestionEditorDefinition, ToolboxToolViewModel, editorLocalization, localization, settings, svgBundle } from 'survey-creator-core';
|
|
12
|
-
import {
|
|
12
|
+
import { CssClassBuilder, settings, RendererFactory, unwrap, checkLibraryVersion } from 'survey-core';
|
|
13
13
|
|
|
14
14
|
class TabbedMenuComponent extends SurveyElementBase {
|
|
15
15
|
get model() {
|
|
@@ -24,17 +24,24 @@ class TabbedMenuComponent extends SurveyElementBase {
|
|
|
24
24
|
}
|
|
25
25
|
renderElement() {
|
|
26
26
|
const items = this.model.renderedActions.map((item) => React.createElement(TabbedMenuItemWrapper, { item: item, key: item.renderedId }));
|
|
27
|
-
return (React.createElement("div", { ref: this.rootRef, className: "svc-tabbed-menu", role: "tablist" }, items));
|
|
27
|
+
return (React.createElement("div", { ref: this.rootRef, className: "svc-tabbed-menu", role: "tablist", style: this.model.getRootStyle() }, items));
|
|
28
|
+
}
|
|
29
|
+
componentDidUpdate(prevProps, prevState) {
|
|
30
|
+
super.componentDidUpdate(prevProps, prevState);
|
|
31
|
+
const container = this.rootRef.current;
|
|
32
|
+
if (!container)
|
|
33
|
+
return;
|
|
34
|
+
this.model.initResponsivityManager(container);
|
|
28
35
|
}
|
|
29
36
|
componentDidMount() {
|
|
30
37
|
super.componentDidMount();
|
|
31
38
|
const container = this.rootRef.current;
|
|
32
39
|
if (!container)
|
|
33
40
|
return;
|
|
34
|
-
this.
|
|
41
|
+
this.model.initResponsivityManager(container);
|
|
35
42
|
}
|
|
36
43
|
componentWillUnmount() {
|
|
37
|
-
this.
|
|
44
|
+
this.model.resetResponsivityManager();
|
|
38
45
|
super.componentWillUnmount();
|
|
39
46
|
}
|
|
40
47
|
}
|
|
@@ -1567,17 +1574,22 @@ class AdaptiveToolbox extends SurveyElementBase {
|
|
|
1567
1574
|
super(props);
|
|
1568
1575
|
this.rootRef = React.createRef();
|
|
1569
1576
|
}
|
|
1577
|
+
componentDidUpdate(prevProps, prevState) {
|
|
1578
|
+
super.componentDidUpdate(prevProps, prevState);
|
|
1579
|
+
const container = this.rootRef.current;
|
|
1580
|
+
if (container) {
|
|
1581
|
+
this.toolbox.afterRender(container);
|
|
1582
|
+
}
|
|
1583
|
+
}
|
|
1570
1584
|
componentDidMount() {
|
|
1571
1585
|
super.componentDidMount();
|
|
1572
1586
|
const container = this.rootRef.current;
|
|
1573
|
-
|
|
1574
|
-
|
|
1575
|
-
|
|
1576
|
-
this.manager = new VerticalResponsivityManager(this.toolbox.containerElement, this.toolbox);
|
|
1587
|
+
if (container) {
|
|
1588
|
+
this.toolbox.afterRender(container);
|
|
1589
|
+
}
|
|
1577
1590
|
}
|
|
1578
1591
|
componentWillUnmount() {
|
|
1579
|
-
this.
|
|
1580
|
-
this.toolbox.setRootElement(undefined);
|
|
1592
|
+
this.toolbox.beforeDestroy();
|
|
1581
1593
|
super.componentWillUnmount();
|
|
1582
1594
|
}
|
|
1583
1595
|
get creator() {
|
|
@@ -1610,11 +1622,9 @@ class AdaptiveToolbox extends SurveyElementBase {
|
|
|
1610
1622
|
React.createElement("div", { className: "svc-toolbox__category-separator svc-toolbox__category-separator--search" })));
|
|
1611
1623
|
}
|
|
1612
1624
|
render() {
|
|
1613
|
-
if (!this.toolbox.hasActions)
|
|
1614
|
-
return null;
|
|
1615
1625
|
const search = this.toolbox.showSearch ? this.renderSearch() : null;
|
|
1616
1626
|
const placeholder = this.toolbox.showPlaceholder ? React.createElement("div", { className: "svc-toolbox__placeholder" }, this.toolbox.toolboxNoResultsFound) : null;
|
|
1617
|
-
return (React.createElement("div", { ref: this.rootRef, className: this.toolbox.classNames },
|
|
1627
|
+
return (React.createElement("div", { ref: this.rootRef, className: this.toolbox.classNames, style: this.toolbox.getRootStyle() },
|
|
1618
1628
|
React.createElement("div", { onBlur: (e) => this.toolbox.focusOut(e), className: "svc-toolbox__panel" },
|
|
1619
1629
|
search,
|
|
1620
1630
|
placeholder,
|
|
@@ -2030,12 +2040,12 @@ class SurveyLocStringEditor extends CreatorModelElement {
|
|
|
2030
2040
|
if (this.htmlValue.__html !== this.locString.renderedHtml) {
|
|
2031
2041
|
this.htmlValue = { __html: this.locString.renderedHtml };
|
|
2032
2042
|
}
|
|
2033
|
-
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,
|
|
2043
|
+
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,
|
|
2034
2044
|
// style={this.style}
|
|
2035
2045
|
dangerouslySetInnerHTML: this.htmlValue, onBlur: this.onBlur, onFocus: this.onFocus, onKeyDown: this.onKeyDown, onMouseUp: this.onMouseUp, onClick: this.edit }));
|
|
2036
2046
|
}
|
|
2037
2047
|
else {
|
|
2038
|
-
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,
|
|
2048
|
+
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,
|
|
2039
2049
|
// style={this.style}
|
|
2040
2050
|
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));
|
|
2041
2051
|
}
|
|
@@ -2832,8 +2842,8 @@ ReactQuestionFactory.Instance.registerQuestion("sv-boolean-switch", (props) => {
|
|
|
2832
2842
|
RendererFactory.Instance.registerRenderer("boolean", "switch", "sv-boolean-switch");
|
|
2833
2843
|
|
|
2834
2844
|
let Version;
|
|
2835
|
-
Version = `${"2.2.
|
|
2836
|
-
checkLibraryVersion(`${"2.2.
|
|
2845
|
+
Version = `${"2.2.2"}`;
|
|
2846
|
+
checkLibraryVersion(`${"2.2.2"}`, "survey-creator-react");
|
|
2837
2847
|
|
|
2838
2848
|
function renderSurveyCreator(creator, element, props = {}) {
|
|
2839
2849
|
let node = element;
|