survey-creator-react 1.9.89 → 1.9.90

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": "1.9.89",
3
+ "version": "1.9.90",
4
4
  "description": "Use SurveyJS Creator to create or edit JSON for SurveyJS Form Library.",
5
5
  "keywords": [
6
6
  "Survey",
@@ -29,9 +29,9 @@
29
29
  "ace-builds": "^1.4.12"
30
30
  },
31
31
  "dependencies": {
32
- "survey-core": "1.9.89",
33
- "survey-react-ui": "1.9.89",
34
- "survey-creator-core": "1.9.89",
32
+ "survey-core": "1.9.90",
33
+ "survey-react-ui": "1.9.90",
34
+ "survey-creator-core": "1.9.90",
35
35
  "react": "^16.5.0 || ^17.0.1 || ^18.1.0",
36
36
  "react-dom": "^16.5.0 || ^17.0.1 || ^18.1.0"
37
37
  },
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * SurveyJS Creator React v1.9.89
2
+ * SurveyJS Creator React v1.9.90
3
3
  * (c) 2015-2023 Devsoft Baltic OÜ - http://surveyjs.io/
4
4
  * Github: https://github.com/surveyjs/survey-creator
5
5
  * License: https://surveyjs.io/Licenses#SurveyCreator
@@ -367,7 +367,11 @@ var LogoImageComponent = /** @class */ (function (_super) {
367
367
  return _this;
368
368
  }
369
369
  LogoImageComponent.prototype.createModel = function () {
370
- this.model = new survey_creator_core__WEBPACK_IMPORTED_MODULE_3__["LogoImageViewModel"](this.props.data, null);
370
+ var prevRoot = null;
371
+ if (!!this.model) {
372
+ prevRoot = this.model.root;
373
+ }
374
+ this.model = new survey_creator_core__WEBPACK_IMPORTED_MODULE_3__["LogoImageViewModel"](this.props.data, prevRoot);
371
375
  };
372
376
  LogoImageComponent.prototype.getUpdatedModelProps = function () {
373
377
  return ["data"];
@@ -1873,7 +1877,7 @@ var CellQuestionAdornerComponent = /** @class */ (function (_super) {
1873
1877
  }
1874
1878
  return (react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_1___default.a.Fragment, null,
1875
1879
  react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement("div", { "data-sv-drop-target-survey-element": this.model.element.name, className: "svc-question__adorner" },
1876
- react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement("div", { className: " svc-question__content--selected-no-border svc-question__content" }, this.props.element))));
1880
+ react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement("div", { className: " svc-question__content--in-popup svc-question__content" }, this.props.element))));
1877
1881
  };
1878
1882
  return CellQuestionAdornerComponent;
1879
1883
  }(_ModelElement__WEBPACK_IMPORTED_MODULE_3__["CreatorModelElement"]));
