survey-creator-react 2.4.1 → 2.5.1
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 -9
- 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 +33 -10
- 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.1
|
|
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;
|
|
@@ -1781,7 +1798,7 @@ class TabControl extends SurveyElementBase {
|
|
|
1781
1798
|
React.createElement(TabsComponent, { model: this.props.model.topToolbar })))),
|
|
1782
1799
|
React.createElement("div", { className: "svc-sidebar-tabs__bottom-container" },
|
|
1783
1800
|
React.createElement("div", { className: "svc-sidebar-tabs__items" },
|
|
1784
|
-
React.createElement(
|
|
1801
|
+
React.createElement(SurveyActionBar, { model: this.props.model.bottomToolbar })))));
|
|
1785
1802
|
}
|
|
1786
1803
|
}
|
|
1787
1804
|
ReactElementFactory.Instance.registerElement("svc-tab-control", (props) => {
|
|
@@ -2899,12 +2916,12 @@ ReactQuestionFactory.Instance.registerQuestion("commentwithreset", (props) => {
|
|
|
2899
2916
|
|
|
2900
2917
|
class SurveyQuestionBooleanSwitch extends SurveyQuestionElementBase {
|
|
2901
2918
|
renderElement() {
|
|
2902
|
-
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 },
|
|
2903
2920
|
React.createElement("div", { className: "spg-boolean-switch__thumb" },
|
|
2904
2921
|
React.createElement("div", { className: "spg-boolean-switch__thumb-circle spg-boolean-switch__thumb--left" })),
|
|
2905
2922
|
React.createElement("div", { className: "spg-boolean-switch__thumb" },
|
|
2906
2923
|
React.createElement("div", { className: "spg-boolean-switch__thumb-circle spg-boolean-switch__thumb--right" }))), this.questionBase, { processEsc: false });
|
|
2907
|
-
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 },
|
|
2908
2925
|
button,
|
|
2909
2926
|
React.createElement("div", { className: "spg-boolean-switch__caption" },
|
|
2910
2927
|
React.createElement("div", { className: "spg-boolean-switch__title", id: this.questionBase.labelRenderedAriaID }, SurveyElementBase.renderLocString(this.questionBase.locTitle)))));
|
|
@@ -2916,8 +2933,8 @@ ReactQuestionFactory.Instance.registerQuestion("sv-boolean-switch", (props) => {
|
|
|
2916
2933
|
RendererFactory.Instance.registerRenderer("boolean", "switch", "sv-boolean-switch");
|
|
2917
2934
|
|
|
2918
2935
|
let Version;
|
|
2919
|
-
Version = `${"2.
|
|
2920
|
-
checkLibraryVersion(`${"2.
|
|
2936
|
+
Version = `${"2.5.1"}`;
|
|
2937
|
+
checkLibraryVersion(`${"2.5.1"}`, "survey-creator-react");
|
|
2921
2938
|
|
|
2922
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 };
|
|
2923
2940
|
//# sourceMappingURL=survey-creator-react.mjs.map
|