survey-js-ui 2.0.0-rc.9 → 2.0.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-js-ui.js +6074 -0
- package/fesm/survey-js-ui.js.map +1 -0
- package/package.json +3 -2
- package/survey-js-ui.js +59 -52
- package/survey-js-ui.js.map +1 -1
- package/survey-js-ui.min.js +1 -1
- package/survey-js-ui.min.js.LICENSE.txt +1 -1
- package/typings/survey-react-ui/src/components/action-bar/action-bar-item.d.ts +0 -1
- package/typings/survey-react-ui/src/reactquestion_element.d.ts +3 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "survey-js-ui",
|
|
3
|
-
"version": "2.0.0
|
|
3
|
+
"version": "2.0.0",
|
|
4
4
|
"description": "survey.js is a JavaScript Survey Library. It is a modern way to add a survey to your website. It uses JSON for survey metadata and results.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"Survey",
|
|
@@ -16,6 +16,7 @@
|
|
|
16
16
|
"**/*"
|
|
17
17
|
],
|
|
18
18
|
"main": "survey-js-ui.js",
|
|
19
|
+
"module": "fesm/survey-js-ui.js",
|
|
19
20
|
"repository": {
|
|
20
21
|
"type": "git",
|
|
21
22
|
"url": "https://github.com/surveyjs/surveyjs.git"
|
|
@@ -23,7 +24,7 @@
|
|
|
23
24
|
"typings": "./typings/survey-js-ui/entries/index.d.ts",
|
|
24
25
|
"dependencies": {},
|
|
25
26
|
"peerDependencies": {
|
|
26
|
-
"survey-core": "2.0.0
|
|
27
|
+
"survey-core": "2.0.0",
|
|
27
28
|
"@types/react-dom": "*",
|
|
28
29
|
"@types/react": "*"
|
|
29
30
|
}
|
package/survey-js-ui.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* surveyjs - Survey JavaScript library v2.0.0
|
|
2
|
+
* surveyjs - Survey JavaScript library v2.0.0
|
|
3
3
|
* Copyright (c) 2015-2025 Devsoft Baltic OÜ - http://surveyjs.io/
|
|
4
4
|
* License: MIT (http://www.opensource.org/licenses/mit-license.php)
|
|
5
5
|
*/
|
|
@@ -23,7 +23,7 @@ return /******/ (() => { // webpackBootstrap
|
|
|
23
23
|
/***/ (function(module) {
|
|
24
24
|
|
|
25
25
|
/*!
|
|
26
|
-
* surveyjs - Survey JavaScript library v2.0.0
|
|
26
|
+
* surveyjs - Survey JavaScript library v2.0.0
|
|
27
27
|
* Copyright (c) 2015-2025 Devsoft Baltic OÜ - http://surveyjs.io/
|
|
28
28
|
* License: MIT (http://www.opensource.org/licenses/mit-license.php)
|
|
29
29
|
*/
|
|
@@ -39,7 +39,7 @@ return /******/ (() => { // webpackBootstrap
|
|
|
39
39
|
/*!************************************!*\
|
|
40
40
|
!*** ./src/images-v1/ sync \.svg$ ***!
|
|
41
41
|
\************************************/
|
|
42
|
-
/***/ ((module, __unused_webpack_exports,
|
|
42
|
+
/***/ ((module, __unused_webpack_exports, __nested_webpack_require_869__) => {
|
|
43
43
|
|
|
44
44
|
var map = {
|
|
45
45
|
"./ModernBooleanCheckChecked.svg": "./src/images-v1/ModernBooleanCheckChecked.svg",
|
|
@@ -106,10 +106,10 @@ var map = {
|
|
|
106
106
|
|
|
107
107
|
function webpackContext(req) {
|
|
108
108
|
var id = webpackContextResolve(req);
|
|
109
|
-
return
|
|
109
|
+
return __nested_webpack_require_869__(id);
|
|
110
110
|
}
|
|
111
111
|
function webpackContextResolve(req) {
|
|
112
|
-
if(!
|
|
112
|
+
if(!__nested_webpack_require_869__.o(map, req)) {
|
|
113
113
|
var e = new Error("Cannot find module '" + req + "'");
|
|
114
114
|
e.code = 'MODULE_NOT_FOUND';
|
|
115
115
|
throw e;
|
|
@@ -721,7 +721,7 @@ module.exports = "<svg viewBox=\"0 0 24 24\" xmlns=\"http://www.w3.org/2000/svg\
|
|
|
721
721
|
/******/ var __webpack_module_cache__ = {};
|
|
722
722
|
/******/
|
|
723
723
|
/******/ // The require function
|
|
724
|
-
/******/ function
|
|
724
|
+
/******/ function __nested_webpack_require_49952__(moduleId) {
|
|
725
725
|
/******/ // Check if module is in cache
|
|
726
726
|
/******/ var cachedModule = __webpack_module_cache__[moduleId];
|
|
727
727
|
/******/ if (cachedModule !== undefined) {
|
|
@@ -735,7 +735,7 @@ module.exports = "<svg viewBox=\"0 0 24 24\" xmlns=\"http://www.w3.org/2000/svg\
|
|
|
735
735
|
/******/ };
|
|
736
736
|
/******/
|
|
737
737
|
/******/ // Execute the module function
|
|
738
|
-
/******/ __webpack_modules__[moduleId](module, module.exports,
|
|
738
|
+
/******/ __webpack_modules__[moduleId](module, module.exports, __nested_webpack_require_49952__);
|
|
739
739
|
/******/
|
|
740
740
|
/******/ // Return the exports of the module
|
|
741
741
|
/******/ return module.exports;
|
|
@@ -745,9 +745,9 @@ module.exports = "<svg viewBox=\"0 0 24 24\" xmlns=\"http://www.w3.org/2000/svg\
|
|
|
745
745
|
/******/ /* webpack/runtime/define property getters */
|
|
746
746
|
/******/ (() => {
|
|
747
747
|
/******/ // define getter functions for harmony exports
|
|
748
|
-
/******/
|
|
748
|
+
/******/ __nested_webpack_require_49952__.d = (exports, definition) => {
|
|
749
749
|
/******/ for(var key in definition) {
|
|
750
|
-
/******/ if(
|
|
750
|
+
/******/ if(__nested_webpack_require_49952__.o(definition, key) && !__nested_webpack_require_49952__.o(exports, key)) {
|
|
751
751
|
/******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
|
|
752
752
|
/******/ }
|
|
753
753
|
/******/ }
|
|
@@ -756,13 +756,13 @@ module.exports = "<svg viewBox=\"0 0 24 24\" xmlns=\"http://www.w3.org/2000/svg\
|
|
|
756
756
|
/******/
|
|
757
757
|
/******/ /* webpack/runtime/hasOwnProperty shorthand */
|
|
758
758
|
/******/ (() => {
|
|
759
|
-
/******/
|
|
759
|
+
/******/ __nested_webpack_require_49952__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))
|
|
760
760
|
/******/ })();
|
|
761
761
|
/******/
|
|
762
762
|
/******/ /* webpack/runtime/make namespace object */
|
|
763
763
|
/******/ (() => {
|
|
764
764
|
/******/ // define __esModule on exports
|
|
765
|
-
/******/
|
|
765
|
+
/******/ __nested_webpack_require_49952__.r = (exports) => {
|
|
766
766
|
/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
|
|
767
767
|
/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
768
768
|
/******/ }
|
|
@@ -778,13 +778,13 @@ var __nested_webpack_exports__ = {};
|
|
|
778
778
|
/*!************************!*\
|
|
779
779
|
!*** ./src/iconsV1.ts ***!
|
|
780
780
|
\************************/
|
|
781
|
-
|
|
782
|
-
/* harmony export */
|
|
781
|
+
__nested_webpack_require_49952__.r(__nested_webpack_exports__);
|
|
782
|
+
/* harmony export */ __nested_webpack_require_49952__.d(__nested_webpack_exports__, {
|
|
783
783
|
/* harmony export */ icons: () => (/* binding */ icons)
|
|
784
784
|
/* harmony export */ });
|
|
785
785
|
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
786
786
|
//@ts-ignore
|
|
787
|
-
var path =
|
|
787
|
+
var path = __nested_webpack_require_49952__("./src/images-v1 sync recursive \\.svg$");
|
|
788
788
|
var icons = {};
|
|
789
789
|
path.keys().forEach(function (key) {
|
|
790
790
|
icons[key.substring(2, key.length - 4).toLowerCase()] = path(key);
|
|
@@ -808,7 +808,7 @@ path.keys().forEach(function (key) {
|
|
|
808
808
|
/***/ (function(module) {
|
|
809
809
|
|
|
810
810
|
/*!
|
|
811
|
-
* surveyjs - Survey JavaScript library v2.0.0
|
|
811
|
+
* surveyjs - Survey JavaScript library v2.0.0
|
|
812
812
|
* Copyright (c) 2015-2025 Devsoft Baltic OÜ - http://surveyjs.io/
|
|
813
813
|
* License: MIT (http://www.opensource.org/licenses/mit-license.php)
|
|
814
814
|
*/
|
|
@@ -824,7 +824,7 @@ return /******/ (() => { // webpackBootstrap
|
|
|
824
824
|
/*!************************************!*\
|
|
825
825
|
!*** ./src/images-v2/ sync \.svg$ ***!
|
|
826
826
|
\************************************/
|
|
827
|
-
/***/ ((module, __unused_webpack_exports,
|
|
827
|
+
/***/ ((module, __unused_webpack_exports, __nested_webpack_require_869__) => {
|
|
828
828
|
|
|
829
829
|
var map = {
|
|
830
830
|
"./ModernBooleanCheckChecked.svg": "./src/images-v2/ModernBooleanCheckChecked.svg",
|
|
@@ -891,10 +891,10 @@ var map = {
|
|
|
891
891
|
|
|
892
892
|
function webpackContext(req) {
|
|
893
893
|
var id = webpackContextResolve(req);
|
|
894
|
-
return
|
|
894
|
+
return __nested_webpack_require_869__(id);
|
|
895
895
|
}
|
|
896
896
|
function webpackContextResolve(req) {
|
|
897
|
-
if(!
|
|
897
|
+
if(!__nested_webpack_require_869__.o(map, req)) {
|
|
898
898
|
var e = new Error("Cannot find module '" + req + "'");
|
|
899
899
|
e.code = 'MODULE_NOT_FOUND';
|
|
900
900
|
throw e;
|
|
@@ -1506,7 +1506,7 @@ module.exports = "<svg viewBox=\"0 0 24 24\" xmlns=\"http://www.w3.org/2000/svg\
|
|
|
1506
1506
|
/******/ var __webpack_module_cache__ = {};
|
|
1507
1507
|
/******/
|
|
1508
1508
|
/******/ // The require function
|
|
1509
|
-
/******/ function
|
|
1509
|
+
/******/ function __nested_webpack_require_62333__(moduleId) {
|
|
1510
1510
|
/******/ // Check if module is in cache
|
|
1511
1511
|
/******/ var cachedModule = __webpack_module_cache__[moduleId];
|
|
1512
1512
|
/******/ if (cachedModule !== undefined) {
|
|
@@ -1520,7 +1520,7 @@ module.exports = "<svg viewBox=\"0 0 24 24\" xmlns=\"http://www.w3.org/2000/svg\
|
|
|
1520
1520
|
/******/ };
|
|
1521
1521
|
/******/
|
|
1522
1522
|
/******/ // Execute the module function
|
|
1523
|
-
/******/ __webpack_modules__[moduleId](module, module.exports,
|
|
1523
|
+
/******/ __webpack_modules__[moduleId](module, module.exports, __nested_webpack_require_62333__);
|
|
1524
1524
|
/******/
|
|
1525
1525
|
/******/ // Return the exports of the module
|
|
1526
1526
|
/******/ return module.exports;
|
|
@@ -1530,9 +1530,9 @@ module.exports = "<svg viewBox=\"0 0 24 24\" xmlns=\"http://www.w3.org/2000/svg\
|
|
|
1530
1530
|
/******/ /* webpack/runtime/define property getters */
|
|
1531
1531
|
/******/ (() => {
|
|
1532
1532
|
/******/ // define getter functions for harmony exports
|
|
1533
|
-
/******/
|
|
1533
|
+
/******/ __nested_webpack_require_62333__.d = (exports, definition) => {
|
|
1534
1534
|
/******/ for(var key in definition) {
|
|
1535
|
-
/******/ if(
|
|
1535
|
+
/******/ if(__nested_webpack_require_62333__.o(definition, key) && !__nested_webpack_require_62333__.o(exports, key)) {
|
|
1536
1536
|
/******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
|
|
1537
1537
|
/******/ }
|
|
1538
1538
|
/******/ }
|
|
@@ -1541,13 +1541,13 @@ module.exports = "<svg viewBox=\"0 0 24 24\" xmlns=\"http://www.w3.org/2000/svg\
|
|
|
1541
1541
|
/******/
|
|
1542
1542
|
/******/ /* webpack/runtime/hasOwnProperty shorthand */
|
|
1543
1543
|
/******/ (() => {
|
|
1544
|
-
/******/
|
|
1544
|
+
/******/ __nested_webpack_require_62333__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))
|
|
1545
1545
|
/******/ })();
|
|
1546
1546
|
/******/
|
|
1547
1547
|
/******/ /* webpack/runtime/make namespace object */
|
|
1548
1548
|
/******/ (() => {
|
|
1549
1549
|
/******/ // define __esModule on exports
|
|
1550
|
-
/******/
|
|
1550
|
+
/******/ __nested_webpack_require_62333__.r = (exports) => {
|
|
1551
1551
|
/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
|
|
1552
1552
|
/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
1553
1553
|
/******/ }
|
|
@@ -1563,13 +1563,13 @@ var __nested_webpack_exports__ = {};
|
|
|
1563
1563
|
/*!************************!*\
|
|
1564
1564
|
!*** ./src/iconsV2.ts ***!
|
|
1565
1565
|
\************************/
|
|
1566
|
-
|
|
1567
|
-
/* harmony export */
|
|
1566
|
+
__nested_webpack_require_62333__.r(__nested_webpack_exports__);
|
|
1567
|
+
/* harmony export */ __nested_webpack_require_62333__.d(__nested_webpack_exports__, {
|
|
1568
1568
|
/* harmony export */ icons: () => (/* binding */ icons)
|
|
1569
1569
|
/* harmony export */ });
|
|
1570
1570
|
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
1571
1571
|
//@ts-ignore
|
|
1572
|
-
var path =
|
|
1572
|
+
var path = __nested_webpack_require_62333__("./src/images-v2 sync recursive \\.svg$");
|
|
1573
1573
|
var icons = {};
|
|
1574
1574
|
path.keys().forEach(function (key) {
|
|
1575
1575
|
icons[key.substring(2, key.length - 4).toLowerCase()] = path(key);
|
|
@@ -2266,9 +2266,6 @@ var SurveyAction = /** @class */ (function (_super) {
|
|
|
2266
2266
|
SurveyAction.prototype.getStateElement = function () {
|
|
2267
2267
|
return this.item;
|
|
2268
2268
|
};
|
|
2269
|
-
SurveyAction.prototype.shouldComponentUpdate = function (nextProps, nextState) {
|
|
2270
|
-
return _super.prototype.shouldComponentUpdate.call(this, nextProps, nextState);
|
|
2271
|
-
};
|
|
2272
2269
|
SurveyAction.prototype.renderElement = function () {
|
|
2273
2270
|
//refactor
|
|
2274
2271
|
var itemClass = this.item.getActionRootCss();
|
|
@@ -6782,10 +6779,6 @@ var SurveyPage = /** @class */ (function (_super) {
|
|
|
6782
6779
|
enumerable: false,
|
|
6783
6780
|
configurable: true
|
|
6784
6781
|
});
|
|
6785
|
-
// shouldComponentUpdate(nextProps: any, nextState: any): boolean {
|
|
6786
|
-
// if(!super.shouldComponentUpdate(nextProps, nextState)) return false;
|
|
6787
|
-
// return true;
|
|
6788
|
-
// }
|
|
6789
6782
|
SurveyPage.prototype.renderElement = function () {
|
|
6790
6783
|
var title = this.renderTitle();
|
|
6791
6784
|
var description = this.renderDescription();
|
|
@@ -9117,6 +9110,21 @@ var SurveyElementBase = /** @class */ (function (_super) {
|
|
|
9117
9110
|
var _this = _super.call(this, props) || this;
|
|
9118
9111
|
_this._allowComponentUpdate = true;
|
|
9119
9112
|
_this.prevStateElements = [];
|
|
9113
|
+
_this.propertyValueChangedHandler = function (hash, key, val) {
|
|
9114
|
+
if (hash[key] !== val) {
|
|
9115
|
+
hash[key] = val;
|
|
9116
|
+
if (!_this.canUsePropInState(key))
|
|
9117
|
+
return;
|
|
9118
|
+
if (_this.isRendering)
|
|
9119
|
+
return;
|
|
9120
|
+
_this.changedStatePropNameValue = key;
|
|
9121
|
+
_this.setState(function (state) {
|
|
9122
|
+
var newState = {};
|
|
9123
|
+
newState[key] = val;
|
|
9124
|
+
return newState;
|
|
9125
|
+
});
|
|
9126
|
+
}
|
|
9127
|
+
};
|
|
9120
9128
|
return _this;
|
|
9121
9129
|
}
|
|
9122
9130
|
SurveyElementBase.renderLocString = function (locStr, style, key) {
|
|
@@ -9225,6 +9233,9 @@ var SurveyElementBase = /** @class */ (function (_super) {
|
|
|
9225
9233
|
};
|
|
9226
9234
|
SurveyElementBase.prototype.unMakeBaseElementsReact = function () {
|
|
9227
9235
|
var els = this.getStateElements();
|
|
9236
|
+
this.unMakeBaseElementsReactive(els);
|
|
9237
|
+
};
|
|
9238
|
+
SurveyElementBase.prototype.unMakeBaseElementsReactive = function (els) {
|
|
9228
9239
|
for (var i = 0; i < els.length; i++) {
|
|
9229
9240
|
this.unMakeBaseElementReact(els[i]);
|
|
9230
9241
|
}
|
|
@@ -9256,6 +9267,9 @@ var SurveyElementBase = /** @class */ (function (_super) {
|
|
|
9256
9267
|
SurveyElementBase.prototype.canMakeReact = function (stateElement) {
|
|
9257
9268
|
return !!stateElement && !!stateElement.iteratePropertiesHash;
|
|
9258
9269
|
};
|
|
9270
|
+
SurveyElementBase.prototype.isCurrentStateElement = function (stateElement) {
|
|
9271
|
+
return !!stateElement && !!stateElement.setPropertyValueCoreHandler && stateElement.setPropertyValueCoreHandler === this.propertyValueChangedHandler;
|
|
9272
|
+
};
|
|
9259
9273
|
SurveyElementBase.prototype.makeBaseElementReact = function (stateElement) {
|
|
9260
9274
|
var _this = this;
|
|
9261
9275
|
if (!this.canMakeReact(stateElement))
|
|
@@ -9278,21 +9292,7 @@ var SurveyElementBase = /** @class */ (function (_super) {
|
|
|
9278
9292
|
};
|
|
9279
9293
|
}
|
|
9280
9294
|
});
|
|
9281
|
-
stateElement.setPropertyValueCoreHandler =
|
|
9282
|
-
if (hash[key] !== val) {
|
|
9283
|
-
hash[key] = val;
|
|
9284
|
-
if (!_this.canUsePropInState(key))
|
|
9285
|
-
return;
|
|
9286
|
-
if (_this.isRendering)
|
|
9287
|
-
return;
|
|
9288
|
-
_this.changedStatePropNameValue = key;
|
|
9289
|
-
_this.setState(function (state) {
|
|
9290
|
-
var newState = {};
|
|
9291
|
-
newState[key] = val;
|
|
9292
|
-
return newState;
|
|
9293
|
-
});
|
|
9294
|
-
}
|
|
9295
|
-
};
|
|
9295
|
+
stateElement.setPropertyValueCoreHandler = this.propertyValueChangedHandler;
|
|
9296
9296
|
};
|
|
9297
9297
|
SurveyElementBase.prototype.canUsePropInState = function (key) {
|
|
9298
9298
|
return true;
|
|
@@ -9300,6 +9300,11 @@ var SurveyElementBase = /** @class */ (function (_super) {
|
|
|
9300
9300
|
SurveyElementBase.prototype.unMakeBaseElementReact = function (stateElement) {
|
|
9301
9301
|
if (!this.canMakeReact(stateElement))
|
|
9302
9302
|
return;
|
|
9303
|
+
if (!this.isCurrentStateElement(stateElement)) {
|
|
9304
|
+
// eslint-disable-next-line no-console
|
|
9305
|
+
// console.warn("Looks like the component is bound to another survey element. It is not supported and can lead to issues.");
|
|
9306
|
+
// return;
|
|
9307
|
+
}
|
|
9303
9308
|
stateElement.setPropertyValueCoreHandler = undefined;
|
|
9304
9309
|
stateElement.iteratePropertiesHash(function (hash, key) {
|
|
9305
9310
|
var val = hash[key];
|
|
@@ -12186,8 +12191,10 @@ var SurveyRow = /** @class */ (function (_super) {
|
|
|
12186
12191
|
};
|
|
12187
12192
|
SurveyRow.prototype.componentWillUnmount = function () {
|
|
12188
12193
|
_super.prototype.componentWillUnmount.call(this);
|
|
12189
|
-
this.
|
|
12190
|
-
|
|
12194
|
+
if (this.isCurrentStateElement(this.getStateElement())) {
|
|
12195
|
+
this.row.setRootElement(undefined);
|
|
12196
|
+
this.stopLazyRendering();
|
|
12197
|
+
}
|
|
12191
12198
|
};
|
|
12192
12199
|
SurveyRow.prototype.createElement = function (element, elementIndex) {
|
|
12193
12200
|
var index = elementIndex ? "-" + elementIndex : 0;
|
|
@@ -13199,7 +13206,7 @@ var preact = react__WEBPACK_IMPORTED_MODULE_0__;
|
|
|
13199
13206
|
|
|
13200
13207
|
|
|
13201
13208
|
|
|
13202
|
-
(0,survey_core__WEBPACK_IMPORTED_MODULE_2__.checkLibraryVersion)("".concat("2.0.0
|
|
13209
|
+
(0,survey_core__WEBPACK_IMPORTED_MODULE_2__.checkLibraryVersion)("".concat("2.0.0"), "survey-js-ui");
|
|
13203
13210
|
|
|
13204
13211
|
})();
|
|
13205
13212
|
|