survey-creator-core 1.12.10 → 1.12.11
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.LICENSE.txt +1 -1
- package/i18n/bulgarian.js +1 -1
- package/i18n/bulgarian.min.js.LICENSE.txt +1 -1
- package/i18n/croatian.js +1 -1
- package/i18n/croatian.min.js.LICENSE.txt +1 -1
- package/i18n/czech.js +1 -1
- package/i18n/czech.min.js.LICENSE.txt +1 -1
- package/i18n/danish.js +1 -1
- package/i18n/danish.min.js.LICENSE.txt +1 -1
- package/i18n/dutch.js +1 -1
- package/i18n/dutch.min.js.LICENSE.txt +1 -1
- package/i18n/english.js +1 -1
- package/i18n/english.min.js.LICENSE.txt +1 -1
- package/i18n/finnish.js +1 -1
- package/i18n/finnish.min.js.LICENSE.txt +1 -1
- package/i18n/french.js +1 -1
- package/i18n/french.min.js.LICENSE.txt +1 -1
- package/i18n/german.js +1 -1
- package/i18n/german.min.js.LICENSE.txt +1 -1
- package/i18n/hebrew.js +1 -1
- package/i18n/hebrew.min.js.LICENSE.txt +1 -1
- package/i18n/hungarian.js +1 -1
- package/i18n/hungarian.min.js.LICENSE.txt +1 -1
- package/i18n/index.js +1 -1
- package/i18n/index.min.js.LICENSE.txt +1 -1
- package/i18n/indonesian.js +1 -1
- package/i18n/indonesian.min.js.LICENSE.txt +1 -1
- package/i18n/italian.js +1 -1
- package/i18n/italian.min.js.LICENSE.txt +1 -1
- package/i18n/japanese.js +1 -1
- package/i18n/japanese.min.js.LICENSE.txt +1 -1
- package/i18n/korean.js +1 -1
- package/i18n/korean.min.js.LICENSE.txt +1 -1
- package/i18n/malay.js +1 -1
- package/i18n/malay.min.js.LICENSE.txt +1 -1
- package/i18n/mongolian.js +1 -1
- package/i18n/mongolian.min.js.LICENSE.txt +1 -1
- package/i18n/norwegian.js +1 -1
- package/i18n/norwegian.min.js.LICENSE.txt +1 -1
- package/i18n/persian.js +1 -1
- package/i18n/persian.min.js.LICENSE.txt +1 -1
- package/i18n/polish.js +1 -1
- package/i18n/polish.min.js.LICENSE.txt +1 -1
- package/i18n/portuguese.js +1 -1
- package/i18n/portuguese.min.js.LICENSE.txt +1 -1
- package/i18n/romanian.js +1 -1
- package/i18n/romanian.min.js.LICENSE.txt +1 -1
- package/i18n/russian.js +1 -1
- package/i18n/russian.min.js.LICENSE.txt +1 -1
- package/i18n/simplified-chinese.js +1 -1
- package/i18n/simplified-chinese.min.js.LICENSE.txt +1 -1
- package/i18n/slovak.js +1 -1
- package/i18n/slovak.min.js.LICENSE.txt +1 -1
- package/i18n/spanish.js +1 -1
- package/i18n/spanish.min.js.LICENSE.txt +1 -1
- package/i18n/swedish.js +1 -1
- package/i18n/swedish.min.js.LICENSE.txt +1 -1
- package/i18n/tajik.js +1 -1
- package/i18n/tajik.min.js.LICENSE.txt +1 -1
- package/i18n/thai.js +1 -1
- package/i18n/thai.min.js.LICENSE.txt +1 -1
- package/i18n/traditional-chinese.js +1 -1
- package/i18n/traditional-chinese.min.js.LICENSE.txt +1 -1
- package/i18n/turkish.js +1 -1
- package/i18n/turkish.min.js.LICENSE.txt +1 -1
- package/package.json +2 -2
- package/survey-creator-core.css +144 -76
- package/survey-creator-core.fontless.css +143 -75
- package/survey-creator-core.fontless.css.map +1 -1
- package/survey-creator-core.fontless.min.css +15 -15
- package/survey-creator-core.i18n.js +1 -1
- package/survey-creator-core.i18n.min.js.LICENSE.txt +1 -1
- package/survey-creator-core.js +294 -154
- package/survey-creator-core.js.map +1 -1
- package/survey-creator-core.min.css +16 -16
- package/survey-creator-core.min.js +1 -1
- package/survey-creator-core.min.js.LICENSE.txt +1 -1
- package/themes/default-contrast.js +38 -8
- package/themes/default-contrast.js.map +1 -1
- package/themes/default-contrast.min.js +1 -1
- package/themes/default-contrast.min.js.LICENSE.txt +1 -1
- package/themes/default-dark.js +38 -8
- package/themes/default-dark.js.map +1 -1
- package/themes/default-dark.min.js +1 -1
- package/themes/default-dark.min.js.LICENSE.txt +1 -1
- package/themes/default-light.js +38 -8
- package/themes/default-light.js.map +1 -1
- package/themes/default-light.min.js +1 -1
- package/themes/default-light.min.js.LICENSE.txt +1 -1
- package/themes/index.js +38 -8
- package/themes/index.js.map +1 -1
- package/themes/index.min.js +1 -1
- package/themes/index.min.js.LICENSE.txt +1 -1
- package/themes/themes/default.d.ts +62 -2
- package/typings/components/action-container-view-model.d.ts +2 -1
- package/typings/components/question-dropdown.d.ts +2 -1
- package/typings/components/question.d.ts +3 -4
- package/typings/components/row.d.ts +4 -0
- package/typings/components/tabs/designer.d.ts +1 -1
- package/typings/components/tabs/logic-types.d.ts +1 -1
- package/typings/components/tabs/logic.d.ts +3 -2
- package/typings/components/tabs/test-plugin.d.ts +3 -0
- package/typings/components/tabs/theme-plugin.d.ts +1 -0
- package/typings/creator-base.d.ts +25 -4
- package/typings/creator-events-api.d.ts +15 -0
- package/typings/creator-options.d.ts +16 -0
- package/typings/creator-settings.d.ts +8 -6
- package/typings/expand-collapse-manager.d.ts +2 -0
- package/typings/property-grid/matrices.d.ts +1 -0
- package/typings/property-grid-theme/property-grid.d.ts +1 -0
- package/typings/themes/default.d.ts +62 -2
package/survey-creator-core.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* SurveyJS Creator v1.12.
|
|
2
|
+
* SurveyJS Creator v1.12.11
|
|
3
3
|
* (c) 2015-2024 Devsoft Baltic OÜ - http://surveyjs.io/
|
|
4
4
|
* Github: https://github.com/surveyjs/survey-creator
|
|
5
5
|
* License: https://surveyjs.io/Licenses#SurveyCreator
|
|
@@ -4680,11 +4680,6 @@ var SurveyElementAdornerBase = /** @class */ (function (_super) {
|
|
|
4680
4680
|
_this._renderedCollapsed = !val;
|
|
4681
4681
|
}, function () { return !_this.renderedCollapsed; });
|
|
4682
4682
|
_this.draggedIn = false;
|
|
4683
|
-
_this.selectedPropPageFunc = function (_, options) {
|
|
4684
|
-
if (options.name === "isSelectedInDesigner") {
|
|
4685
|
-
_this.onElementSelectedChanged(options.newValue);
|
|
4686
|
-
}
|
|
4687
|
-
};
|
|
4688
4683
|
_this.sidebarFlyoutModeChangedFunc = function (_, options) {
|
|
4689
4684
|
if (options.name === "flyoutMode") {
|
|
4690
4685
|
_this.updateActionsProperties();
|
|
@@ -4813,6 +4808,7 @@ var SurveyElementAdornerBase = /** @class */ (function (_super) {
|
|
|
4813
4808
|
var actionContainer = new SurveyElementActionContainer();
|
|
4814
4809
|
actionContainer.dotsItem.iconSize = "auto";
|
|
4815
4810
|
actionContainer.dotsItem.popupModel.horizontalPosition = "center";
|
|
4811
|
+
actionContainer.dotsItem.popupModel.cssClass += " svc-creator-popup";
|
|
4816
4812
|
return actionContainer;
|
|
4817
4813
|
};
|
|
4818
4814
|
Object.defineProperty(SurveyElementAdornerBase.prototype, "canExpandOnDrag", {
|
|
@@ -4848,7 +4844,13 @@ var SurveyElementAdornerBase = /** @class */ (function (_super) {
|
|
|
4848
4844
|
this.collapsed = !this.collapsed;
|
|
4849
4845
|
event.stopPropagation();
|
|
4850
4846
|
};
|
|
4851
|
-
|
|
4847
|
+
Object.defineProperty(SurveyElementAdornerBase.prototype, "element", {
|
|
4848
|
+
get: function () {
|
|
4849
|
+
return this.surveyElement;
|
|
4850
|
+
},
|
|
4851
|
+
enumerable: false,
|
|
4852
|
+
configurable: true
|
|
4853
|
+
});
|
|
4852
4854
|
SurveyElementAdornerBase.GetAdorner = function (surveyElement) {
|
|
4853
4855
|
return surveyElement.getPropertyValue(SurveyElementAdornerBase.AdornerValueName);
|
|
4854
4856
|
};
|
|
@@ -4862,24 +4864,25 @@ var SurveyElementAdornerBase = /** @class */ (function (_super) {
|
|
|
4862
4864
|
var _a;
|
|
4863
4865
|
if (!!this.surveyElement) {
|
|
4864
4866
|
var state = (_a = this.creator.designerStateManager) === null || _a === void 0 ? void 0 : _a.getElementState(this.surveyElement);
|
|
4865
|
-
this.collapsed = state.collapsed;
|
|
4867
|
+
this.collapsed = this.creator.getElementExpandCollapseState(this.surveyElement, "loading", state.collapsed);
|
|
4866
4868
|
}
|
|
4867
4869
|
this.needToRenderContent = !this.collapsed;
|
|
4868
4870
|
};
|
|
4869
4871
|
SurveyElementAdornerBase.prototype.detachElement = function (surveyElement) {
|
|
4870
4872
|
if (surveyElement) {
|
|
4871
|
-
|
|
4872
|
-
|
|
4873
|
-
}
|
|
4874
|
-
surveyElement.onPropertyChanged.remove(this.selectedPropPageFunc);
|
|
4873
|
+
surveyElement.setPropertyValue(SurveyElementAdornerBase.AdornerValueName, null);
|
|
4874
|
+
surveyElement.unRegisterFunctionOnPropertyValueChanged("isSelectedInDesigner", "questionSelected");
|
|
4875
4875
|
this.cleanActionsContainer();
|
|
4876
4876
|
}
|
|
4877
4877
|
};
|
|
4878
4878
|
SurveyElementAdornerBase.prototype.attachElement = function (surveyElement) {
|
|
4879
|
+
var _this = this;
|
|
4879
4880
|
var _a, _b;
|
|
4880
4881
|
if (surveyElement) {
|
|
4881
4882
|
(_b = (_a = this.creator) === null || _a === void 0 ? void 0 : _a.designerStateManager) === null || _b === void 0 ? void 0 : _b.initForElement(surveyElement);
|
|
4882
|
-
surveyElement.
|
|
4883
|
+
surveyElement.registerFunctionOnPropertyValueChanged("isSelectedInDesigner", function (newValue) {
|
|
4884
|
+
_this.onElementSelectedChanged(newValue);
|
|
4885
|
+
}, "questionSelected");
|
|
4883
4886
|
this.restoreState();
|
|
4884
4887
|
this.updateActionsContainer(surveyElement);
|
|
4885
4888
|
this.updateActionsProperties();
|
|
@@ -4887,7 +4890,7 @@ var SurveyElementAdornerBase = /** @class */ (function (_super) {
|
|
|
4887
4890
|
}
|
|
4888
4891
|
};
|
|
4889
4892
|
SurveyElementAdornerBase.prototype.setSurveyElement = function (surveyElement) {
|
|
4890
|
-
this.
|
|
4893
|
+
this.detachOnlyMyElement();
|
|
4891
4894
|
this.surveyElement = surveyElement;
|
|
4892
4895
|
this.attachElement(this.surveyElement);
|
|
4893
4896
|
};
|
|
@@ -4906,9 +4909,14 @@ var SurveyElementAdornerBase = /** @class */ (function (_super) {
|
|
|
4906
4909
|
this.creator.expandCollapseManager.add(this);
|
|
4907
4910
|
}
|
|
4908
4911
|
};
|
|
4912
|
+
SurveyElementAdornerBase.prototype.detachOnlyMyElement = function () {
|
|
4913
|
+
if (this.surveyElement && this.surveyElement.getPropertyValue(SurveyElementAdornerBase.AdornerValueName) === this && !this.surveyElement.isDisposed) {
|
|
4914
|
+
this.detachElement(this.surveyElement);
|
|
4915
|
+
}
|
|
4916
|
+
};
|
|
4909
4917
|
SurveyElementAdornerBase.prototype.detachFromUI = function () {
|
|
4910
4918
|
this.rootElement = undefined;
|
|
4911
|
-
this.
|
|
4919
|
+
this.detachOnlyMyElement();
|
|
4912
4920
|
this.surveyElement = undefined;
|
|
4913
4921
|
this.creator.sidebar.onPropertyChanged.remove(this.sidebarFlyoutModeChangedFunc);
|
|
4914
4922
|
this.creator.expandCollapseManager.remove(this);
|
|
@@ -4919,6 +4927,8 @@ var SurveyElementAdornerBase = /** @class */ (function (_super) {
|
|
|
4919
4927
|
this.actionContainer.dispose();
|
|
4920
4928
|
}
|
|
4921
4929
|
_super.prototype.dispose.call(this);
|
|
4930
|
+
this.sidebarFlyoutModeChangedFunc = undefined;
|
|
4931
|
+
this.animationCollapsed = undefined;
|
|
4922
4932
|
};
|
|
4923
4933
|
SurveyElementAdornerBase.prototype.onElementSelectedChanged = function (isSelected) {
|
|
4924
4934
|
if (!isSelected)
|
|
@@ -6461,7 +6471,7 @@ var PageAdorner = /** @class */ (function (_super) {
|
|
|
6461
6471
|
_this.dragDropHelper.startDragSurveyElement(event, element, isElementSelected);
|
|
6462
6472
|
if (_this.creator.collapsePagesOnDrag) {
|
|
6463
6473
|
(_a = _this.creator.designerStateManager) === null || _a === void 0 ? void 0 : _a.suspend();
|
|
6464
|
-
_this.creator.
|
|
6474
|
+
_this.creator.collapseAllElements();
|
|
6465
6475
|
}
|
|
6466
6476
|
return true;
|
|
6467
6477
|
};
|
|
@@ -6519,13 +6529,13 @@ var PageAdorner = /** @class */ (function (_super) {
|
|
|
6519
6529
|
}
|
|
6520
6530
|
surveyElement.registerFunctionOnPropertiesValueChanged(["dragTypeOverMe"], function () {
|
|
6521
6531
|
_this.updateDragTypeOverMe();
|
|
6522
|
-
});
|
|
6532
|
+
}, "dragOver");
|
|
6523
6533
|
surveyElement.registerFunctionOnPropertiesValueChanged(["isDragMe"], function () {
|
|
6524
6534
|
_this.updateIsDragMe();
|
|
6525
|
-
});
|
|
6535
|
+
}, "dragOver");
|
|
6526
6536
|
surveyElement.registerFunctionOnPropertiesValueChanged(["visibleRows"], function (newValue) {
|
|
6527
6537
|
_this.updateShowPlaceholder(newValue);
|
|
6528
|
-
});
|
|
6538
|
+
}, "updatePlaceholder");
|
|
6529
6539
|
this.updateShowPlaceholder();
|
|
6530
6540
|
surveyElement.onFirstRendering();
|
|
6531
6541
|
surveyElement.updateCustomWidgets();
|
|
@@ -6537,8 +6547,10 @@ var PageAdorner = /** @class */ (function (_super) {
|
|
|
6537
6547
|
};
|
|
6538
6548
|
PageAdorner.prototype.detachElement = function (surveyElement) {
|
|
6539
6549
|
if (!!surveyElement) {
|
|
6540
|
-
surveyElement.unRegisterFunctionOnPropertiesValueChanged(["
|
|
6550
|
+
surveyElement.unRegisterFunctionOnPropertiesValueChanged(["elements"], "updatePlaceholder");
|
|
6551
|
+
surveyElement.unRegisterFunctionOnPropertiesValueChanged(["dragTypeOverMe", "isDragMe"], "dragOver");
|
|
6541
6552
|
surveyElement.unRegisterFunctionOnPropertiesValueChanged(["title", "description"], "add_ghost");
|
|
6553
|
+
surveyElement.unRegisterFunctionOnPropertiesValueChanged(["visibleRows"], "updatePlaceholder");
|
|
6542
6554
|
surveyElement["surveyChangedCallback"] = undefined;
|
|
6543
6555
|
}
|
|
6544
6556
|
_super.prototype.detachElement.call(this, surveyElement);
|
|
@@ -6826,9 +6838,6 @@ var QuestionDropdownAdornerViewModel = /** @class */ (function (_super) {
|
|
|
6826
6838
|
_this.switchCollapse = function () {
|
|
6827
6839
|
_this.isCollapsed = !_this.isCollapsed;
|
|
6828
6840
|
};
|
|
6829
|
-
_this.surveyElement.registerFunctionOnPropertyValueChanged("isSelectedInDesigner", function () {
|
|
6830
|
-
_this.leftFocus();
|
|
6831
|
-
}, "dropdownCollapseChecker");
|
|
6832
6841
|
_this.visibleCount = creator.maxVisibleChoices;
|
|
6833
6842
|
_this.isCollapsed = _this.isCollapsed && _this.needToCollapse;
|
|
6834
6843
|
return _this;
|
|
@@ -6885,9 +6894,20 @@ var QuestionDropdownAdornerViewModel = /** @class */ (function (_super) {
|
|
|
6885
6894
|
_editorLocalization__WEBPACK_IMPORTED_MODULE_3__.editorLocalization.getString("ed.showLessChoices") :
|
|
6886
6895
|
_editorLocalization__WEBPACK_IMPORTED_MODULE_3__.editorLocalization.getString("ed.showMoreChoices");
|
|
6887
6896
|
};
|
|
6888
|
-
QuestionDropdownAdornerViewModel.prototype.
|
|
6889
|
-
|
|
6890
|
-
|
|
6897
|
+
QuestionDropdownAdornerViewModel.prototype.attachElement = function (surveyElement) {
|
|
6898
|
+
var _this = this;
|
|
6899
|
+
_super.prototype.attachElement.call(this, surveyElement);
|
|
6900
|
+
if (!!surveyElement) {
|
|
6901
|
+
surveyElement.registerFunctionOnPropertyValueChanged("isSelectedInDesigner", function () {
|
|
6902
|
+
_this.leftFocus();
|
|
6903
|
+
}, "dropdownCollapseChecker");
|
|
6904
|
+
}
|
|
6905
|
+
};
|
|
6906
|
+
QuestionDropdownAdornerViewModel.prototype.detachElement = function (surveyElement) {
|
|
6907
|
+
if (!!surveyElement) {
|
|
6908
|
+
surveyElement.unRegisterFunctionOnPropertyValueChanged("isSelectedInDesigner", "dropdownCollapseChecker");
|
|
6909
|
+
}
|
|
6910
|
+
_super.prototype.detachElement.call(this, surveyElement);
|
|
6891
6911
|
};
|
|
6892
6912
|
(0,tslib__WEBPACK_IMPORTED_MODULE_0__.__decorate)([
|
|
6893
6913
|
(0,survey_core__WEBPACK_IMPORTED_MODULE_1__.property)({ defaultValue: true })
|
|
@@ -7024,8 +7044,10 @@ var QuestionImageAdornerViewModel = /** @class */ (function (_super) {
|
|
|
7024
7044
|
.append("svc-question__content--loading", this.isUploading).toString();
|
|
7025
7045
|
};
|
|
7026
7046
|
QuestionImageAdornerViewModel.prototype.dispose = function () {
|
|
7027
|
-
this.surveyElement
|
|
7028
|
-
|
|
7047
|
+
if (this.surveyElement) {
|
|
7048
|
+
this.surveyElement.unRegisterFunctionOnPropertyValueChanged("imageLink", "imageLinkValueChanged");
|
|
7049
|
+
this.surveyElement.locImageLink.onStringChanged.remove(this.imageLinkValueChangedHandler);
|
|
7050
|
+
}
|
|
7029
7051
|
_super.prototype.dispose.call(this);
|
|
7030
7052
|
};
|
|
7031
7053
|
(0,tslib__WEBPACK_IMPORTED_MODULE_0__.__decorate)([
|
|
@@ -7305,13 +7327,6 @@ var QuestionAdornerViewModel = /** @class */ (function (_super) {
|
|
|
7305
7327
|
_string_editor__WEBPACK_IMPORTED_MODULE_7__.StringItemsNavigatorBase.setQuestion(_this);
|
|
7306
7328
|
return _this;
|
|
7307
7329
|
}
|
|
7308
|
-
Object.defineProperty(QuestionAdornerViewModel.prototype, "element", {
|
|
7309
|
-
get: function () {
|
|
7310
|
-
return this.surveyElement;
|
|
7311
|
-
},
|
|
7312
|
-
enumerable: false,
|
|
7313
|
-
configurable: true
|
|
7314
|
-
});
|
|
7315
7330
|
QuestionAdornerViewModel.prototype.canSelectElement = function () {
|
|
7316
7331
|
return _super.prototype.canSelectElement.call(this) && this.surveyElement.isInteractiveDesignElement;
|
|
7317
7332
|
};
|
|
@@ -7543,11 +7558,24 @@ var QuestionAdornerViewModel = /** @class */ (function (_super) {
|
|
|
7543
7558
|
res.text = res.messageText;
|
|
7544
7559
|
return res;
|
|
7545
7560
|
};
|
|
7546
|
-
QuestionAdornerViewModel.prototype.
|
|
7547
|
-
|
|
7548
|
-
|
|
7549
|
-
|
|
7550
|
-
|
|
7561
|
+
QuestionAdornerViewModel.prototype.detachElement = function (surveyElement) {
|
|
7562
|
+
if (surveyElement) {
|
|
7563
|
+
surveyElement.unRegisterFunctionOnPropertyValueChanged("isRequired", "isRequiredAdorner");
|
|
7564
|
+
surveyElement.unRegisterFunctionOnPropertiesValueChanged(["inputType", "rateType"], "inputTypeAdorner");
|
|
7565
|
+
if (!!surveyElement["setCanShowOptionItemCallback"]) {
|
|
7566
|
+
surveyElement.setCanShowOptionItemCallback(undefined);
|
|
7567
|
+
}
|
|
7568
|
+
}
|
|
7569
|
+
_super.prototype.detachElement.call(this, this.element);
|
|
7570
|
+
};
|
|
7571
|
+
QuestionAdornerViewModel.prototype.attachElement = function (surveyElement) {
|
|
7572
|
+
var _this = this;
|
|
7573
|
+
_super.prototype.attachElement.call(this, surveyElement);
|
|
7574
|
+
if (surveyElement) {
|
|
7575
|
+
surveyElement.registerFunctionOnPropertyValueChanged("isRequired", function (newValue) {
|
|
7576
|
+
var requiredAction = _this.actionContainer.getActionById("isrequired");
|
|
7577
|
+
_this.updateRequiredAction(requiredAction);
|
|
7578
|
+
}, "isRequiredAdorner");
|
|
7551
7579
|
}
|
|
7552
7580
|
};
|
|
7553
7581
|
Object.defineProperty(QuestionAdornerViewModel.prototype, "isDraggable", {
|
|
@@ -7685,16 +7713,6 @@ var QuestionAdornerViewModel = /** @class */ (function (_super) {
|
|
|
7685
7713
|
enumerable: false,
|
|
7686
7714
|
configurable: true
|
|
7687
7715
|
});
|
|
7688
|
-
Object.defineProperty(QuestionAdornerViewModel.prototype, "isRequired", {
|
|
7689
|
-
get: function () {
|
|
7690
|
-
return this.surveyElement.isRequired;
|
|
7691
|
-
},
|
|
7692
|
-
set: function (newVal) {
|
|
7693
|
-
this.surveyElement.isRequired = newVal;
|
|
7694
|
-
},
|
|
7695
|
-
enumerable: false,
|
|
7696
|
-
configurable: true
|
|
7697
|
-
});
|
|
7698
7716
|
QuestionAdornerViewModel.prototype.onPointerDown = function (pointerDownEvent) {
|
|
7699
7717
|
this.dragOrClickHelper.onPointerDown(pointerDownEvent);
|
|
7700
7718
|
};
|
|
@@ -7966,13 +7984,12 @@ var QuestionAdornerViewModel = /** @class */ (function (_super) {
|
|
|
7966
7984
|
allowSelection: true,
|
|
7967
7985
|
horizontalPosition: "center",
|
|
7968
7986
|
cssClass: "svc-creator-popup",
|
|
7969
|
-
|
|
7970
|
-
|
|
7971
|
-
|
|
7972
|
-
|
|
7973
|
-
|
|
7974
|
-
|
|
7975
|
-
},
|
|
7987
|
+
});
|
|
7988
|
+
newAction.popupModel.onVisibilityChanged.add(function (_, opt) {
|
|
7989
|
+
if (opt.isVisible) {
|
|
7990
|
+
var listModel_1 = newAction.popupModel.contentComponentData.model;
|
|
7991
|
+
options.updateListModel(listModel_1);
|
|
7992
|
+
}
|
|
7976
7993
|
});
|
|
7977
7994
|
var listModel = newAction.popupModel.contentComponentData.model;
|
|
7978
7995
|
// options.updateListModel(listModel);
|
|
@@ -7982,29 +7999,38 @@ var QuestionAdornerViewModel = /** @class */ (function (_super) {
|
|
|
7982
7999
|
newAction.data.locOwner = this.creator;
|
|
7983
8000
|
return newAction;
|
|
7984
8001
|
};
|
|
8002
|
+
QuestionAdornerViewModel.prototype.updateRequiredAction = function (requiredAction) {
|
|
8003
|
+
var _a;
|
|
8004
|
+
if (!requiredAction)
|
|
8005
|
+
return;
|
|
8006
|
+
var isRequired = (_a = this.surveyElement) === null || _a === void 0 ? void 0 : _a.isRequired;
|
|
8007
|
+
requiredAction.ariaChecked = isRequired;
|
|
8008
|
+
requiredAction.active = isRequired;
|
|
8009
|
+
requiredAction.innerItem.title = isRequired ? this.creator.getLocString("pe.removeRequiredMark") : this.creator.getLocString("pe.markRequired");
|
|
8010
|
+
};
|
|
7985
8011
|
QuestionAdornerViewModel.prototype.createRequiredAction = function () {
|
|
7986
8012
|
var _this = this;
|
|
7987
8013
|
this.surveyElement.isRequired;
|
|
7988
|
-
var
|
|
8014
|
+
var actionSetup = {
|
|
7989
8015
|
id: "isrequired",
|
|
7990
|
-
ariaChecked: new survey_core__WEBPACK_IMPORTED_MODULE_1__.ComputedUpdater(function () { return _this.isRequired; }),
|
|
7991
8016
|
ariaRole: "checkbox",
|
|
7992
8017
|
css: "svc-action-bar-item--right",
|
|
7993
8018
|
innerCss: "svc-required-action",
|
|
7994
|
-
title: this.creator.getLocString("pe.isRequired"),
|
|
7995
8019
|
visibleIndex: 20,
|
|
7996
8020
|
iconName: "icon-required",
|
|
7997
8021
|
iconSize: "auto",
|
|
7998
|
-
active: new survey_core__WEBPACK_IMPORTED_MODULE_1__.ComputedUpdater(function () { return _this.isRequired; }),
|
|
7999
8022
|
action: function () {
|
|
8023
|
+
var _a;
|
|
8000
8024
|
if (_this.creator.isCanModifyProperty(_this.surveyElement, "isRequired")) {
|
|
8001
|
-
_this.isRequired = _this.getUpdatedPropertyValue("isRequired", !_this.isRequired);
|
|
8025
|
+
_this.surveyElement.isRequired = _this.getUpdatedPropertyValue("isRequired", !((_a = _this.surveyElement) === null || _a === void 0 ? void 0 : _a.isRequired));
|
|
8002
8026
|
}
|
|
8003
8027
|
}
|
|
8004
|
-
}
|
|
8005
|
-
|
|
8006
|
-
|
|
8007
|
-
|
|
8028
|
+
};
|
|
8029
|
+
var innerAction = new survey_core__WEBPACK_IMPORTED_MODULE_1__.Action(actionSetup);
|
|
8030
|
+
var requiredAction = new survey_core__WEBPACK_IMPORTED_MODULE_1__.Action(actionSetup);
|
|
8031
|
+
requiredAction.title = this.creator.getLocString("pe.isRequired");
|
|
8032
|
+
requiredAction.innerItem = innerAction;
|
|
8033
|
+
this.updateRequiredAction(requiredAction);
|
|
8008
8034
|
return requiredAction;
|
|
8009
8035
|
};
|
|
8010
8036
|
QuestionAdornerViewModel.prototype.getUpdatedPropertyValue = function (propName, newValue) {
|
|
@@ -8293,13 +8319,19 @@ var RowViewModel = /** @class */ (function (_super) {
|
|
|
8293
8319
|
_this.creator = creator;
|
|
8294
8320
|
_this.row = row;
|
|
8295
8321
|
_this.templateData = templateData;
|
|
8296
|
-
_this.
|
|
8297
|
-
_this.row.onPropertyChanged.add(function (s, o) {
|
|
8322
|
+
_this.rowDragTypeOverMeChanged = function (s, o) {
|
|
8298
8323
|
if (o.name == "dragTypeOverMe")
|
|
8299
8324
|
_this.dragTypeOverMe = o.newValue;
|
|
8300
|
-
}
|
|
8325
|
+
};
|
|
8326
|
+
_this.dragTypeOverMe = _this.row.dragTypeOverMe;
|
|
8301
8327
|
return _this;
|
|
8302
8328
|
}
|
|
8329
|
+
RowViewModel.prototype.subscribeElementChanges = function () {
|
|
8330
|
+
this.row.onPropertyChanged.add(this.rowDragTypeOverMeChanged);
|
|
8331
|
+
};
|
|
8332
|
+
RowViewModel.prototype.unsubscribeElementChanges = function () {
|
|
8333
|
+
this.row.onPropertyChanged.remove(this.rowDragTypeOverMeChanged);
|
|
8334
|
+
};
|
|
8303
8335
|
Object.defineProperty(RowViewModel.prototype, "cssClasses", {
|
|
8304
8336
|
get: function () {
|
|
8305
8337
|
var result = "svc-row";
|
|
@@ -8319,6 +8351,11 @@ var RowViewModel = /** @class */ (function (_super) {
|
|
|
8319
8351
|
enumerable: false,
|
|
8320
8352
|
configurable: true
|
|
8321
8353
|
});
|
|
8354
|
+
RowViewModel.prototype.dispose = function () {
|
|
8355
|
+
_super.prototype.dispose.call(this);
|
|
8356
|
+
this.unsubscribeElementChanges();
|
|
8357
|
+
this.rowDragTypeOverMeChanged = undefined;
|
|
8358
|
+
};
|
|
8322
8359
|
(0,tslib__WEBPACK_IMPORTED_MODULE_0__.__decorate)([
|
|
8323
8360
|
(0,survey_core__WEBPACK_IMPORTED_MODULE_1__.property)()
|
|
8324
8361
|
], RowViewModel.prototype, "dragTypeOverMe", void 0);
|
|
@@ -8869,7 +8906,7 @@ var TabControlModel = /** @class */ (function (_super) {
|
|
|
8869
8906
|
TabControlModel.prototype.updateExpandCollapseAction = function () {
|
|
8870
8907
|
this.expandCollapseAction.iconName = this.sidePanel.visible ? "icon-collapse-panel" : "icon-expand-panel";
|
|
8871
8908
|
this.expandCollapseAction.css = this.sidePanel.visible ? "svd-grid-hide" : "svd-grid-expand";
|
|
8872
|
-
this.expandCollapseAction.
|
|
8909
|
+
this.expandCollapseAction.locTooltipName = this.sidePanel.visible ? "ed.hidePanel" : "ed.showPanel";
|
|
8873
8910
|
};
|
|
8874
8911
|
TabControlModel.prototype.createToggleAction = function () {
|
|
8875
8912
|
var _this = this;
|
|
@@ -9309,13 +9346,13 @@ var simulatorDevices = {
|
|
|
9309
9346
|
// title: "Windows 10 Phone",
|
|
9310
9347
|
// cssClass: "svd-simulator-win10phone",
|
|
9311
9348
|
// },
|
|
9312
|
-
|
|
9349
|
+
microsoftSurface: {
|
|
9313
9350
|
cssPixelRatio: 1,
|
|
9314
9351
|
ppi: 148,
|
|
9315
9352
|
width: 768,
|
|
9316
9353
|
height: 1366,
|
|
9317
9354
|
deviceType: "tablet",
|
|
9318
|
-
title: "
|
|
9355
|
+
title: "Microsoft Surface",
|
|
9319
9356
|
cssClass: "svd-simulator-mssurface",
|
|
9320
9357
|
},
|
|
9321
9358
|
genericPhone: {
|
|
@@ -10166,7 +10203,11 @@ var TabDesignerPlugin = /** @class */ (function () {
|
|
|
10166
10203
|
macOsHotkey: {
|
|
10167
10204
|
keyCode: 46,
|
|
10168
10205
|
},
|
|
10169
|
-
execute: function () {
|
|
10206
|
+
execute: function () {
|
|
10207
|
+
if (!_this.creator.readOnly) {
|
|
10208
|
+
_this.creator.deleteCurrentElement();
|
|
10209
|
+
}
|
|
10210
|
+
}
|
|
10170
10211
|
});
|
|
10171
10212
|
}
|
|
10172
10213
|
Object.defineProperty(TabDesignerPlugin.prototype, "isSurveySelected", {
|
|
@@ -10311,8 +10352,8 @@ var TabDesignerPlugin = /** @class */ (function () {
|
|
|
10311
10352
|
});
|
|
10312
10353
|
var settingsAction = new _utils_actions__WEBPACK_IMPORTED_MODULE_8__.MenuButton({
|
|
10313
10354
|
id: "theme-settings",
|
|
10314
|
-
locTooltipName: "
|
|
10315
|
-
iconName: "
|
|
10355
|
+
locTooltipName: "ed.creatorSettingTitle",
|
|
10356
|
+
iconName: "gear-24x24",
|
|
10316
10357
|
iconSize: "auto",
|
|
10317
10358
|
pressed: false,
|
|
10318
10359
|
action: function () {
|
|
@@ -10380,7 +10421,9 @@ var TabDesignerPlugin = /** @class */ (function () {
|
|
|
10380
10421
|
this.creator.sidebar.hideSideBarVisibilityControlActions = false;
|
|
10381
10422
|
this.creator.sidebar.sideAreaComponentName = undefined;
|
|
10382
10423
|
this.creator.sidebar.sideAreaComponentData = undefined;
|
|
10424
|
+
this.creator.sidebar.onPropertyChanged.clear();
|
|
10383
10425
|
this.creator.sidebar.header.reset();
|
|
10426
|
+
this.creator.expandCollapseManager.clear();
|
|
10384
10427
|
return true;
|
|
10385
10428
|
};
|
|
10386
10429
|
TabDesignerPlugin.prototype.onDesignerSurveyPropertyChanged = function (obj, propName) {
|
|
@@ -10690,22 +10733,22 @@ var TabDesignerViewModel = /** @class */ (function (_super) {
|
|
|
10690
10733
|
};
|
|
10691
10734
|
TabDesignerViewModel.prototype.initToolbar = function () {
|
|
10692
10735
|
var _this = this;
|
|
10693
|
-
this.
|
|
10736
|
+
this.surfaceToolbar = new survey_core__WEBPACK_IMPORTED_MODULE_1__.ActionContainer();
|
|
10694
10737
|
var action = function (action) { _this.creator.onSurfaceToolbarActionExecuted.fire(_this.creator, { action: action }); };
|
|
10695
10738
|
var defaultActionBarCss = {
|
|
10696
|
-
root: "sv-action-bar",
|
|
10739
|
+
root: "sv-action-bar svc-tab-designer__surface-toolbar",
|
|
10697
10740
|
defaultSizeMode: "",
|
|
10698
10741
|
smallSizeMode: "",
|
|
10699
|
-
item: "svc-page-
|
|
10742
|
+
item: "svc-page-navigator__button",
|
|
10700
10743
|
itemWithTitle: "",
|
|
10701
10744
|
itemAsIcon: "",
|
|
10702
10745
|
itemActive: "",
|
|
10703
10746
|
itemPressed: "",
|
|
10704
|
-
itemIcon: "svc-page-
|
|
10747
|
+
itemIcon: "svc-page-navigator__button-icon",
|
|
10705
10748
|
itemTitleWithIcon: "",
|
|
10706
10749
|
};
|
|
10707
|
-
this.
|
|
10708
|
-
this.
|
|
10750
|
+
this.surfaceToolbar.cssClasses = defaultActionBarCss;
|
|
10751
|
+
this.surfaceToolbar.setItems([{
|
|
10709
10752
|
id: "collapseAll",
|
|
10710
10753
|
locTooltipName: "ed.collapseAllTooltip",
|
|
10711
10754
|
iconName: "icon-collapseall-24x24",
|
|
@@ -15762,15 +15805,24 @@ var SurveyLogic = /** @class */ (function (_super) {
|
|
|
15762
15805
|
return types;
|
|
15763
15806
|
};
|
|
15764
15807
|
SurveyLogic.prototype.createLogicTypes = function () {
|
|
15808
|
+
var _this = this;
|
|
15765
15809
|
var res = [];
|
|
15810
|
+
SurveyLogic.types.forEach(function (logicType) {
|
|
15811
|
+
if (_this.isLogicTypeVisible(logicType)) {
|
|
15812
|
+
res.push(new _logic_types__WEBPACK_IMPORTED_MODULE_5__.SurveyLogicType(logicType, _this.survey, _this.options));
|
|
15813
|
+
}
|
|
15814
|
+
});
|
|
15815
|
+
return res;
|
|
15816
|
+
};
|
|
15817
|
+
SurveyLogic.prototype.isLogicTypeVisible = function (logicType) {
|
|
15766
15818
|
var visActions = SurveyLogic.visibleActions;
|
|
15767
|
-
|
|
15768
|
-
|
|
15769
|
-
|
|
15770
|
-
|
|
15771
|
-
|
|
15819
|
+
if (visActions.length > 0 && visActions.indexOf(logicType.name) < 0)
|
|
15820
|
+
return false;
|
|
15821
|
+
var prefix = "trigger_";
|
|
15822
|
+
if (logicType.name.indexOf(prefix) === 0) {
|
|
15823
|
+
return _creator_settings__WEBPACK_IMPORTED_MODULE_3__.settings.logic.invisibleTriggers.indexOf(logicType.name.substring(prefix.length)) < 0;
|
|
15772
15824
|
}
|
|
15773
|
-
return
|
|
15825
|
+
return true;
|
|
15774
15826
|
};
|
|
15775
15827
|
(0,tslib__WEBPACK_IMPORTED_MODULE_0__.__decorate)([
|
|
15776
15828
|
(0,survey_core__WEBPACK_IMPORTED_MODULE_1__.propertyArray)()
|
|
@@ -16240,17 +16292,35 @@ var TabTestPlugin = /** @class */ (function () {
|
|
|
16240
16292
|
function TabTestPlugin(creator) {
|
|
16241
16293
|
this.creator = creator;
|
|
16242
16294
|
this.simulatorTheme = survey_core__WEBPACK_IMPORTED_MODULE_1__.surveyCss[survey_core__WEBPACK_IMPORTED_MODULE_1__.defaultV2ThemeName];
|
|
16295
|
+
this._previewDevice = "";
|
|
16243
16296
|
creator.addPluginTab("test", this);
|
|
16244
16297
|
this.setPreviewTheme(this.creator.themeForPreview);
|
|
16245
16298
|
this.createActions().forEach(function (action) { return creator.toolbar.actions.push(action); });
|
|
16246
16299
|
}
|
|
16247
|
-
TabTestPlugin.prototype
|
|
16248
|
-
|
|
16249
|
-
|
|
16250
|
-
|
|
16300
|
+
Object.defineProperty(TabTestPlugin.prototype, "previewDevice", {
|
|
16301
|
+
get: function () {
|
|
16302
|
+
if (!!this.model) {
|
|
16303
|
+
this._previewDevice = this.model.simulator.device;
|
|
16304
|
+
}
|
|
16305
|
+
return this._previewDevice;
|
|
16306
|
+
},
|
|
16307
|
+
set: function (newValue) {
|
|
16308
|
+
this.setDevice(newValue);
|
|
16309
|
+
},
|
|
16310
|
+
enumerable: false,
|
|
16311
|
+
configurable: true
|
|
16312
|
+
});
|
|
16313
|
+
TabTestPlugin.prototype.setDevice = function (newValue) {
|
|
16314
|
+
this._previewDevice = newValue || "desktop";
|
|
16315
|
+
if (!!this.model) {
|
|
16316
|
+
this.model.simulator.device = newValue;
|
|
16317
|
+
this.model.simulator.resetZoomParameters();
|
|
16318
|
+
}
|
|
16319
|
+
var currentType = _simulator__WEBPACK_IMPORTED_MODULE_3__.simulatorDevices[this._previewDevice].deviceType;
|
|
16251
16320
|
this.orientationSelectorAction.enabled = currentType != "desktop";
|
|
16252
16321
|
this.deviceSelectorAction.iconName = "icon-device-" + currentType;
|
|
16253
16322
|
this.deviceSelectorAction.title = (0,_editorLocalization__WEBPACK_IMPORTED_MODULE_2__.getLocString)("pe.simulator");
|
|
16323
|
+
this.deviceSelectorAction.data.selectedItem = { id: this._previewDevice };
|
|
16254
16324
|
};
|
|
16255
16325
|
TabTestPlugin.prototype.setDefaultLanguageOption = function (opt) {
|
|
16256
16326
|
var _this = this;
|
|
@@ -16297,8 +16367,10 @@ var TabTestPlugin = /** @class */ (function () {
|
|
|
16297
16367
|
return new survey_core__WEBPACK_IMPORTED_MODULE_1__.ComputedUpdater(function () { return _this.creator.activeTab === "test"; });
|
|
16298
16368
|
};
|
|
16299
16369
|
TabTestPlugin.prototype.activate = function () {
|
|
16300
|
-
|
|
16301
|
-
|
|
16370
|
+
var tabModel = new _test__WEBPACK_IMPORTED_MODULE_4__.TestSurveyTabViewModel(this.creator, this.simulatorTheme);
|
|
16371
|
+
tabModel.simulator.device = this.previewDevice || this.creator.previewDevice || "desktop";
|
|
16372
|
+
tabModel.simulator.landscape = this.creator.previewOrientation != "portrait";
|
|
16373
|
+
this.model = tabModel;
|
|
16302
16374
|
this.update();
|
|
16303
16375
|
};
|
|
16304
16376
|
TabTestPlugin.prototype.update = function () {
|
|
@@ -16324,6 +16396,7 @@ var TabTestPlugin = /** @class */ (function () {
|
|
|
16324
16396
|
};
|
|
16325
16397
|
TabTestPlugin.prototype.deactivate = function () {
|
|
16326
16398
|
if (this.model) {
|
|
16399
|
+
this._previewDevice = this.model.simulator.device;
|
|
16327
16400
|
this.simulatorTheme = this.model.simulator.survey.css;
|
|
16328
16401
|
this.model.onSurveyCreatedCallback = undefined;
|
|
16329
16402
|
this.model.dispose();
|
|
@@ -18416,6 +18489,7 @@ var ThemeTabPlugin = /** @class */ (function () {
|
|
|
18416
18489
|
_this.updateVisibilityOfPropertyGridGroups();
|
|
18417
18490
|
}
|
|
18418
18491
|
};
|
|
18492
|
+
this.previewDevice = "desktop";
|
|
18419
18493
|
this.saveToFileHandler = _utils_utils__WEBPACK_IMPORTED_MODULE_5__.saveToFileHandler;
|
|
18420
18494
|
this.autoSaveTimerId = null;
|
|
18421
18495
|
/**
|
|
@@ -18657,6 +18731,7 @@ var ThemeTabPlugin = /** @class */ (function () {
|
|
|
18657
18731
|
ThemeTabPlugin.prototype.activate = function () {
|
|
18658
18732
|
var _this = this;
|
|
18659
18733
|
this.model = new _theme_builder__WEBPACK_IMPORTED_MODULE_3__.ThemeTabViewModel(this.creator, this.simulatorCssClasses);
|
|
18734
|
+
this.model.simulator.device = this.previewDevice;
|
|
18660
18735
|
this.themeModel.initialize(this.creator.theme, this.creator.survey);
|
|
18661
18736
|
this.creator.sidebar.hideSideBarVisibilityControlActions = this.showOneCategoryInPropertyGrid;
|
|
18662
18737
|
this.update();
|
|
@@ -18832,6 +18907,7 @@ var ThemeTabPlugin = /** @class */ (function () {
|
|
|
18832
18907
|
ThemeTabPlugin.prototype.deactivate = function () {
|
|
18833
18908
|
var _a;
|
|
18834
18909
|
if (this.model) {
|
|
18910
|
+
this.previewDevice = this.model.simulator.device;
|
|
18835
18911
|
this.simulatorCssClasses = this.model.survey.css;
|
|
18836
18912
|
this.model.onPropertyChanged.clear();
|
|
18837
18913
|
this.themeModel.onThemeSelected.clear();
|
|
@@ -20684,9 +20760,11 @@ var Translation = /** @class */ (function (_super) {
|
|
|
20684
20760
|
}
|
|
20685
20761
|
if (!this.root)
|
|
20686
20762
|
return;
|
|
20763
|
+
this.options.startUndoRedoTransaction("Delete strings for locale: " + locale);
|
|
20687
20764
|
this.root.deleteLocaleStrings(locale);
|
|
20688
20765
|
this.removeLocale(locale);
|
|
20689
20766
|
this.reset();
|
|
20767
|
+
this.options.stopUndoRedoTransaction();
|
|
20690
20768
|
};
|
|
20691
20769
|
Translation.prototype.createSettingsSurvey = function () {
|
|
20692
20770
|
var _this = this;
|
|
@@ -20726,6 +20804,7 @@ var Translation = /** @class */ (function (_super) {
|
|
|
20726
20804
|
iconName: "icon-language",
|
|
20727
20805
|
iconSize: "auto",
|
|
20728
20806
|
locTooltipName: "ed.translateUsigAI",
|
|
20807
|
+
visibleIndex: 5,
|
|
20729
20808
|
location: "end",
|
|
20730
20809
|
action: function () { return _this.showTranslationEditor(locale_1); }
|
|
20731
20810
|
}));
|
|
@@ -22049,7 +22128,9 @@ var CreatorEvent = /** @class */ (function (_super) {
|
|
|
22049
22128
|
var SurveyCreatorModel = /** @class */ (function (_super) {
|
|
22050
22129
|
(0,tslib__WEBPACK_IMPORTED_MODULE_0__.__extends)(SurveyCreatorModel, _super);
|
|
22051
22130
|
function SurveyCreatorModel(options, options2) {
|
|
22052
|
-
var _this =
|
|
22131
|
+
var _this = this;
|
|
22132
|
+
var _a;
|
|
22133
|
+
_this = _super.call(this) || this;
|
|
22053
22134
|
_this.options = options;
|
|
22054
22135
|
_this.startEditTitleOnQuestionAddedValue = true;
|
|
22055
22136
|
_this.isRTLValue = false;
|
|
@@ -22089,6 +22170,10 @@ var SurveyCreatorModel = /** @class */ (function (_super) {
|
|
|
22089
22170
|
* An event that is raised after a user has edited a text value on the design surface. This value may include HTML markup. You can handle the `onHtmlToMarkdown` event to convert the HTML markup to Markdown.
|
|
22090
22171
|
*/
|
|
22091
22172
|
_this.onHtmlToMarkdown = _this.addCreatorEvent();
|
|
22173
|
+
/*
|
|
22174
|
+
* An event that is raised when Survey Creator obtains the expand/collapse state of a survey element on the design surface. Handle this event to set a required state.
|
|
22175
|
+
*/
|
|
22176
|
+
_this.onElementGetExpandCollapseState = _this.addCreatorEvent();
|
|
22092
22177
|
/**
|
|
22093
22178
|
* An event that is raised when Survey Creator obtains permitted operations for a survey element. Use this event to disable user interactions with a question, panel, or page on the design surface.
|
|
22094
22179
|
*
|
|
@@ -22660,6 +22745,7 @@ var SurveyCreatorModel = /** @class */ (function (_super) {
|
|
|
22660
22745
|
_this.options = !!options2 ? options2 : {};
|
|
22661
22746
|
_survey_helper__WEBPACK_IMPORTED_MODULE_9__.SurveyHelper.warnText("Creator constructor has one parameter, as creator options, in V2.");
|
|
22662
22747
|
}
|
|
22748
|
+
_this.previewDevice = (_a = options.previewDevice) !== null && _a !== void 0 ? _a : "desktop";
|
|
22663
22749
|
_this.previewOrientation = options.previewOrientation;
|
|
22664
22750
|
_this.toolbarValue = new ToolbarActionContainer(_this);
|
|
22665
22751
|
_this.toolbarValue.locOwner = _this;
|
|
@@ -23390,7 +23476,6 @@ var SurveyCreatorModel = /** @class */ (function (_super) {
|
|
|
23390
23476
|
configurable: true
|
|
23391
23477
|
});
|
|
23392
23478
|
SurveyCreatorModel.prototype.startUndoRedoTransaction = function (name) {
|
|
23393
|
-
if (name === void 0) { name = ""; }
|
|
23394
23479
|
this.undoRedoController && this.undoRedoController.startTransaction(name);
|
|
23395
23480
|
};
|
|
23396
23481
|
SurveyCreatorModel.prototype.stopUndoRedoTransaction = function () {
|
|
@@ -23906,7 +23991,7 @@ var SurveyCreatorModel = /** @class */ (function (_super) {
|
|
|
23906
23991
|
_this.stopUndoRedoTransaction();
|
|
23907
23992
|
if (_this.collapsePagesOnDrag) {
|
|
23908
23993
|
(_a = _this.designerStateManager) === null || _a === void 0 ? void 0 : _a.release();
|
|
23909
|
-
_this.
|
|
23994
|
+
_this.restoreElementsState();
|
|
23910
23995
|
}
|
|
23911
23996
|
});
|
|
23912
23997
|
};
|
|
@@ -23917,24 +24002,45 @@ var SurveyCreatorModel = /** @class */ (function (_super) {
|
|
|
23917
24002
|
enumerable: false,
|
|
23918
24003
|
configurable: true
|
|
23919
24004
|
});
|
|
23920
|
-
SurveyCreatorModel.prototype.
|
|
23921
|
-
this.survey.pages
|
|
23922
|
-
|
|
23923
|
-
|
|
23924
|
-
|
|
24005
|
+
SurveyCreatorModel.prototype.getCollapsableElements = function () {
|
|
24006
|
+
return this.survey.pages;
|
|
24007
|
+
};
|
|
24008
|
+
SurveyCreatorModel.prototype.collapseAllElements = function () {
|
|
24009
|
+
var _this = this;
|
|
24010
|
+
this.getCollapsableElements().forEach(function (element) {
|
|
24011
|
+
var elementAdorner = _components_action_container_view_model__WEBPACK_IMPORTED_MODULE_27__.SurveyElementAdornerBase.GetAdorner(element);
|
|
24012
|
+
if (elementAdorner) {
|
|
24013
|
+
elementAdorner.collapsed = _this.getElementExpandCollapseState(element, "drag-start", true);
|
|
23925
24014
|
}
|
|
23926
24015
|
});
|
|
23927
24016
|
};
|
|
23928
|
-
SurveyCreatorModel.prototype.
|
|
23929
|
-
|
|
23930
|
-
|
|
23931
|
-
|
|
24017
|
+
SurveyCreatorModel.prototype.getElementExpandCollapseState = function (element, reason, defaultValue) {
|
|
24018
|
+
var options = {
|
|
24019
|
+
element: element,
|
|
24020
|
+
reason: reason,
|
|
24021
|
+
collapsed: defaultValue
|
|
24022
|
+
};
|
|
24023
|
+
this.onElementGetExpandCollapseState.fire(this, options);
|
|
24024
|
+
return options.collapsed;
|
|
24025
|
+
};
|
|
24026
|
+
SurveyCreatorModel.prototype.restoreState = function (element) {
|
|
24027
|
+
var state = this.getElementExpandCollapseState(element, "drag-end", undefined);
|
|
24028
|
+
if (state !== undefined) {
|
|
24029
|
+
_components_action_container_view_model__WEBPACK_IMPORTED_MODULE_27__.SurveyElementAdornerBase.GetAdorner(element).collapsed = state;
|
|
24030
|
+
}
|
|
24031
|
+
_components_action_container_view_model__WEBPACK_IMPORTED_MODULE_27__.SurveyElementAdornerBase.RestoreStateFor(element);
|
|
24032
|
+
};
|
|
24033
|
+
SurveyCreatorModel.prototype.restoreElementsState = function () {
|
|
24034
|
+
var _this = this;
|
|
24035
|
+
this.getCollapsableElements().forEach(function (element) {
|
|
24036
|
+
if (element["draggedFrom"] !== undefined) {
|
|
24037
|
+
var adorner = _components_action_container_view_model__WEBPACK_IMPORTED_MODULE_27__.SurveyElementAdornerBase.GetAdorner(element);
|
|
23932
24038
|
adorner === null || adorner === void 0 ? void 0 : adorner.blockAnimations();
|
|
23933
|
-
|
|
24039
|
+
_this.restoreState(element);
|
|
23934
24040
|
adorner === null || adorner === void 0 ? void 0 : adorner.releaseAnimations();
|
|
23935
24041
|
}
|
|
23936
24042
|
else {
|
|
23937
|
-
|
|
24043
|
+
_this.restoreState(element);
|
|
23938
24044
|
}
|
|
23939
24045
|
});
|
|
23940
24046
|
};
|
|
@@ -24220,6 +24326,7 @@ var SurveyCreatorModel = /** @class */ (function (_super) {
|
|
|
24220
24326
|
return options.displayName;
|
|
24221
24327
|
};
|
|
24222
24328
|
SurveyCreatorModel.prototype.createSurvey = function (json, reason, model, callback, area) {
|
|
24329
|
+
var _this = this;
|
|
24223
24330
|
var _a;
|
|
24224
24331
|
var survey = this.createSurveyCore(json, reason);
|
|
24225
24332
|
if (reason !== "designer" && reason !== "test" && reason !== "theme") {
|
|
@@ -24254,6 +24361,10 @@ var SurveyCreatorModel = /** @class */ (function (_super) {
|
|
|
24254
24361
|
if (reason === "test" || reason === "theme") {
|
|
24255
24362
|
this.onPreviewSurveyCreated.fire(this, { survey: survey });
|
|
24256
24363
|
}
|
|
24364
|
+
survey.onPopupVisibleChanged.add(function (_, options) {
|
|
24365
|
+
if (!options.popup.getAreaCallback)
|
|
24366
|
+
options.popup.getAreaCallback = function () { return _this.rootElement; };
|
|
24367
|
+
});
|
|
24257
24368
|
return survey;
|
|
24258
24369
|
};
|
|
24259
24370
|
SurveyCreatorModel.prototype.getSurveyInstanceCreatedArea = function (reason) {
|
|
@@ -25595,19 +25706,19 @@ var SurveyCreatorModel = /** @class */ (function (_super) {
|
|
|
25595
25706
|
title: this.getLocString("ed.addNewQuestion"),
|
|
25596
25707
|
}, {
|
|
25597
25708
|
items: [],
|
|
25598
|
-
onShow: function () {
|
|
25599
|
-
var listModel = newAction.popupModel.contentComponentData.model;
|
|
25600
|
-
listModel.setItems(getActions());
|
|
25601
|
-
setTimeout(function () {
|
|
25602
|
-
newAction.popupModel.recalculatePosition(true);
|
|
25603
|
-
}, 1);
|
|
25604
|
-
},
|
|
25605
25709
|
allowSelection: false,
|
|
25606
25710
|
cssClass: "svc-creator-popup",
|
|
25607
25711
|
verticalPosition: "bottom",
|
|
25608
25712
|
horizontalPosition: "center",
|
|
25609
25713
|
displayMode: this.isTouch ? "overlay" : "popup"
|
|
25610
25714
|
});
|
|
25715
|
+
newAction.popupModel.getTargetCallback = undefined;
|
|
25716
|
+
newAction.popupModel.onVisibilityChanged.add(function (_, opt) {
|
|
25717
|
+
if (opt.isVisible) {
|
|
25718
|
+
var listModel = newAction.popupModel.contentComponentData.model;
|
|
25719
|
+
listModel.setItems(getActions());
|
|
25720
|
+
}
|
|
25721
|
+
});
|
|
25611
25722
|
return newAction;
|
|
25612
25723
|
};
|
|
25613
25724
|
SurveyCreatorModel.prototype.getUpdatedPageAdornerFooterActions = function (pageAdorner, actions) {
|
|
@@ -26382,7 +26493,9 @@ var settings = {
|
|
|
26382
26493
|
checkbox: "allof",
|
|
26383
26494
|
tagbox: "allof"
|
|
26384
26495
|
},
|
|
26385
|
-
|
|
26496
|
+
includeComplexQuestions: false,
|
|
26497
|
+
visibleActions: new Array(),
|
|
26498
|
+
invisibleTriggers: new Array(),
|
|
26386
26499
|
logicItemTitleMaxChars: 50,
|
|
26387
26500
|
openBracket: "{",
|
|
26388
26501
|
closeBracket: "}",
|
|
@@ -26551,7 +26664,7 @@ var EmptySurveyCreatorOptions = /** @class */ (function () {
|
|
|
26551
26664
|
EmptySurveyCreatorOptions.prototype.onGetElementEditorTitleCallback = function (obj, title) {
|
|
26552
26665
|
return title;
|
|
26553
26666
|
};
|
|
26554
|
-
EmptySurveyCreatorOptions.prototype.startUndoRedoTransaction = function () { };
|
|
26667
|
+
EmptySurveyCreatorOptions.prototype.startUndoRedoTransaction = function (name) { };
|
|
26555
26668
|
EmptySurveyCreatorOptions.prototype.stopUndoRedoTransaction = function () { };
|
|
26556
26669
|
EmptySurveyCreatorOptions.prototype.createSurvey = function (json, reason, model, callback, area) {
|
|
26557
26670
|
var survey = new survey_core__WEBPACK_IMPORTED_MODULE_0__.SurveyModel(json);
|
|
@@ -27237,6 +27350,7 @@ var QuestionColorModel = /** @class */ (function (_super) {
|
|
|
27237
27350
|
popupModel.displayMode = survey_core__WEBPACK_IMPORTED_MODULE_1__.IsTouch ? "overlay" : "popup";
|
|
27238
27351
|
popupModel.setWidthByTarget = true;
|
|
27239
27352
|
popupModel.positionMode = "fixed";
|
|
27353
|
+
popupModel.getTargetCallback = undefined;
|
|
27240
27354
|
listModel.isItemSelected = function (itemValue) { return itemValue.value == _this.value; };
|
|
27241
27355
|
return action;
|
|
27242
27356
|
};
|
|
@@ -28506,6 +28620,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
28506
28620
|
var ExpandCollapseManager = /** @class */ (function () {
|
|
28507
28621
|
function ExpandCollapseManager(creator) {
|
|
28508
28622
|
var _this = this;
|
|
28623
|
+
this.creator = creator;
|
|
28509
28624
|
this.adorners = [];
|
|
28510
28625
|
creator.onSurfaceToolbarActionExecuted.add(function (_, options) {
|
|
28511
28626
|
var isCollapseAction = options.action.id == "collapseAll";
|
|
@@ -28518,7 +28633,8 @@ var ExpandCollapseManager = /** @class */ (function () {
|
|
|
28518
28633
|
ExpandCollapseManager.prototype.updateCollapsed = function (isCollapsed) {
|
|
28519
28634
|
for (var i = this.adorners.length - 1; i >= 0; i--) {
|
|
28520
28635
|
if (this.adorners[i].allowExpandCollapse) {
|
|
28521
|
-
|
|
28636
|
+
var reason = isCollapsed ? "collapse-all" : "expand-all";
|
|
28637
|
+
this.adorners[i].collapsed = this.creator.getElementExpandCollapseState(this.adorners[i].element, reason, isCollapsed);
|
|
28522
28638
|
}
|
|
28523
28639
|
}
|
|
28524
28640
|
};
|
|
@@ -28528,6 +28644,9 @@ var ExpandCollapseManager = /** @class */ (function () {
|
|
|
28528
28644
|
ExpandCollapseManager.prototype.remove = function (adorner) {
|
|
28529
28645
|
this.adorners.splice(this.adorners.indexOf(adorner), 1);
|
|
28530
28646
|
};
|
|
28647
|
+
ExpandCollapseManager.prototype.clear = function () {
|
|
28648
|
+
this.adorners.length = 0;
|
|
28649
|
+
};
|
|
28531
28650
|
return ExpandCollapseManager;
|
|
28532
28651
|
}());
|
|
28533
28652
|
|
|
@@ -32606,6 +32725,7 @@ var propertyGridCss = {
|
|
|
32606
32725
|
itemSelected: "spg-button-group__item--selected",
|
|
32607
32726
|
itemDisabled: "spg-button-group__item--disabled",
|
|
32608
32727
|
itemControl: "sv-visuallyhidden",
|
|
32728
|
+
disabled: "spg-question--disabled"
|
|
32609
32729
|
},
|
|
32610
32730
|
imagepicker: {
|
|
32611
32731
|
root: "spg-imagepicker",
|
|
@@ -32662,7 +32782,7 @@ var propertyGridCss = {
|
|
|
32662
32782
|
detailButtonExpanded: "spg-table__cell--detail-button--expanded",
|
|
32663
32783
|
detailIcon: "spg-detail-panel__icon",
|
|
32664
32784
|
detailIconExpanded: "spg-detail-panel__icon--expanded",
|
|
32665
|
-
detailPanelCell: "spg-table__cell--detail-panel",
|
|
32785
|
+
detailPanelCell: "spg-table__cell spg-table__cell--detail-panel",
|
|
32666
32786
|
actionsCell: "spg-table__cell spg-table__cell--actions",
|
|
32667
32787
|
buttonAdd: "spg-matrixdynamic__add-btn spg-action-button spg-action-button--large",
|
|
32668
32788
|
buttonRemove: "spg-matrixdynamic__remove-btn",
|
|
@@ -33620,6 +33740,9 @@ var ConditionEditor = /** @class */ (function (_super) {
|
|
|
33620
33740
|
var condQuestion = _this.getConditionQuestion(questionName);
|
|
33621
33741
|
opt.choices.forEach(function (choice, index) {
|
|
33622
33742
|
var isOperatorEnabled = ConditionEditor.isOperatorEnabled(qType, _creator_settings__WEBPACK_IMPORTED_MODULE_2__.settings.operators[choice.value]);
|
|
33743
|
+
if (condQuestion === null || condQuestion === void 0 ? void 0 : condQuestion.isContainer) {
|
|
33744
|
+
isOperatorEnabled = choice.value === "empty" || choice.value === "notempty";
|
|
33745
|
+
}
|
|
33623
33746
|
isOperatorEnabled = _this.options.isConditionOperatorEnabled(questionName, condQuestion, choice.value, isOperatorEnabled);
|
|
33624
33747
|
choice.setIsEnabled(isOperatorEnabled);
|
|
33625
33748
|
choice.setIsVisible(isOperatorEnabled);
|
|
@@ -33762,6 +33885,9 @@ var ConditionEditor = /** @class */ (function (_super) {
|
|
|
33762
33885
|
if (contextObject == question)
|
|
33763
33886
|
continue;
|
|
33764
33887
|
var context = contextObject ? contextObject : (!this.context || this.context === question);
|
|
33888
|
+
if (_creator_settings__WEBPACK_IMPORTED_MODULE_2__.settings.logic.includeComplexQuestions && question.isContainer) {
|
|
33889
|
+
res.push(question);
|
|
33890
|
+
}
|
|
33765
33891
|
question.addConditionObjectsByContext(res, context);
|
|
33766
33892
|
}
|
|
33767
33893
|
}
|
|
@@ -36084,7 +36210,7 @@ var PropertyGridEditorUndefinedBoolean = /** @class */ (function (_super) {
|
|
|
36084
36210
|
return res;
|
|
36085
36211
|
};
|
|
36086
36212
|
PropertyGridEditorUndefinedBoolean.prototype.onCreated = function (obj, question, prop, options, propGridDefinition) {
|
|
36087
|
-
question.valueFromDataCallback = function (val) { return val === undefined ? "auto" : val.toString(); };
|
|
36213
|
+
question.valueFromDataCallback = function (val) { return val === undefined || val === null ? "auto" : val.toString(); };
|
|
36088
36214
|
question.valueToDataCallback = function (val) { return val === "auto" ? undefined : val === "true"; };
|
|
36089
36215
|
};
|
|
36090
36216
|
PropertyGridEditorUndefinedBoolean.prototype.onSetup = function (obj, question, prop, options) {
|
|
@@ -36867,11 +36993,13 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
36867
36993
|
/* harmony import */ var survey_core__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(survey_core__WEBPACK_IMPORTED_MODULE_1__);
|
|
36868
36994
|
/* harmony import */ var _editorLocalization__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../editorLocalization */ "./src/editorLocalization.ts");
|
|
36869
36995
|
/* harmony import */ var _question_editor_properties__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../question-editor/properties */ "./src/question-editor/properties.ts");
|
|
36870
|
-
/* harmony import */ var
|
|
36871
|
-
/* harmony import */ var
|
|
36872
|
-
/* harmony import */ var
|
|
36873
|
-
/* harmony import */ var
|
|
36874
|
-
/* harmony import */ var
|
|
36996
|
+
/* harmony import */ var _creator_settings__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../creator-settings */ "./src/creator-settings.ts");
|
|
36997
|
+
/* harmony import */ var _utils_utils__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../utils/utils */ "./src/utils/utils.ts");
|
|
36998
|
+
/* harmony import */ var _fast_entry__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./fast-entry */ "./src/property-grid/fast-entry.ts");
|
|
36999
|
+
/* harmony import */ var _index__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./index */ "./src/property-grid/index.ts");
|
|
37000
|
+
/* harmony import */ var _utils_actions__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../utils/actions */ "./src/utils/actions.ts");
|
|
37001
|
+
/* harmony import */ var _components_question_rating__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../components/question-rating */ "./src/components/question-rating.ts");
|
|
37002
|
+
|
|
36875
37003
|
|
|
36876
37004
|
|
|
36877
37005
|
|
|
@@ -36901,7 +37029,7 @@ var PropertyGridEditorMatrix = /** @class */ (function (_super) {
|
|
|
36901
37029
|
arr.push(objs[i][keyPropName]);
|
|
36902
37030
|
}
|
|
36903
37031
|
}
|
|
36904
|
-
return (0,
|
|
37032
|
+
return (0,_utils_utils__WEBPACK_IMPORTED_MODULE_5__.getNextValue)(baseName, arr);
|
|
36905
37033
|
};
|
|
36906
37034
|
PropertyGridEditorMatrix.prototype.onCreated = function (obj, question, prop, options, propGridDefinition) {
|
|
36907
37035
|
var _this = this;
|
|
@@ -36968,7 +37096,7 @@ var PropertyGridEditorMatrix = /** @class */ (function (_super) {
|
|
|
36968
37096
|
});
|
|
36969
37097
|
}
|
|
36970
37098
|
var showDetailAction = actions.filter(function (item) { return item.id === "show-detail"; })[0];
|
|
36971
|
-
(0,
|
|
37099
|
+
(0,_utils_actions__WEBPACK_IMPORTED_MODULE_8__.updateMatrixRemoveAction)(question, actions, row);
|
|
36972
37100
|
if (!!showDetailAction) {
|
|
36973
37101
|
showDetailAction.component = "sv-action-bar-item";
|
|
36974
37102
|
showDetailAction.iconName = this.getShowDetailActionIconName(row);
|
|
@@ -36986,7 +37114,7 @@ var PropertyGridEditorMatrix = /** @class */ (function (_super) {
|
|
|
36986
37114
|
showDetailAction.ariaExpanded = row.isDetailPanelShowing;
|
|
36987
37115
|
};
|
|
36988
37116
|
}
|
|
36989
|
-
(0,
|
|
37117
|
+
(0,_utils_actions__WEBPACK_IMPORTED_MODULE_8__.updateMatixActionsClasses)(actions);
|
|
36990
37118
|
};
|
|
36991
37119
|
PropertyGridEditorMatrix.prototype.getShowDetailActionIconName = function (row) {
|
|
36992
37120
|
return row.isDetailPanelShowing ? "icon-editing-finish" : "icon-edit";
|
|
@@ -37029,7 +37157,7 @@ var PropertyGridEditorMatrix = /** @class */ (function (_super) {
|
|
|
37029
37157
|
}
|
|
37030
37158
|
var arr = obj[prop.name];
|
|
37031
37159
|
if (survey_core__WEBPACK_IMPORTED_MODULE_1__.Serializer.isDescendantOf(item.getType(), "itemvalue")) {
|
|
37032
|
-
item.text = (0,
|
|
37160
|
+
item.text = (0,_utils_utils__WEBPACK_IMPORTED_MODULE_5__.getNextItemText)(arr);
|
|
37033
37161
|
}
|
|
37034
37162
|
arr.push(item);
|
|
37035
37163
|
if (arr != matrix.value) {
|
|
@@ -37119,7 +37247,7 @@ var PropertyGridEditorMatrix = /** @class */ (function (_super) {
|
|
|
37119
37247
|
};
|
|
37120
37248
|
var q = matrix;
|
|
37121
37249
|
matrix.onCreateDetailPanelCallback = function (row, panel) {
|
|
37122
|
-
new
|
|
37250
|
+
new _index__WEBPACK_IMPORTED_MODULE_7__.PropertyJSONGenerator(row.editingObj, q.creatorOptions, q.obj, q.property, propGridDefinition).setupObjPanel(panel, true);
|
|
37123
37251
|
};
|
|
37124
37252
|
matrix.allowRowsDragAndDrop = this.getAllowRowDragDrop(prop) && !matrix.isReadOnly;
|
|
37125
37253
|
if (!!q.creatorOptions) {
|
|
@@ -37140,7 +37268,7 @@ var PropertyGridEditorMatrix = /** @class */ (function (_super) {
|
|
|
37140
37268
|
if (!newObj)
|
|
37141
37269
|
return true;
|
|
37142
37270
|
var panel = new survey_core__WEBPACK_IMPORTED_MODULE_1__.PanelModel("");
|
|
37143
|
-
new
|
|
37271
|
+
new _index__WEBPACK_IMPORTED_MODULE_7__.PropertyJSONGenerator(newObj, matrix.creatorOptions, matrix.obj, prop, propGridDefinition).setupObjPanel(panel, true);
|
|
37144
37272
|
return panel.elements.length > 0;
|
|
37145
37273
|
};
|
|
37146
37274
|
PropertyGridEditorMatrix.prototype.getJSON = function (obj, prop, options, propGridDefinition) {
|
|
@@ -37210,7 +37338,7 @@ var PropertyGridEditorMatrix = /** @class */ (function (_super) {
|
|
|
37210
37338
|
return "";
|
|
37211
37339
|
};
|
|
37212
37340
|
PropertyGridEditorMatrix.prototype.getColumnsJSON = function (obj, prop, propNames, options, propGridDefinition) {
|
|
37213
|
-
var res = new
|
|
37341
|
+
var res = new _index__WEBPACK_IMPORTED_MODULE_7__.PropertyJSONGenerator(obj, options, undefined, undefined, propGridDefinition).createColumnsJSON(this.getClassNameByProp(prop), this.filterPropertyNames(propNames, options));
|
|
37214
37342
|
for (var i = 0; i < res.length; i++) {
|
|
37215
37343
|
if (res[i].cellType == "comment") {
|
|
37216
37344
|
res[i].cellType = "text";
|
|
@@ -37249,7 +37377,7 @@ var PropertyGridEditorMatrix = /** @class */ (function (_super) {
|
|
|
37249
37377
|
matrix.allowBatchEdit = evtOptions.allowBatchEdit;
|
|
37250
37378
|
};
|
|
37251
37379
|
return PropertyGridEditorMatrix;
|
|
37252
|
-
}(
|
|
37380
|
+
}(_index__WEBPACK_IMPORTED_MODULE_7__.PropertyGridEditor));
|
|
37253
37381
|
|
|
37254
37382
|
var PropertyGridEditorMatrixItemValues = /** @class */ (function (_super) {
|
|
37255
37383
|
(0,tslib__WEBPACK_IMPORTED_MODULE_0__.__extends)(PropertyGridEditorMatrixItemValues, _super);
|
|
@@ -37281,7 +37409,7 @@ var PropertyGridEditorMatrixItemValues = /** @class */ (function (_super) {
|
|
|
37281
37409
|
PropertyGridEditorMatrixItemValues.prototype.getAllowRowDragDrop = function (prop) { return true; };
|
|
37282
37410
|
PropertyGridEditorMatrixItemValues.prototype.createPropertyEditorSetup = function (obj, prop, question, options) {
|
|
37283
37411
|
var names = question.columns.filter(function (c) { return !c.readOnly; }).map(function (c) { return c.name; });
|
|
37284
|
-
return new
|
|
37412
|
+
return new _fast_entry__WEBPACK_IMPORTED_MODULE_6__.FastEntryEditor(obj[prop.name], options, prop.className, names);
|
|
37285
37413
|
};
|
|
37286
37414
|
PropertyGridEditorMatrixItemValues.prototype.canClearPropertyValue = function (obj, prop, question, options) {
|
|
37287
37415
|
return question.allowRemoveAllItems !== false;
|
|
@@ -37380,14 +37508,14 @@ var PropertyGridEditorMatrixRateValues = /** @class */ (function (_super) {
|
|
|
37380
37508
|
return (prop.isArray && survey_core__WEBPACK_IMPORTED_MODULE_1__.Serializer.isDescendantOf(prop.className, "itemvalue") && prop.name == "rateValues");
|
|
37381
37509
|
};
|
|
37382
37510
|
PropertyGridEditorMatrixRateValues.prototype.updateAllowAddRemove = function (matrixQuestion, obj) {
|
|
37383
|
-
matrixQuestion.allowRemoveRows =
|
|
37384
|
-
matrixQuestion.allowAddRows =
|
|
37511
|
+
matrixQuestion.allowRemoveRows = _components_question_rating__WEBPACK_IMPORTED_MODULE_9__.QuestionRatingAdornerViewModel.allowRemoveForElement(obj);
|
|
37512
|
+
matrixQuestion.allowAddRows = _components_question_rating__WEBPACK_IMPORTED_MODULE_9__.QuestionRatingAdornerViewModel.allowAddForElement(obj, matrixQuestion.maxRowCount);
|
|
37385
37513
|
};
|
|
37386
37514
|
PropertyGridEditorMatrixRateValues.prototype.onCreated = function (obj, question, prop, options, propGridDefinition) {
|
|
37387
37515
|
var _this = this;
|
|
37388
37516
|
_super.prototype.onCreated.call(this, obj, question, prop, options, propGridDefinition);
|
|
37389
37517
|
var matrixQuestion = question;
|
|
37390
|
-
var ratingQuestion = (0,
|
|
37518
|
+
var ratingQuestion = (0,_utils_utils__WEBPACK_IMPORTED_MODULE_5__.getQuestionFromObj)(obj);
|
|
37391
37519
|
this.updateAllowAddRemove(matrixQuestion, ratingQuestion);
|
|
37392
37520
|
obj.onPropertyChanged.add(function (sender, options) {
|
|
37393
37521
|
if (options.name == "rateCount" || options.name == "rateDisplayMode") {
|
|
@@ -37584,7 +37712,7 @@ var PropertyGridEditorMatrixMutlipleTextItems = /** @class */ (function (_super)
|
|
|
37584
37712
|
question.columns.forEach(function (col) {
|
|
37585
37713
|
names.push(col.name);
|
|
37586
37714
|
});
|
|
37587
|
-
return new
|
|
37715
|
+
return new _fast_entry__WEBPACK_IMPORTED_MODULE_6__.FastEntryEditorBase(obj[prop.name], options, prop.className, names);
|
|
37588
37716
|
};
|
|
37589
37717
|
PropertyGridEditorMatrixMutlipleTextItems.prototype.onMatrixCellCreated = function (obj, options) {
|
|
37590
37718
|
_super.prototype.onMatrixCellCreated.call(this, obj, options);
|
|
@@ -37704,7 +37832,13 @@ var PropertyGridEditorMatrixTriggers = /** @class */ (function (_super) {
|
|
|
37704
37832
|
return _super !== null && _super.apply(this, arguments) || this;
|
|
37705
37833
|
}
|
|
37706
37834
|
PropertyGridEditorMatrixTriggers.prototype.getAvailableTriggers = function () {
|
|
37707
|
-
|
|
37835
|
+
var _this = this;
|
|
37836
|
+
return survey_core__WEBPACK_IMPORTED_MODULE_1__.Serializer.getChildrenClasses("surveytrigger", true).filter(function (classObj) { return _this.isTriggerVisible(classObj.name); });
|
|
37837
|
+
};
|
|
37838
|
+
PropertyGridEditorMatrixTriggers.prototype.isTriggerVisible = function (name) {
|
|
37839
|
+
var postfix = "trigger";
|
|
37840
|
+
var pureName = name.substring(0, name.length - postfix.length);
|
|
37841
|
+
return name !== "visibletrigger" && _creator_settings__WEBPACK_IMPORTED_MODULE_4__.settings.logic.invisibleTriggers.indexOf(pureName) < 0;
|
|
37708
37842
|
};
|
|
37709
37843
|
PropertyGridEditorMatrixTriggers.prototype.fit = function (prop) {
|
|
37710
37844
|
return prop.type == "triggers";
|
|
@@ -37730,17 +37864,17 @@ var PropertyGridEditorMatrixTriggers = /** @class */ (function (_super) {
|
|
|
37730
37864
|
return PropertyGridEditorMatrixTriggers;
|
|
37731
37865
|
}(PropertyGridEditorMatrixMultipleTypes));
|
|
37732
37866
|
|
|
37733
|
-
|
|
37734
|
-
|
|
37735
|
-
|
|
37736
|
-
|
|
37737
|
-
|
|
37738
|
-
|
|
37739
|
-
|
|
37740
|
-
|
|
37741
|
-
|
|
37742
|
-
|
|
37743
|
-
|
|
37867
|
+
_index__WEBPACK_IMPORTED_MODULE_7__.PropertyGridEditorCollection.register(new PropertyGridEditorMatrixItemValues());
|
|
37868
|
+
_index__WEBPACK_IMPORTED_MODULE_7__.PropertyGridEditorCollection.register(new PropertyGridEditorMatrixRateValues());
|
|
37869
|
+
_index__WEBPACK_IMPORTED_MODULE_7__.PropertyGridEditorCollection.register(new PropertyGridEditorMatrixColumns());
|
|
37870
|
+
_index__WEBPACK_IMPORTED_MODULE_7__.PropertyGridEditorCollection.register(new PropertyGridEditorMatrixPages());
|
|
37871
|
+
_index__WEBPACK_IMPORTED_MODULE_7__.PropertyGridEditorCollection.register(new PropertyGridEditorMatrixCalculatedValues());
|
|
37872
|
+
_index__WEBPACK_IMPORTED_MODULE_7__.PropertyGridEditorCollection.register(new PropertyGridEditorMatrixHtmlConditions());
|
|
37873
|
+
_index__WEBPACK_IMPORTED_MODULE_7__.PropertyGridEditorCollection.register(new PropertyGridEditorMatrixUrlConditions());
|
|
37874
|
+
_index__WEBPACK_IMPORTED_MODULE_7__.PropertyGridEditorCollection.register(new PropertyGridEditorMatrixMutlipleTextItems());
|
|
37875
|
+
_index__WEBPACK_IMPORTED_MODULE_7__.PropertyGridEditorCollection.register(new PropertyGridEditorMatrixValidators());
|
|
37876
|
+
_index__WEBPACK_IMPORTED_MODULE_7__.PropertyGridEditorCollection.register(new PropertyGridEditorMatrixTriggers());
|
|
37877
|
+
_index__WEBPACK_IMPORTED_MODULE_7__.PropertyGridEditorCollection.register({
|
|
37744
37878
|
fit: function (prop) {
|
|
37745
37879
|
if (prop.name === "icon") {
|
|
37746
37880
|
return prop.classInfo.name === "itemvalue";
|
|
@@ -37753,7 +37887,7 @@ _index__WEBPACK_IMPORTED_MODULE_6__.PropertyGridEditorCollection.register({
|
|
|
37753
37887
|
};
|
|
37754
37888
|
}
|
|
37755
37889
|
});
|
|
37756
|
-
|
|
37890
|
+
_index__WEBPACK_IMPORTED_MODULE_7__.PropertyGridEditorCollection.register(new PropertyGridEditorMatrixLayoutColumns());
|
|
37757
37891
|
|
|
37758
37892
|
|
|
37759
37893
|
/***/ }),
|
|
@@ -38099,6 +38233,7 @@ var PropertyGridViewModel = /** @class */ (function (_super) {
|
|
|
38099
38233
|
});
|
|
38100
38234
|
this.selectorPopupModel.cssClass += " svc-object-selector";
|
|
38101
38235
|
this.selectorPopupModel.displayMode = this.creator.isTouch ? "overlay" : "popup";
|
|
38236
|
+
this.selectorPopupModel.getTargetCallback = survey_core__WEBPACK_IMPORTED_MODULE_1__.getActionDropdownButtonTarget;
|
|
38102
38237
|
this.selectorPopupModel.registerPropertyChangedHandlers(["isVisible"], function () {
|
|
38103
38238
|
if (!_this.selectorPopupModel.isVisible) {
|
|
38104
38239
|
_this.objectSelectionAction.pressed = false;
|
|
@@ -38535,7 +38670,10 @@ var DefaultValueEditor = /** @class */ (function (_super) {
|
|
|
38535
38670
|
_this.editQuestion = editQuestion;
|
|
38536
38671
|
_this.propertyName = propertyName;
|
|
38537
38672
|
_this.setupSurvey();
|
|
38538
|
-
|
|
38673
|
+
var oldValue = _this.getQuestionValue();
|
|
38674
|
+
if (oldValue !== undefined) {
|
|
38675
|
+
_this.question.value = oldValue;
|
|
38676
|
+
}
|
|
38539
38677
|
return _this;
|
|
38540
38678
|
}
|
|
38541
38679
|
Object.defineProperty(DefaultValueEditor.prototype, "question", {
|
|
@@ -41611,6 +41749,7 @@ var TabbedMenuContainer = /** @class */ (function (_super) {
|
|
|
41611
41749
|
var _this = _super.call(this) || this;
|
|
41612
41750
|
_this.creator = creator;
|
|
41613
41751
|
_this.dotsItem.popupModel.horizontalPosition = "center";
|
|
41752
|
+
_this.dotsItem.popupModel.cssClass += " svc-tabbed-menu-item__popup svc-creator-popup";
|
|
41614
41753
|
_this.minVisibleItemsCount = 1;
|
|
41615
41754
|
return _this;
|
|
41616
41755
|
}
|
|
@@ -42269,6 +42408,7 @@ var QuestionToolboxItem = /** @class */ (function (_super) {
|
|
|
42269
42408
|
if (!items || items.length < 1)
|
|
42270
42409
|
return;
|
|
42271
42410
|
this.setSubItems({ items: items });
|
|
42411
|
+
this.popupModel.getAreaCallback = this.getArea;
|
|
42272
42412
|
this.component = QuestionToolbox.defaultItemGroupComponent;
|
|
42273
42413
|
};
|
|
42274
42414
|
/**
|
|
@@ -42521,7 +42661,7 @@ var QuestionToolbox = /** @class */ (function (_super) {
|
|
|
42521
42661
|
_this.dragOrClickHelper.onPointerDown(pointerDownEvent, item);
|
|
42522
42662
|
}
|
|
42523
42663
|
};
|
|
42524
|
-
this.dotsItem.popupModel.cssClass
|
|
42664
|
+
this.dotsItem.popupModel.cssClass += " svc-toolbox-popup svc-creator-popup";
|
|
42525
42665
|
};
|
|
42526
42666
|
QuestionToolbox.prototype.getDefaultQuestionCategories = function () {
|
|
42527
42667
|
var _this = this;
|
|
@@ -45230,7 +45370,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
45230
45370
|
/* harmony import */ var survey_core__WEBPACK_IMPORTED_MODULE_93__ = __webpack_require__(/*! survey-core */ "survey-core");
|
|
45231
45371
|
/* harmony import */ var survey_core__WEBPACK_IMPORTED_MODULE_93___default = /*#__PURE__*/__webpack_require__.n(survey_core__WEBPACK_IMPORTED_MODULE_93__);
|
|
45232
45372
|
var Version;
|
|
45233
|
-
Version = "".concat("1.12.
|
|
45373
|
+
Version = "".concat("1.12.11");
|
|
45234
45374
|
//should be loaded before other styles for easier override
|
|
45235
45375
|
__webpack_require__(/*! ../utils/context-button.scss */ "./src/utils/context-button.scss");
|
|
45236
45376
|
|
|
@@ -45348,7 +45488,7 @@ __webpack_require__(/*! ../utils/layout.scss */ "./src/utils/layout.scss");
|
|
|
45348
45488
|
__webpack_require__(/*! ../custom-questions/boolean-switch.scss */ "./src/custom-questions/boolean-switch.scss");
|
|
45349
45489
|
|
|
45350
45490
|
survey_core__WEBPACK_IMPORTED_MODULE_93__.settings.supportCreatorV2 = true;
|
|
45351
|
-
(0,survey_core__WEBPACK_IMPORTED_MODULE_93__.checkLibraryVersion)("".concat("1.12.
|
|
45491
|
+
(0,survey_core__WEBPACK_IMPORTED_MODULE_93__.checkLibraryVersion)("".concat("1.12.11"), "survey-creator-core");
|
|
45352
45492
|
|
|
45353
45493
|
})();
|
|
45354
45494
|
|