survey-creator-core 1.9.120 → 1.9.121
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/fonts.fontless.css +1 -1
- package/fonts.fontless.min.css +1 -1
- package/i18n/arabic.js +1 -1
- package/i18n/arabic.min.js +1 -1
- package/i18n/bulgarian.js +1 -1
- package/i18n/bulgarian.min.js +1 -1
- package/i18n/croatian.js +1 -1
- package/i18n/croatian.min.js +1 -1
- package/i18n/czech.js +1 -1
- package/i18n/czech.min.js +1 -1
- package/i18n/danish.js +1 -1
- package/i18n/danish.min.js +1 -1
- package/i18n/dutch.js +1 -1
- package/i18n/dutch.min.js +1 -1
- package/i18n/english.js +1 -1
- package/i18n/english.min.js +1 -1
- package/i18n/finnish.js +1 -1
- package/i18n/finnish.min.js +1 -1
- package/i18n/french.js +1 -1
- package/i18n/french.min.js +1 -1
- package/i18n/german.js +1 -1
- package/i18n/german.min.js +1 -1
- package/i18n/hungarian.js +1 -1
- package/i18n/hungarian.min.js +1 -1
- package/i18n/index.js +1 -1
- package/i18n/index.min.js +1 -1
- package/i18n/indonesian.js +1 -1
- package/i18n/indonesian.min.js +1 -1
- package/i18n/italian.js +1 -1
- package/i18n/italian.min.js +1 -1
- package/i18n/japanese.js +1 -1
- package/i18n/japanese.min.js +1 -1
- package/i18n/korean.js +1 -1
- package/i18n/korean.min.js +1 -1
- package/i18n/malay.js +1 -1
- package/i18n/malay.min.js +1 -1
- package/i18n/mongolian.js +1 -1
- package/i18n/mongolian.min.js +1 -1
- package/i18n/norwegian.js +1 -1
- package/i18n/norwegian.min.js +1 -1
- package/i18n/persian.js +1 -1
- package/i18n/persian.min.js +1 -1
- package/i18n/polish.js +1 -1
- package/i18n/polish.min.js +1 -1
- package/i18n/portuguese.js +1 -1
- package/i18n/portuguese.min.js +1 -1
- package/i18n/russian.js +1 -1
- package/i18n/russian.min.js +1 -1
- package/i18n/simplified-chinese.js +1 -1
- package/i18n/simplified-chinese.min.js +1 -1
- package/i18n/slovak.js +1 -1
- package/i18n/slovak.min.js +1 -1
- package/i18n/spanish.js +1 -1
- package/i18n/spanish.min.js +1 -1
- package/i18n/swedish.js +1 -1
- package/i18n/swedish.min.js +1 -1
- package/i18n/tajik.js +1 -1
- package/i18n/tajik.min.js +1 -1
- package/i18n/traditional-chinese.js +1 -1
- package/i18n/traditional-chinese.min.js +1 -1
- package/i18n/turkish.js +1 -1
- package/i18n/turkish.min.js +1 -1
- package/package.json +2 -2
- package/survey-creator-core.css +7 -3
- package/survey-creator-core.fontless.css +6 -2
- package/survey-creator-core.fontless.css.map +1 -1
- package/survey-creator-core.fontless.min.css +3 -3
- package/survey-creator-core.i18n.js +1 -1
- package/survey-creator-core.i18n.min.js +1 -1
- package/survey-creator-core.js +76 -27
- package/survey-creator-core.js.map +1 -1
- package/survey-creator-core.min.css +4 -4
- package/survey-creator-core.min.js +3 -3
- package/typings/components/action-container-view-model.d.ts +2 -2
- package/typings/components/question.d.ts +1 -0
package/survey-creator-core.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* SurveyJS Creator v1.9.
|
|
2
|
+
* SurveyJS Creator v1.9.121
|
|
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
|
|
@@ -130,7 +130,7 @@ License: MIT
|
|
|
130
130
|
/***/ (function(module, exports, __webpack_require__) {
|
|
131
131
|
|
|
132
132
|
/*!
|
|
133
|
-
* surveyjs - Survey JavaScript library v1.9.
|
|
133
|
+
* surveyjs - Survey JavaScript library v1.9.121
|
|
134
134
|
* Copyright (c) 2015-2023 Devsoft Baltic OÜ - http://surveyjs.io/
|
|
135
135
|
* License: MIT (http://www.opensource.org/licenses/mit-license.php)
|
|
136
136
|
*/
|
|
@@ -4549,20 +4549,37 @@ var SurveyElementActionContainer = /** @class */ (function (_super) {
|
|
|
4549
4549
|
function SurveyElementActionContainer() {
|
|
4550
4550
|
return _super !== null && _super.apply(this, arguments) || this;
|
|
4551
4551
|
}
|
|
4552
|
-
SurveyElementActionContainer.prototype.
|
|
4553
|
-
|
|
4554
|
-
action.mode = modes[action.id] || defaultMode;
|
|
4555
|
-
});
|
|
4552
|
+
SurveyElementActionContainer.prototype.needToShrink = function (item, shrinkStart, shrinkEnd) {
|
|
4553
|
+
return (item.innerItem.location == "start" && shrinkStart || item.innerItem.location != "start" && shrinkEnd);
|
|
4556
4554
|
};
|
|
4557
|
-
SurveyElementActionContainer.prototype.
|
|
4558
|
-
|
|
4555
|
+
SurveyElementActionContainer.prototype.setModeForActions = function (shrinkStart, shrinkEnd, exclude) {
|
|
4556
|
+
var _this = this;
|
|
4557
|
+
if (exclude === void 0) { exclude = []; }
|
|
4558
|
+
this.visibleActions.forEach(function (item) {
|
|
4559
|
+
if (exclude.indexOf(item.id) != -1) {
|
|
4560
|
+
item.mode = "removed";
|
|
4561
|
+
return;
|
|
4562
|
+
}
|
|
4563
|
+
if (_this.needToShrink(item, shrinkStart, shrinkEnd)) {
|
|
4564
|
+
item.mode = item.innerItem.iconName ? "small" : "removed";
|
|
4565
|
+
return;
|
|
4566
|
+
}
|
|
4567
|
+
item.mode = "large";
|
|
4568
|
+
});
|
|
4559
4569
|
};
|
|
4560
|
-
SurveyElementActionContainer.prototype.
|
|
4561
|
-
|
|
4570
|
+
SurveyElementActionContainer.prototype.calcItemSize = function (item, shrinkStart, shrinkEnd, exclude) {
|
|
4571
|
+
if (exclude === void 0) { exclude = []; }
|
|
4572
|
+
if (exclude.indexOf(item.id) != -1)
|
|
4573
|
+
return 0;
|
|
4574
|
+
if (this.needToShrink(item, shrinkStart, shrinkEnd)) {
|
|
4575
|
+
if (!item.innerItem.iconName)
|
|
4576
|
+
return 0;
|
|
4577
|
+
return item.minDimension;
|
|
4578
|
+
}
|
|
4579
|
+
return item.maxDimension;
|
|
4562
4580
|
};
|
|
4563
4581
|
SurveyElementActionContainer.prototype.fit = function (dimension, dotsItemSize) {
|
|
4564
4582
|
var _this = this;
|
|
4565
|
-
var _a;
|
|
4566
4583
|
if (dimension <= 0)
|
|
4567
4584
|
return;
|
|
4568
4585
|
this.dotsItem.visible = false;
|
|
@@ -4571,19 +4588,33 @@ var SurveyElementActionContainer = /** @class */ (function (_super) {
|
|
|
4571
4588
|
items.forEach(function (i) { return i.mode = "large"; });
|
|
4572
4589
|
return;
|
|
4573
4590
|
}
|
|
4574
|
-
if (dimension >= items.reduce(
|
|
4575
|
-
|
|
4591
|
+
// if (dimension >= items.reduce((sum, i) => sum += this.skipInputType(i, i.maxDimension), 0)) {
|
|
4592
|
+
// this.setModeForActions({ "convertInputType": "removed" }, "large");
|
|
4593
|
+
// return;
|
|
4594
|
+
// }
|
|
4595
|
+
if (dimension >= items.reduce(function (sum, i) { return sum += _this.calcItemSize(i, false, true); }, 0)) {
|
|
4596
|
+
this.setModeForActions(false, true);
|
|
4576
4597
|
return;
|
|
4577
4598
|
}
|
|
4578
|
-
if (dimension >= items.reduce(function (sum, i) { return sum += _this.
|
|
4579
|
-
this.setModeForActions(
|
|
4599
|
+
if (dimension >= items.reduce(function (sum, i) { return sum += _this.calcItemSize(i, false, true, ["convertInputType"]); }, 0)) {
|
|
4600
|
+
this.setModeForActions(false, true, ["convertInputType"]);
|
|
4580
4601
|
return;
|
|
4581
4602
|
}
|
|
4582
|
-
if (dimension >= items.reduce(function (sum, i) { return sum += _this.
|
|
4583
|
-
this.setModeForActions(
|
|
4603
|
+
if (dimension >= items.reduce(function (sum, i) { return sum += _this.calcItemSize(i, true, true); }, 0)) {
|
|
4604
|
+
this.setModeForActions(true, true);
|
|
4584
4605
|
return;
|
|
4585
4606
|
}
|
|
4586
|
-
this.
|
|
4607
|
+
this.visibleActions.forEach(function (item) {
|
|
4608
|
+
if (item.id == "convertTo") {
|
|
4609
|
+
item.mode = "small";
|
|
4610
|
+
return;
|
|
4611
|
+
}
|
|
4612
|
+
if (item.id == "convertInputType") {
|
|
4613
|
+
item.mode = "removed";
|
|
4614
|
+
return;
|
|
4615
|
+
}
|
|
4616
|
+
item.mode = "popup";
|
|
4617
|
+
});
|
|
4587
4618
|
this.dotsItem.visible = true;
|
|
4588
4619
|
this.hiddenItemsListModel.setItems(items.filter(function (i) { return i.mode == "popup"; }).map(function (i) { return i.innerItem; }));
|
|
4589
4620
|
};
|
|
@@ -5010,8 +5041,10 @@ var ImageItemValueWrapperViewModel = /** @class */ (function (_super) {
|
|
|
5010
5041
|
var fileInput = model.itemsRoot.getElementsByClassName("svc-choose-file-input")[0];
|
|
5011
5042
|
model.creator.chooseFiles(fileInput, function (files) {
|
|
5012
5043
|
model.isUploading = true;
|
|
5013
|
-
model.creator.uploadFiles(files, model.question, function (
|
|
5014
|
-
|
|
5044
|
+
model.creator.uploadFiles(files, model.question, function (status, link) {
|
|
5045
|
+
if (status === "success") {
|
|
5046
|
+
model.item.imageLink = link;
|
|
5047
|
+
}
|
|
5015
5048
|
model.isUploading = false;
|
|
5016
5049
|
});
|
|
5017
5050
|
}, { element: model.question, item: model.item });
|
|
@@ -5019,10 +5052,12 @@ var ImageItemValueWrapperViewModel = /** @class */ (function (_super) {
|
|
|
5019
5052
|
ImageItemValueWrapperViewModel.prototype.uploadFiles = function (files) {
|
|
5020
5053
|
var _this = this;
|
|
5021
5054
|
this.isUploading = true;
|
|
5022
|
-
this.creator.uploadFiles(files, this.question, function (
|
|
5023
|
-
|
|
5024
|
-
|
|
5025
|
-
|
|
5055
|
+
this.creator.uploadFiles(files, this.question, function (status, link) {
|
|
5056
|
+
if (status === "success") {
|
|
5057
|
+
_this.creator.createNewItemValue(_this.question, _this.isChoosingNewFile, function (res) {
|
|
5058
|
+
res.imageLink = link;
|
|
5059
|
+
});
|
|
5060
|
+
}
|
|
5026
5061
|
_this.isChoosingNewFile = false;
|
|
5027
5062
|
_this.isUploading = false;
|
|
5028
5063
|
});
|
|
@@ -7009,6 +7044,19 @@ var QuestionAdornerViewModel = /** @class */ (function (_super) {
|
|
|
7009
7044
|
//this.updateActionsProperties();
|
|
7010
7045
|
Object(_utils_utils__WEBPACK_IMPORTED_MODULE_4__["toggleHovered"])(event, element);
|
|
7011
7046
|
};
|
|
7047
|
+
QuestionAdornerViewModel.prototype.updateActionsProperties = function () {
|
|
7048
|
+
if (this.isDisposed)
|
|
7049
|
+
return;
|
|
7050
|
+
_super.prototype.updateActionsProperties.call(this);
|
|
7051
|
+
var actions = this.actionContainer.visibleActions;
|
|
7052
|
+
var switchToStartLocation = false;
|
|
7053
|
+
for (var i = actions.length - 1; i >= 0; i--) {
|
|
7054
|
+
if (actions[i].id === "convertTo")
|
|
7055
|
+
switchToStartLocation = true;
|
|
7056
|
+
if (!actions[i].innerItem.location)
|
|
7057
|
+
actions[i].innerItem.location = switchToStartLocation ? "start" : "end";
|
|
7058
|
+
}
|
|
7059
|
+
};
|
|
7012
7060
|
QuestionAdornerViewModel.prototype.updateElementAllowOptions = function (options, operationsAllow) {
|
|
7013
7061
|
_super.prototype.updateElementAllowOptions.call(this, options, operationsAllow);
|
|
7014
7062
|
this.updateActionVisibility("convertTo", operationsAllow && options.allowChangeType);
|
|
@@ -7155,12 +7203,13 @@ var QuestionAdornerViewModel = /** @class */ (function (_super) {
|
|
|
7155
7203
|
var newAction = Object(survey_core__WEBPACK_IMPORTED_MODULE_1__["createDropdownActionModel"])({
|
|
7156
7204
|
id: id,
|
|
7157
7205
|
css: "sv-action--convertTo sv-action-bar-item--secondary",
|
|
7158
|
-
iconName: (_a = this.creator.toolbox.getItemByName(this.element.getType())) === null || _a === void 0 ? void 0 : _a.iconName,
|
|
7206
|
+
iconName: id == "convertTo" ? (_a = this.creator.toolbox.getItemByName(this.element.getType())) === null || _a === void 0 ? void 0 : _a.iconName : undefined,
|
|
7159
7207
|
iconSize: 24,
|
|
7160
7208
|
title: actionTitle,
|
|
7161
7209
|
enabled: enabled,
|
|
7162
7210
|
visibleIndex: index,
|
|
7163
7211
|
disableShrink: false,
|
|
7212
|
+
location: "start",
|
|
7164
7213
|
action: function (newType) {
|
|
7165
7214
|
},
|
|
7166
7215
|
}, {
|
|
@@ -25702,7 +25751,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
25702
25751
|
/* harmony import */ var survey_core__WEBPACK_IMPORTED_MODULE_72__ = __webpack_require__(/*! survey-core */ "survey-core");
|
|
25703
25752
|
/* harmony import */ var survey_core__WEBPACK_IMPORTED_MODULE_72___default = /*#__PURE__*/__webpack_require__.n(survey_core__WEBPACK_IMPORTED_MODULE_72__);
|
|
25704
25753
|
var Version;
|
|
25705
|
-
Version = "" + "1.9.
|
|
25754
|
+
Version = "" + "1.9.121";
|
|
25706
25755
|
//should be loaded before other styles for easier override
|
|
25707
25756
|
__webpack_require__(/*! ../utils/context-button.scss */ "./src/utils/context-button.scss");
|
|
25708
25757
|
|
|
@@ -25793,7 +25842,7 @@ __webpack_require__(/*! ../utils/design.scss */ "./src/utils/design.scss");
|
|
|
25793
25842
|
__webpack_require__(/*! ../utils/layout.scss */ "./src/utils/layout.scss");
|
|
25794
25843
|
|
|
25795
25844
|
survey_core__WEBPACK_IMPORTED_MODULE_72__["settings"].supportCreatorV2 = true;
|
|
25796
|
-
Object(survey_core__WEBPACK_IMPORTED_MODULE_72__["checkLibraryVersion"])("" + "1.9.
|
|
25845
|
+
Object(survey_core__WEBPACK_IMPORTED_MODULE_72__["checkLibraryVersion"])("" + "1.9.121", "survey-creator-core");
|
|
25797
25846
|
|
|
25798
25847
|
|
|
25799
25848
|
/***/ }),
|