survey-creator-react 2.3.10 → 2.3.12
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 +39 -14
- package/fesm/survey-creator-react.mjs.map +1 -1
- package/package.json +4 -4
- package/survey-creator-react.js +40 -13
- 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/ItemValueWrapper.d.ts +2 -0
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* SurveyJS Creator React v2.3.
|
|
2
|
+
* SurveyJS Creator React v2.3.12
|
|
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
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
|
|
8
8
|
import * as React from 'react';
|
|
9
9
|
import { createElement, Fragment } from 'react';
|
|
10
|
-
import { ReactElementFactory, SurveyElementBase, attachKey2click, SvgIcon, Survey, ReactQuestionFactory, SurveyLocStringViewer, SvgBundleComponent, PopupModal, SurveyActionBar, NotifierComponent, TitleElement, ReactSurveyElementsWrapper, LoadingIndicatorComponent, SurveyPage, Popup, LogoImage, SurveyQuestionElementBase, SurveyQuestion, Scroll, CharacterCounterComponent, SurveyQuestionDropdown, SurveyHeader, List, SurveyQuestionText } from 'survey-react-ui';
|
|
10
|
+
import { ReactElementFactory, SurveyElementBase, attachKey2click, SvgIcon, Survey, ReactQuestionFactory, SurveyLocStringViewer, SvgBundleComponent, PopupModal, SurveyActionBar, NotifierComponent, TitleElement, ReactSurveyElementsWrapper, LoadingIndicatorComponent, SurveyPage, Popup, LogoImage, SurveyQuestionElementBase, SurveyQuestion, SurveyPanel, Scroll, CharacterCounterComponent, SurveyQuestionDropdown, SurveyHeader, List, SurveyQuestionText } from 'survey-react-ui';
|
|
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';
|
|
@@ -448,7 +448,7 @@ class QuestionAdornerComponent extends CreatorModelElement {
|
|
|
448
448
|
const element = this.model.element;
|
|
449
449
|
return (React.createElement("div", { ref: node => node && (!this.model.renderedCollapsed ?
|
|
450
450
|
node.setAttribute("inert", "") : node.removeAttribute("inert")), className: this.model.cssCollapsedHiddenHeader }, (element.hasTitle ?
|
|
451
|
-
React.createElement(TitleElement, { element: element }) :
|
|
451
|
+
React.createElement(TitleElement, { element: element, renderActions: false }) :
|
|
452
452
|
React.createElement("div", { className: this.model.cssCollapsedHiddenTitle },
|
|
453
453
|
React.createElement("span", { className: "svc-fake-title" }, element.name)))));
|
|
454
454
|
}
|
|
@@ -1103,17 +1103,42 @@ class ItemValueAdornerComponent extends CreatorModelElement {
|
|
|
1103
1103
|
this.model.allowRemove ? attachKey2click(React.createElement("span", { role: "button", className: "svc-item-value-controls__button svc-item-value-controls__remove", "aria-label": this.model.tooltip, onClick: () => this.model.remove(this.model) },
|
|
1104
1104
|
React.createElement(SvgIcon, { size: "auto", iconName: "icon-remove_16x16", title: this.model.tooltip }))) : null));
|
|
1105
1105
|
const itemkey = this.props.element.key + (this.model.allowAdd ? "_new" : "");
|
|
1106
|
-
return (React.createElement(
|
|
1107
|
-
|
|
1108
|
-
|
|
1109
|
-
|
|
1110
|
-
|
|
1111
|
-
|
|
1112
|
-
|
|
1113
|
-
|
|
1114
|
-
|
|
1106
|
+
return (React.createElement(React.Fragment, null,
|
|
1107
|
+
React.createElement("div", { ref: this.rootRef, className: "svc-item-value-wrapper" +
|
|
1108
|
+
(this.model.allowAdd ? " svc-item-value--new" : "") +
|
|
1109
|
+
(this.model.isDragging ? " svc-item-value--dragging" : "") +
|
|
1110
|
+
(this.model.isDragDropGhost ? " svc-item-value--ghost" : "") +
|
|
1111
|
+
(this.model.isDragDropMoveDown ? " svc-item-value--movedown" : "") +
|
|
1112
|
+
(this.model.isDragDropMoveUp ? " svc-item-value--moveup" : ""), key: itemkey, "data-sv-drop-target-item-value": this.model.isDraggable ? this.model.item.value : undefined, onPointerDown: (event) => this.model.onPointerDown(event) },
|
|
1113
|
+
React.createElement("div", { className: "svc-item-value__ghost" }),
|
|
1114
|
+
React.createElement("div", { className: "svc-item-value-controls", onBlur: this.onBlur }, button),
|
|
1115
|
+
React.createElement("div", { className: "svc-item-value__item", onClick: (event) => this.model.select(this.model, event.nativeEvent) }, this.props.element),
|
|
1116
|
+
this.renderPanelAction()),
|
|
1117
|
+
this.renderPanel()));
|
|
1118
|
+
}
|
|
1119
|
+
renderPanelAction() {
|
|
1120
|
+
if (!this.model.canShowPanel())
|
|
1121
|
+
return null;
|
|
1122
|
+
const isShowPanel = this.model.showPanel;
|
|
1123
|
+
const icName = isShowPanel ? "icon-collapsepanel-16x16" : "icon-expandpanel-16x16";
|
|
1124
|
+
const btn = attachKey2click(React.createElement("span", { role: "button", className: "svc-item-value-controls__button svc-item-value-controls__add svc-choice-elements-button", onClick: () => {
|
|
1125
|
+
this.model.togglePanel();
|
|
1126
|
+
} },
|
|
1127
|
+
React.createElement(SvgIcon, { size: "auto", iconName: icName })));
|
|
1128
|
+
return React.createElement("div", { className: "svc-item-value-controls svc-choice-elements-button-container" }, btn);
|
|
1129
|
+
}
|
|
1130
|
+
renderPanel() {
|
|
1131
|
+
if (!this.model.showPanel)
|
|
1132
|
+
return null;
|
|
1133
|
+
const creator = this.model.creator;
|
|
1134
|
+
const survey = creator.survey;
|
|
1135
|
+
return React.createElement(ChoiceItemPanel, { element: this.model.item.panel, survey: survey, creator: creator, css: survey.getCss() });
|
|
1115
1136
|
}
|
|
1116
1137
|
}
|
|
1138
|
+
const ChoiceItemPanel = React.memo(({ element, survey, creator, css }) => {
|
|
1139
|
+
return React.createElement(SurveyPanel, { element: element, survey: survey, creator: creator, cssClasses: css });
|
|
1140
|
+
});
|
|
1141
|
+
ChoiceItemPanel.displayName = "ChoiceItemPanel";
|
|
1117
1142
|
ReactElementFactory.Instance.registerElement("svc-item-value", (props) => {
|
|
1118
1143
|
return React.createElement(ItemValueAdornerComponent, props);
|
|
1119
1144
|
});
|
|
@@ -2890,8 +2915,8 @@ ReactQuestionFactory.Instance.registerQuestion("sv-boolean-switch", (props) => {
|
|
|
2890
2915
|
RendererFactory.Instance.registerRenderer("boolean", "switch", "sv-boolean-switch");
|
|
2891
2916
|
|
|
2892
2917
|
let Version;
|
|
2893
|
-
Version = `${"2.3.
|
|
2894
|
-
checkLibraryVersion(`${"2.3.
|
|
2918
|
+
Version = `${"2.3.12"}`;
|
|
2919
|
+
checkLibraryVersion(`${"2.3.12"}`, "survey-creator-react");
|
|
2895
2920
|
|
|
2896
2921
|
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 };
|
|
2897
2922
|
//# sourceMappingURL=survey-creator-react.mjs.map
|