survey-creator-react 2.0.8 → 2.0.10

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "survey-creator-react",
3
- "version": "2.0.8",
3
+ "version": "2.0.10",
4
4
  "description": "Use SurveyJS Creator to create or edit JSON for SurveyJS Form Library.",
5
5
  "keywords": [
6
6
  "Survey",
@@ -37,9 +37,9 @@
37
37
  "ace-builds": "^1.4.12",
38
38
  "react": "^16.5.0 || ^17.0.1 || ^18.1.0 || ^19.0.0",
39
39
  "react-dom": "^16.5.0 || ^17.0.1 || ^18.1.0 || ^19.0.0",
40
- "survey-core": "2.0.8",
41
- "survey-react-ui": "2.0.8",
42
- "survey-creator-core": "2.0.8"
40
+ "survey-core": "2.0.10",
41
+ "survey-react-ui": "2.0.10",
42
+ "survey-creator-core": "2.0.10"
43
43
  },
44
44
  "peerDependenciesMeta": {
45
45
  "ace-builds": {
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * SurveyJS Creator React v2.0.8
2
+ * SurveyJS Creator React v2.0.10
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
@@ -1886,6 +1886,11 @@ __webpack_require__.r(__webpack_exports__);
1886
1886
 
1887
1887
 
1888
1888
 
1889
+ var PageElementContent = react__WEBPACK_IMPORTED_MODULE_1__.memo(function (_a) {
1890
+ var page = _a.page, survey = _a.survey, creator = _a.creator;
1891
+ return react__WEBPACK_IMPORTED_MODULE_1__.createElement(survey_react_ui__WEBPACK_IMPORTED_MODULE_2__.SurveyPage, { page: page, survey: survey, creator: creator });
1892
+ });
1893
+ PageElementContent.displayName = "PageElementContent";
1889
1894
  var CreatorSurveyPageComponent = /** @class */ (function (_super) {
1890
1895
  (0,tslib__WEBPACK_IMPORTED_MODULE_0__.__extends)(CreatorSurveyPageComponent, _super);
1891
1896
  function CreatorSurveyPageComponent(props) {
@@ -1897,9 +1902,12 @@ var CreatorSurveyPageComponent = /** @class */ (function (_super) {
1897
1902
  if (this.model) {
1898
1903
  this.model.attachToUI(props.page, this.rootRef.current);
1899
1904
  }
1900
- this.model = new survey_creator_core__WEBPACK_IMPORTED_MODULE_4__.PageAdorner(props.creator, props.page);
1905
+ this.model = this.createPageAdorner(props.creator, props.page);
1901
1906
  this.model.isGhost = this.props.isGhost;
1902
1907
  };
1908
+ CreatorSurveyPageComponent.prototype.createPageAdorner = function (creator, page) {
1909
+ return new survey_creator_core__WEBPACK_IMPORTED_MODULE_4__.PageAdorner(creator, page);
1910
+ };
1903
1911
  CreatorSurveyPageComponent.prototype.shouldComponentUpdate = function (nextProps, nextState) {
1904
1912
  var res = _super.prototype.shouldComponentUpdate.call(this, nextProps, nextState);
1905
1913
  if (this.model) {
@@ -1950,7 +1958,7 @@ var CreatorSurveyPageComponent = /** @class */ (function (_super) {
1950
1958
  react__WEBPACK_IMPORTED_MODULE_1__.createElement("div", { className: "svc-panel__placeholder" }, this.model.placeholderText))));
1951
1959
  };
1952
1960
  CreatorSurveyPageComponent.prototype.renderContent = function () {
1953
- return (react__WEBPACK_IMPORTED_MODULE_1__.createElement(survey_react_ui__WEBPACK_IMPORTED_MODULE_2__.SurveyPage, { page: this.props.page, survey: this.props.survey, creator: this.props.creator, css: this.model.css }));
1961
+ return (react__WEBPACK_IMPORTED_MODULE_1__.createElement(PageElementContent, { page: this.props.page, survey: this.props.survey, creator: this.props.creator }));
1954
1962
  };
1955
1963
  CreatorSurveyPageComponent.prototype.renderHeader = function () {
1956
1964
  var _this = this;
@@ -2066,6 +2074,11 @@ __webpack_require__.r(__webpack_exports__);
2066
2074
 
2067
2075
 
2068
2076
 
2077
+ function QuestionElementContentFunc(props) {
2078
+ return props.element;
2079
+ }
2080
+ var QuestionElementContent = react__WEBPACK_IMPORTED_MODULE_2__.memo(QuestionElementContentFunc);
2081
+ QuestionElementContent.displayName = "QuestionElementContent";
2069
2082
  var QuestionAdornerComponent = /** @class */ (function (_super) {
2070
2083
  (0,tslib__WEBPACK_IMPORTED_MODULE_0__.__extends)(QuestionAdornerComponent, _super);
2071
2084
  function QuestionAdornerComponent(props) {
@@ -2149,7 +2162,7 @@ var QuestionAdornerComponent = /** @class */ (function (_super) {
2149
2162
  };
2150
2163
  QuestionAdornerComponent.prototype.renderElementContent = function () {
2151
2164
  return (react__WEBPACK_IMPORTED_MODULE_2__.createElement(react__WEBPACK_IMPORTED_MODULE_2__.Fragment, null,
2152
- this.props.element,
2165
+ react__WEBPACK_IMPORTED_MODULE_2__.createElement(QuestionElementContent, { element: this.props.element }),
2153
2166
  this.renderElementPlaceholder(),
2154
2167
  this.renderCarryForwardBanner()));
2155
2168
  };
@@ -3335,7 +3348,7 @@ __webpack_require__.r(__webpack_exports__);
3335
3348
  /* harmony import */ var survey_core__WEBPACK_IMPORTED_MODULE_63__ = __webpack_require__(/*! survey-core */ "survey-core");
3336
3349
  /* harmony import */ var survey_core__WEBPACK_IMPORTED_MODULE_63___default = /*#__PURE__*/__webpack_require__.n(survey_core__WEBPACK_IMPORTED_MODULE_63__);
3337
3350
  var Version;
3338
- Version = "".concat("2.0.8");
3351
+ Version = "".concat("2.0.10");
3339
3352
  // import "@survey/creator/survey-creator-core.css";
3340
3353
 
3341
3354
 
@@ -3407,7 +3420,7 @@ Version = "".concat("2.0.8");
3407
3420
 
3408
3421
 
3409
3422
 
3410
- (0,survey_core__WEBPACK_IMPORTED_MODULE_63__.checkLibraryVersion)("".concat("2.0.8"), "survey-creator-react");
3423
+ (0,survey_core__WEBPACK_IMPORTED_MODULE_63__.checkLibraryVersion)("".concat("2.0.10"), "survey-creator-react");
3411
3424
 
3412
3425
 
3413
3426
  /***/ }),