@@ -1930,7 +1934,7 @@ var CellQuestionDropdownAdornerComponent = /** @class */ (function (_super) {
1930
1934
  var textStyle = this.props.question.textStyle;
1931
1935
  return (react__WEBPACK_IMPORTED_MODULE_2___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_2___default.a.Fragment, null,
1932
1936
  react__WEBPACK_IMPORTED_MODULE_2___default.a.createElement("div", { "data-sv-drop-target-survey-element": this.model.element.name, className: "svc-question__adorner" },
1933
- react__WEBPACK_IMPORTED_MODULE_2___default.a.createElement("div", { className: " svc-question__content--selected-no-border svc-question__content" },
1937
+ react__WEBPACK_IMPORTED_MODULE_2___default.a.createElement("div", { className: " svc-question__content--in-popup svc-question__content" },
1934
1938
  this.props.element,
1935
1939
  react__WEBPACK_IMPORTED_MODULE_2___default.a.createElement("div", { className: "svc-question__dropdown-choices" }, question.visibleChoices.map(function (item, index) { return (react__WEBPACK_IMPORTED_MODULE_2___default.a.createElement("div", { className: "svc-question__dropdown-choice", key: "editable_choice_".concat(index) }, survey_react_ui__WEBPACK_IMPORTED_MODULE_3__["ReactSurveyElementsWrapper"].wrapItemValue(question.survey, survey_react_ui__WEBPACK_IMPORTED_MODULE_3__["ReactElementFactory"].Instance.createElement("survey-radiogroup-item", {
1936
1940
  question: question,
@@ -2031,9 +2035,28 @@ var CreatorSurveyPageComponent = /** @class */ (function (_super) {
2031
2035
  react__WEBPACK_IMPORTED_MODULE_4___default.a.createElement(survey_react_ui__WEBPACK_IMPORTED_MODULE_1__["SurveyActionBar"], { model: this.model.actionContainer })));
2032
2036
  };
2033
2037
  CreatorSurveyPageComponent.prototype.renderFooter = function () {
2038
+ return react__WEBPACK_IMPORTED_MODULE_4___default.a.createElement(survey_react_ui__WEBPACK_IMPORTED_MODULE_1__["SurveyActionBar"], { model: this.model.footerActionsBar });
2039
+ };
2040
+ return CreatorSurveyPageComponent;
2041
+ }(_ModelElement__WEBPACK_IMPORTED_MODULE_2__["CreatorModelElement"]));
2042
+
2043
+ survey_react_ui__WEBPACK_IMPORTED_MODULE_1__["ReactElementFactory"].Instance.registerElement("svc-page", function (props) {
2044
+ return react__WEBPACK_IMPORTED_MODULE_4___default.a.createElement(CreatorSurveyPageComponent, props);
2045
+ });
2046
+ var AddQuestionButtonComponent = /** @class */ (function (_super) {
2047
+ Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(AddQuestionButtonComponent, _super);
2048
+ function AddQuestionButtonComponent() {
2049
+ return _super !== null && _super.apply(this, arguments) || this;
2050
+ }
2051
+ Object.defineProperty(AddQuestionButtonComponent.prototype, "model", {
2052
+ get: function () {
2053
+ return this.props.item.data;
2054
+ },
2055
+ enumerable: false,
2056
+ configurable: true
2057
+ });
2058
+ AddQuestionButtonComponent.prototype.renderElement = function () {
2034
2059
  var _this = this;
2035
- if (!this.model.showAddQuestionButton)
2036
- return null;
2037
2060
  var questionTypeSelectorModel = this.model.questionTypeSelectorModel;
2038
2061
  return Object(survey_react_ui__WEBPACK_IMPORTED_MODULE_1__["attachKey2click"])(react__WEBPACK_IMPORTED_MODULE_4___default.a.createElement("div", { className: "svc-page__add-new-question svc-btn", onClick: function (e) {
2039
2062
  e.stopPropagation();
@@ -2048,11 +2071,10 @@ var CreatorSurveyPageComponent = /** @class */ (function (_super) {
2048
2071
  react__WEBPACK_IMPORTED_MODULE_4___default.a.createElement(survey_react_ui__WEBPACK_IMPORTED_MODULE_1__["SvgIcon"], { iconName: questionTypeSelectorModel.iconName, size: 24, title: this.model.addNewQuestionText })),
2049
2072
  react__WEBPACK_IMPORTED_MODULE_4___default.a.createElement(survey_react_ui__WEBPACK_IMPORTED_MODULE_1__["Popup"], { model: questionTypeSelectorModel.popupModel })))));
2050
2073
  };
2051
- return CreatorSurveyPageComponent;
2052
- }(_ModelElement__WEBPACK_IMPORTED_MODULE_2__["CreatorModelElement"]));
2053
-
2054
- survey_react_ui__WEBPACK_IMPORTED_MODULE_1__["ReactElementFactory"].Instance.registerElement("svc-page", function (props) {
2055
- return react__WEBPACK_IMPORTED_MODULE_4___default.a.createElement(CreatorSurveyPageComponent, props);
2074
+ return AddQuestionButtonComponent;
2075
+ }(survey_react_ui__WEBPACK_IMPORTED_MODULE_1__["SurveyElementBase"]));
2076
+ survey_react_ui__WEBPACK_IMPORTED_MODULE_1__["ReactElementFactory"].Instance.registerElement("svc-add-new-question-btn", function (props) {
2077
+ return react__WEBPACK_IMPORTED_MODULE_4___default.a.createElement(AddQuestionButtonComponent, props);
2056
2078
  });
2057
2079
 
2058
2080
 
@@ -3081,7 +3103,7 @@ __webpack_require__.r(__webpack_exports__);
3081
3103
  /* harmony import */ var survey_core__WEBPACK_IMPORTED_MODULE_48__ = __webpack_require__(/*! survey-core */ "survey-core");
3082
3104
  /* harmony import */ var survey_core__WEBPACK_IMPORTED_MODULE_48___default = /*#__PURE__*/__webpack_require__.n(survey_core__WEBPACK_IMPORTED_MODULE_48__);
3083
3105
  var Version;
3084
- Version = "".concat("1.9.89");
3106
+ Version = "".concat("1.9.90");
3085
3107
  // import "@survey/creator/survey-creator-core.css";
3086
3108
 
3087
3109
 
@@ -3139,7 +3161,7 @@ Version = "".concat("1.9.89");
3139
3161
 
3140
3162
 
3141
3163
 
3142
- Object(survey_core__WEBPACK_IMPORTED_MODULE_48__["checkLibraryVersion"])("".concat("1.9.89"), "survey-creator-react");
3164
+ Object(survey_core__WEBPACK_IMPORTED_MODULE_48__["checkLibraryVersion"])("".concat("1.9.90"), "survey-creator-react");
3143
3165
 
3144
3166
 
3145
3167
  /***/ }),