survey-creator-react 2.0.9 → 2.1.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 +22 -6
- package/fesm/survey-creator-react.mjs.map +1 -1
- package/package.json +4 -4
- package/survey-creator-react.js +23 -6
- 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/adorners/Page.d.ts +2 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "survey-creator-react",
|
|
3
|
-
"version": "2.0
|
|
3
|
+
"version": "2.1.0",
|
|
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
|
|
41
|
-
"survey-react-ui": "2.0
|
|
42
|
-
"survey-creator-core": "2.0
|
|
40
|
+
"survey-core": "2.1.0",
|
|
41
|
+
"survey-react-ui": "2.1.0",
|
|
42
|
+
"survey-creator-core": "2.1.0"
|
|
43
43
|
},
|
|
44
44
|
"peerDependenciesMeta": {
|
|
45
45
|
"ace-builds": {
|
package/survey-creator-react.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* SurveyJS Creator React v2.0
|
|
2
|
+
* SurveyJS Creator React v2.1.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
|
|
@@ -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 =
|
|
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,11 @@ 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
|
-
|
|
1961
|
+
if (!this.model.needRenderContent) {
|
|
1962
|
+
return react__WEBPACK_IMPORTED_MODULE_1__.createElement("div", { className: "svc-page__loading-content" },
|
|
1963
|
+
react__WEBPACK_IMPORTED_MODULE_1__.createElement(survey_react_ui__WEBPACK_IMPORTED_MODULE_2__.LoadingIndicatorComponent, null));
|
|
1964
|
+
}
|
|
1965
|
+
return (react__WEBPACK_IMPORTED_MODULE_1__.createElement(PageElementContent, { page: this.props.page, survey: this.props.survey, creator: this.props.creator }));
|
|
1954
1966
|
};
|
|
1955
1967
|
CreatorSurveyPageComponent.prototype.renderHeader = function () {
|
|
1956
1968
|
var _this = this;
|
|
@@ -2066,6 +2078,11 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
2066
2078
|
|
|
2067
2079
|
|
|
2068
2080
|
|
|
2081
|
+
function QuestionElementContentFunc(props) {
|
|
2082
|
+
return props.element;
|
|
2083
|
+
}
|
|
2084
|
+
var QuestionElementContent = react__WEBPACK_IMPORTED_MODULE_2__.memo(QuestionElementContentFunc);
|
|
2085
|
+
QuestionElementContent.displayName = "QuestionElementContent";
|
|
2069
2086
|
var QuestionAdornerComponent = /** @class */ (function (_super) {
|
|
2070
2087
|
(0,tslib__WEBPACK_IMPORTED_MODULE_0__.__extends)(QuestionAdornerComponent, _super);
|
|
2071
2088
|
function QuestionAdornerComponent(props) {
|
|
@@ -2149,7 +2166,7 @@ var QuestionAdornerComponent = /** @class */ (function (_super) {
|
|
|
2149
2166
|
};
|
|
2150
2167
|
QuestionAdornerComponent.prototype.renderElementContent = function () {
|
|
2151
2168
|
return (react__WEBPACK_IMPORTED_MODULE_2__.createElement(react__WEBPACK_IMPORTED_MODULE_2__.Fragment, null,
|
|
2152
|
-
this.props.element,
|
|
2169
|
+
react__WEBPACK_IMPORTED_MODULE_2__.createElement(QuestionElementContent, { element: this.props.element }),
|
|
2153
2170
|
this.renderElementPlaceholder(),
|
|
2154
2171
|
this.renderCarryForwardBanner()));
|
|
2155
2172
|
};
|
|
@@ -3335,7 +3352,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
3335
3352
|
/* harmony import */ var survey_core__WEBPACK_IMPORTED_MODULE_63__ = __webpack_require__(/*! survey-core */ "survey-core");
|
|
3336
3353
|
/* harmony import */ var survey_core__WEBPACK_IMPORTED_MODULE_63___default = /*#__PURE__*/__webpack_require__.n(survey_core__WEBPACK_IMPORTED_MODULE_63__);
|
|
3337
3354
|
var Version;
|
|
3338
|
-
Version = "".concat("2.0
|
|
3355
|
+
Version = "".concat("2.1.0");
|
|
3339
3356
|
// import "@survey/creator/survey-creator-core.css";
|
|
3340
3357
|
|
|
3341
3358
|
|
|
@@ -3407,7 +3424,7 @@ Version = "".concat("2.0.9");
|
|
|
3407
3424
|
|
|
3408
3425
|
|
|
3409
3426
|
|
|
3410
|
-
(0,survey_core__WEBPACK_IMPORTED_MODULE_63__.checkLibraryVersion)("".concat("2.0
|
|
3427
|
+
(0,survey_core__WEBPACK_IMPORTED_MODULE_63__.checkLibraryVersion)("".concat("2.1.0"), "survey-creator-react");
|
|
3411
3428
|
|
|
3412
3429
|
|
|
3413
3430
|
/***/ }),
|