survey-creator-react 2.4.0 → 2.5.0
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 +28 -10
- package/fesm/survey-creator-react.mjs.map +1 -1
- package/index.html +6 -2
- package/package.json +4 -4
- package/survey-creator-react-presets.js +355 -0
- package/survey-creator-react-presets.js.map +1 -0
- package/survey-creator-react-presets.min.js +2 -0
- package/survey-creator-react-presets.min.js.LICENSE.txt +6 -0
- package/survey-creator-react.js +35 -11
- 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/ModelElement.d.ts +4 -1
- package/typings/adorners/Row.d.ts +4 -1
- package/typings/entries/presets.d.ts +3 -0
- package/typings/presets/Presets.d.ts +15 -0
- package/typings/presets/PresetsIconItem.d.ts +10 -0
- package/typings/presets/PresetsPropertyGrid.d.ts +10 -0
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* SurveyJS Creator React v2.
|
|
2
|
+
* SurveyJS Creator React v2.5.0
|
|
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
|
|
@@ -281,8 +281,25 @@ class CreatorModelElement extends SurveyElementBase {
|
|
|
281
281
|
return true;
|
|
282
282
|
for (var i = 0; i < names.length; i++) {
|
|
283
283
|
const key = names[i];
|
|
284
|
-
if (
|
|
285
|
-
|
|
284
|
+
if (typeof key === "object") {
|
|
285
|
+
const currentProp = this.props[key.name];
|
|
286
|
+
const nextProp = nextProps[key.name];
|
|
287
|
+
if (key.deepEqual) {
|
|
288
|
+
if (this.props[key.name] === nextProps[key.name])
|
|
289
|
+
return false;
|
|
290
|
+
const currentPropKeys = Object.keys(currentProp || {});
|
|
291
|
+
if (currentPropKeys.length !== Object.keys(nextProp || {}).length)
|
|
292
|
+
return true;
|
|
293
|
+
return currentPropKeys.some(key => currentProp[key] != nextProp[key]);
|
|
294
|
+
}
|
|
295
|
+
else {
|
|
296
|
+
return currentProp !== nextProp;
|
|
297
|
+
}
|
|
298
|
+
}
|
|
299
|
+
else {
|
|
300
|
+
if (this.props[key] !== nextProps[key])
|
|
301
|
+
return true;
|
|
302
|
+
}
|
|
286
303
|
}
|
|
287
304
|
return false;
|
|
288
305
|
}
|
|
@@ -302,7 +319,7 @@ class RowWrapper extends CreatorModelElement {
|
|
|
302
319
|
this.model = new RowViewModel(props.componentData.creator, props.row, null);
|
|
303
320
|
}
|
|
304
321
|
getUpdatedModelProps() {
|
|
305
|
-
return ["row", "componentData"];
|
|
322
|
+
return ["row", { name: "componentData", deepEqual: true }];
|
|
306
323
|
}
|
|
307
324
|
getStateElement() {
|
|
308
325
|
return this.model;
|
|
@@ -1520,8 +1537,9 @@ class SurveyCreatorToolboxCategory extends SurveyElementBase {
|
|
|
1520
1537
|
if (this.toolbox.canCollapseCategories) {
|
|
1521
1538
|
className += " svc-toolbox__category-header--collapsed";
|
|
1522
1539
|
}
|
|
1540
|
+
const title = this.renderLocString(this.category.locTitle);
|
|
1523
1541
|
return attachKey2click(React.createElement("div", { className: className, onClick: e => this.category.toggleState() },
|
|
1524
|
-
React.createElement("span", { className: "svc-toolbox__category-title" },
|
|
1542
|
+
React.createElement("span", { className: "svc-toolbox__category-title" }, title),
|
|
1525
1543
|
this.renderButton()));
|
|
1526
1544
|
}
|
|
1527
1545
|
renderButton() {
|
|
@@ -1780,7 +1798,7 @@ class TabControl extends SurveyElementBase {
|
|
|
1780
1798
|
React.createElement(TabsComponent, { model: this.props.model.topToolbar })))),
|
|
1781
1799
|
React.createElement("div", { className: "svc-sidebar-tabs__bottom-container" },
|
|
1782
1800
|
React.createElement("div", { className: "svc-sidebar-tabs__items" },
|
|
1783
|
-
React.createElement(
|
|
1801
|
+
React.createElement(SurveyActionBar, { model: this.props.model.bottomToolbar })))));
|
|
1784
1802
|
}
|
|
1785
1803
|
}
|
|
1786
1804
|
ReactElementFactory.Instance.registerElement("svc-tab-control", (props) => {
|
|
@@ -2898,12 +2916,12 @@ ReactQuestionFactory.Instance.registerQuestion("commentwithreset", (props) => {
|
|
|
2898
2916
|
|
|
2899
2917
|
class SurveyQuestionBooleanSwitch extends SurveyQuestionElementBase {
|
|
2900
2918
|
renderElement() {
|
|
2901
|
-
const button = attachKey2click(React.createElement("div", { className: "spg-boolean-switch__button" + (this.questionBase.
|
|
2919
|
+
const button = attachKey2click(React.createElement("div", { className: "spg-boolean-switch__button" + (this.questionBase.booleanValue ? " spg-boolean-switch__button--checked" : ""), tabIndex: 0, role: "checkbox", "aria-checked": this.questionBase.booleanValue || false, "aria-required": this.questionBase.a11y_input_ariaRequired, "aria-label": this.questionBase.a11y_input_ariaLabel, "aria-labelledby": this.questionBase.a11y_input_ariaLabelledBy, "aria-invalid": this.questionBase.a11y_input_ariaInvalid, "aria-errormessage": this.questionBase.a11y_input_ariaErrormessage },
|
|
2902
2920
|
React.createElement("div", { className: "spg-boolean-switch__thumb" },
|
|
2903
2921
|
React.createElement("div", { className: "spg-boolean-switch__thumb-circle spg-boolean-switch__thumb--left" })),
|
|
2904
2922
|
React.createElement("div", { className: "spg-boolean-switch__thumb" },
|
|
2905
2923
|
React.createElement("div", { className: "spg-boolean-switch__thumb-circle spg-boolean-switch__thumb--right" }))), this.questionBase, { processEsc: false });
|
|
2906
|
-
return (React.createElement("div", { className: "spg-boolean-switch", onClick: () => this.questionBase.
|
|
2924
|
+
return (React.createElement("div", { className: "spg-boolean-switch", onClick: () => this.questionBase.booleanValue = !this.questionBase.booleanValue },
|
|
2907
2925
|
button,
|
|
2908
2926
|
React.createElement("div", { className: "spg-boolean-switch__caption" },
|
|
2909
2927
|
React.createElement("div", { className: "spg-boolean-switch__title", id: this.questionBase.labelRenderedAriaID }, SurveyElementBase.renderLocString(this.questionBase.locTitle)))));
|
|
@@ -2915,8 +2933,8 @@ ReactQuestionFactory.Instance.registerQuestion("sv-boolean-switch", (props) => {
|
|
|
2915
2933
|
RendererFactory.Instance.registerRenderer("boolean", "switch", "sv-boolean-switch");
|
|
2916
2934
|
|
|
2917
2935
|
let Version;
|
|
2918
|
-
Version = `${"2.
|
|
2919
|
-
checkLibraryVersion(`${"2.
|
|
2936
|
+
Version = `${"2.5.0"}`;
|
|
2937
|
+
checkLibraryVersion(`${"2.5.0"}`, "survey-creator-react");
|
|
2920
2938
|
|
|
2921
2939
|
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 };
|
|
2922
2940
|
//# sourceMappingURL=survey-creator-react.mjs.map
|