survey-creator-core 2.3.10 → 2.3.12
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/i18n/arabic.mjs +1 -1
- package/fesm/i18n/bulgarian.mjs +1 -1
- package/fesm/i18n/burmese.mjs +1 -1
- package/fesm/i18n/croatian.mjs +1 -1
- package/fesm/i18n/czech.mjs +1 -1
- package/fesm/i18n/danish.mjs +1 -1
- package/fesm/i18n/dutch.mjs +1 -1
- package/fesm/i18n/english.mjs +1 -1
- package/fesm/i18n/finnish.mjs +1 -1
- package/fesm/i18n/french.mjs +1 -1
- package/fesm/i18n/german.mjs +1 -1
- package/fesm/i18n/greek.mjs +1 -1
- package/fesm/i18n/haitian-creole.mjs +1 -1
- package/fesm/i18n/hebrew.mjs +1 -1
- package/fesm/i18n/hungarian.mjs +1 -1
- package/fesm/i18n/index.mjs +1 -1
- package/fesm/i18n/indonesian.mjs +1 -1
- package/fesm/i18n/italian.mjs +1 -1
- package/fesm/i18n/japanese.mjs +1 -1
- package/fesm/i18n/korean.mjs +1 -1
- package/fesm/i18n/malay.mjs +1 -1
- package/fesm/i18n/mongolian.mjs +1 -1
- package/fesm/i18n/norwegian.mjs +1 -1
- package/fesm/i18n/persian.mjs +1 -1
- package/fesm/i18n/polish.mjs +1 -1
- package/fesm/i18n/portuguese.mjs +1 -1
- package/fesm/i18n/romanian.mjs +1 -1
- package/fesm/i18n/russian.mjs +1 -1
- package/fesm/i18n/simplified-chinese.mjs +1 -1
- package/fesm/i18n/slovak.mjs +1 -1
- package/fesm/i18n/slovenian.mjs +1 -1
- package/fesm/i18n/spanish.mjs +1 -1
- package/fesm/i18n/swedish.mjs +1 -1
- package/fesm/i18n/tajik.mjs +1 -1
- package/fesm/i18n/thai.mjs +1 -1
- package/fesm/i18n/traditional-chinese.mjs +1 -1
- package/fesm/i18n/turkish.mjs +1 -1
- package/fesm/survey-creator-core.i18n.mjs +1 -1
- package/fesm/survey-creator-core.mjs +215 -37
- package/fesm/survey-creator-core.mjs.map +1 -1
- package/fesm/themes/index.mjs +1 -1
- 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/burmese.js +1 -1
- package/i18n/burmese.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/greek.js +1 -1
- package/i18n/greek.min.js.LICENSE.txt +1 -1
- package/i18n/haitian-creole.js +1 -1
- package/i18n/haitian-creole.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/slovenian.js +1 -1
- package/i18n/slovenian.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 +9 -2
- package/survey-creator-core.fontless.css +8 -1
- 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.LICENSE.txt +1 -1
- package/survey-creator-core.js +233 -34
- package/survey-creator-core.js.map +1 -1
- package/survey-creator-core.min.css +4 -4
- package/survey-creator-core.min.js +1 -1
- package/survey-creator-core.min.js.LICENSE.txt +1 -1
- package/themes/default-contrast.js +1 -1
- package/themes/default-contrast.min.js.LICENSE.txt +1 -1
- package/themes/default-dark.js +1 -1
- package/themes/default-dark.min.js.LICENSE.txt +1 -1
- package/themes/index.js +1 -1
- package/themes/index.min.js.LICENSE.txt +1 -1
- package/themes/sc2020.js +1 -1
- package/themes/sc2020.min.js.LICENSE.txt +1 -1
- package/typings/components/item-value.d.ts +12 -1
- package/typings/creator-base.d.ts +17 -1
- package/typings/creator-options.d.ts +12 -0
- package/typings/creator-settings.d.ts +2 -0
- package/typings/dragdrop-survey-elements.d.ts +0 -1
- package/typings/expand-collapse-manager.d.ts +13 -1
- package/typings/survey-helper.d.ts +4 -1
package/survey-creator-core.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* SurveyJS Creator v2.3.
|
|
2
|
+
* SurveyJS Creator v2.3.12
|
|
3
3
|
* (c) 2015-2025 Devsoft Baltic OÜ - http://surveyjs.io/
|
|
4
4
|
* Github: https://github.com/surveyjs/survey-creator
|
|
5
5
|
* License: https://surveyjs.io/Licenses#SurveyCreator
|
|
@@ -601,6 +601,8 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
601
601
|
/* harmony import */ var _editorLocalization__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../editorLocalization */ "./src/editorLocalization.ts");
|
|
602
602
|
/* harmony import */ var _utils_creator_utils__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../utils/creator-utils */ "./src/utils/creator-utils.ts");
|
|
603
603
|
/* harmony import */ var _string_editor__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./string-editor */ "./src/components/string-editor.ts");
|
|
604
|
+
/* harmony import */ var _survey_helper__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../survey-helper */ "./src/survey-helper.ts");
|
|
605
|
+
|
|
604
606
|
|
|
605
607
|
|
|
606
608
|
|
|
@@ -638,6 +640,11 @@ var ItemValueWrapperViewModel = /** @class */ (function (_super) {
|
|
|
638
640
|
_this.isDragDropMoveUp = false;
|
|
639
641
|
}
|
|
640
642
|
};
|
|
643
|
+
_this.canShowPanelValue = undefined;
|
|
644
|
+
_this.onExpandPanelAtDesign = function () {
|
|
645
|
+
_this.showPanel = true;
|
|
646
|
+
};
|
|
647
|
+
_this.item.onExpandPanelAtDesign.add(_this.onExpandPanelAtDesign);
|
|
641
648
|
_this.updateIsNew(question, item);
|
|
642
649
|
for (var key in specificChoices) {
|
|
643
650
|
_this.registerOnPropertyChanged(key, specificChoices[key]);
|
|
@@ -665,6 +672,7 @@ var ItemValueWrapperViewModel = /** @class */ (function (_super) {
|
|
|
665
672
|
if (!_this.creator.isCanModifyProperty(question, "choices")) {
|
|
666
673
|
_this.canTouchItems = false;
|
|
667
674
|
}
|
|
675
|
+
_this.setupShowPanel();
|
|
668
676
|
return _this;
|
|
669
677
|
}
|
|
670
678
|
Object.defineProperty(ItemValueWrapperViewModel.prototype, "canBeDragged", {
|
|
@@ -717,9 +725,22 @@ var ItemValueWrapperViewModel = /** @class */ (function (_super) {
|
|
|
717
725
|
enumerable: false,
|
|
718
726
|
configurable: true
|
|
719
727
|
});
|
|
728
|
+
Object.defineProperty(ItemValueWrapperViewModel.prototype, "expandCollapseManager", {
|
|
729
|
+
get: function () {
|
|
730
|
+
return this.creator.expandCollapseManager;
|
|
731
|
+
},
|
|
732
|
+
enumerable: false,
|
|
733
|
+
configurable: true
|
|
734
|
+
});
|
|
720
735
|
ItemValueWrapperViewModel.prototype.dispose = function () {
|
|
721
736
|
_super.prototype.dispose.call(this);
|
|
722
737
|
this.dragDropHelper.onGhostPositionChanged.remove(this.handleDragDropGhostPositionChanged);
|
|
738
|
+
if (this.item) {
|
|
739
|
+
this.item.onExpandPanelAtDesign.remove(this.onExpandPanelAtDesign);
|
|
740
|
+
}
|
|
741
|
+
if (this.canShowPanel()) {
|
|
742
|
+
this.expandCollapseManager.disposeChoice(this.item, this);
|
|
743
|
+
}
|
|
723
744
|
};
|
|
724
745
|
ItemValueWrapperViewModel.prototype.getGhostPosition = function (item) {
|
|
725
746
|
if (this.dragDropHelper.dropTarget !== item)
|
|
@@ -864,6 +885,56 @@ var ItemValueWrapperViewModel = /** @class */ (function (_super) {
|
|
|
864
885
|
return false;
|
|
865
886
|
return val >= min && val <= max;
|
|
866
887
|
};
|
|
888
|
+
ItemValueWrapperViewModel.prototype.canShowPanel = function () {
|
|
889
|
+
if (this.canShowPanelValue === undefined) {
|
|
890
|
+
this.canShowPanelValue = this.calcCanShowPanel();
|
|
891
|
+
}
|
|
892
|
+
return this.canShowPanelValue;
|
|
893
|
+
};
|
|
894
|
+
ItemValueWrapperViewModel.prototype.calcCanShowPanel = function () {
|
|
895
|
+
if (!this.item.supportElements)
|
|
896
|
+
return false;
|
|
897
|
+
var level = this.creator.maxChoiceContentNestingLevel;
|
|
898
|
+
if (level <= 0)
|
|
899
|
+
return false;
|
|
900
|
+
if (this.question.isBuiltInChoice(this.item))
|
|
901
|
+
return false;
|
|
902
|
+
var parent = this.question.parent;
|
|
903
|
+
var index = 0;
|
|
904
|
+
while (!!parent && index < level && _survey_helper__WEBPACK_IMPORTED_MODULE_6__.SurveyHelper.isChoiceItemPanel(parent)) {
|
|
905
|
+
index++;
|
|
906
|
+
parent = parent.parent;
|
|
907
|
+
}
|
|
908
|
+
return !!parent && index < level;
|
|
909
|
+
};
|
|
910
|
+
Object.defineProperty(ItemValueWrapperViewModel.prototype, "showPanel", {
|
|
911
|
+
get: function () {
|
|
912
|
+
return this.getPropertyValue("showPanel", false);
|
|
913
|
+
},
|
|
914
|
+
set: function (val) {
|
|
915
|
+
if (val && !this.canShowPanel())
|
|
916
|
+
return;
|
|
917
|
+
if (val) {
|
|
918
|
+
this.item.panel.onFirstRendering();
|
|
919
|
+
}
|
|
920
|
+
this.expandCollapseManager.setChoicesState(this.item, val, this);
|
|
921
|
+
this.expandCollapse(val);
|
|
922
|
+
},
|
|
923
|
+
enumerable: false,
|
|
924
|
+
configurable: true
|
|
925
|
+
});
|
|
926
|
+
ItemValueWrapperViewModel.prototype.expandCollapse = function (val) {
|
|
927
|
+
this.setPropertyValue("showPanel", val);
|
|
928
|
+
};
|
|
929
|
+
ItemValueWrapperViewModel.prototype.togglePanel = function () {
|
|
930
|
+
this.showPanel = !this.showPanel;
|
|
931
|
+
};
|
|
932
|
+
ItemValueWrapperViewModel.prototype.setupShowPanel = function () {
|
|
933
|
+
var state = this.expandCollapseManager.isChoiceExpanded(this.item);
|
|
934
|
+
if (state) {
|
|
935
|
+
this.showPanel = true;
|
|
936
|
+
}
|
|
937
|
+
};
|
|
867
938
|
(0,tslib__WEBPACK_IMPORTED_MODULE_0__.__decorate)([
|
|
868
939
|
(0,survey_core__WEBPACK_IMPORTED_MODULE_1__.property)({ defaultValue: false })
|
|
869
940
|
], ItemValueWrapperViewModel.prototype, "isNew", void 0);
|
|
@@ -5551,6 +5622,10 @@ var StringEditorViewModelBase = /** @class */ (function (_super) {
|
|
|
5551
5622
|
var html = target.innerHTML;
|
|
5552
5623
|
var text = target.innerText;
|
|
5553
5624
|
var mdText = null;
|
|
5625
|
+
if (this.creator && this.creator.trimValues && this.isInplaceForEditValues) {
|
|
5626
|
+
html = html.trim();
|
|
5627
|
+
text = text.trim();
|
|
5628
|
+
}
|
|
5554
5629
|
if (!this.editAsText && this.creator) {
|
|
5555
5630
|
var options = {
|
|
5556
5631
|
element: this.locString.owner,
|
|
@@ -18705,10 +18780,11 @@ var TranslationEditor = /** @class */ (function () {
|
|
|
18705
18780
|
};
|
|
18706
18781
|
TranslationEditor.prototype.setupNavigationButtons = function (survey) {
|
|
18707
18782
|
var _this = this;
|
|
18783
|
+
survey.showCompleteButton = false;
|
|
18708
18784
|
var navigationBar = new _action_container_view_model__WEBPACK_IMPORTED_MODULE_11__.SurveyElementActionContainer();
|
|
18709
18785
|
navigationBar.allowResponsiveness();
|
|
18710
|
-
survey["
|
|
18711
|
-
survey.findLayoutElement("buttons-navigation").data = navigationBar;
|
|
18786
|
+
survey["navigationBarTopValue"] = navigationBar;
|
|
18787
|
+
survey.findLayoutElement("buttons-navigation-top").data = navigationBar;
|
|
18712
18788
|
navigationBar.locOwner = survey;
|
|
18713
18789
|
navigationBar.cssClasses = survey.css.actionBar;
|
|
18714
18790
|
navigationBar.containerCss = survey.css.footer;
|
|
@@ -18798,7 +18874,7 @@ var TranslationEditor = /** @class */ (function () {
|
|
|
18798
18874
|
return action;
|
|
18799
18875
|
};
|
|
18800
18876
|
TranslationEditor.prototype.updateFromLocaleAction = function () {
|
|
18801
|
-
var action = this.translation.stringsHeaderSurvey.findLayoutElement("buttons-navigation").data.getActionById("svc-translation-fromlocale");
|
|
18877
|
+
var action = this.translation.stringsHeaderSurvey.findLayoutElement("buttons-navigation-top").data.getActionById("svc-translation-fromlocale");
|
|
18802
18878
|
if (!!action) {
|
|
18803
18879
|
action.enabled = this.fromLocales.length > 0;
|
|
18804
18880
|
action.iconName = action.enabled ? "icon-chevron_16x16" : undefined;
|
|
@@ -19272,6 +19348,7 @@ var SurveyCreatorModel = /** @class */ (function (_super) {
|
|
|
19272
19348
|
var _a;
|
|
19273
19349
|
var _this = _super.call(this) || this;
|
|
19274
19350
|
_this.options = options;
|
|
19351
|
+
_this.trimValues = false;
|
|
19275
19352
|
/**
|
|
19276
19353
|
* Specifies whether the "Add Question" button remembers the type of the most recently added question and uses it for subsequent questions.
|
|
19277
19354
|
*
|
|
@@ -20011,6 +20088,18 @@ var SurveyCreatorModel = /** @class */ (function (_super) {
|
|
|
20011
20088
|
* @see showTranslationTab
|
|
20012
20089
|
*/
|
|
20013
20090
|
_this.clearTranslationsOnSourceTextChange = false;
|
|
20091
|
+
/**
|
|
20092
|
+
* Specifies how deeply choice options in Radio Button Group and Checkboxes questions can contain nested survey content such as questions or panels.
|
|
20093
|
+
*
|
|
20094
|
+
* - 0 - Disables content nesting for choice options.
|
|
20095
|
+
* - 1 - Allows first-level choice options to contain survey elements.
|
|
20096
|
+
* - 2 - Allows first- and second-level choice options to contain survey elements, and so on.
|
|
20097
|
+
*
|
|
20098
|
+
* Default value: 0
|
|
20099
|
+
*
|
|
20100
|
+
* [View Demo](https://surveyjs.io/survey-creator/examples/nest-sub-questions-within-choice-options/ (linkStyle))
|
|
20101
|
+
*/
|
|
20102
|
+
_this.maxChoiceContentNestingLevel = 0;
|
|
20014
20103
|
/**
|
|
20015
20104
|
* An event that is raised to determine whether in-place editing is allowed for an element on the design surface. Use this event to enable or disable in-place editing for specific elements.
|
|
20016
20105
|
* @see inplaceEditChoiceValues
|
|
@@ -21453,6 +21542,7 @@ var SurveyCreatorModel = /** @class */ (function (_super) {
|
|
|
21453
21542
|
*/
|
|
21454
21543
|
SurveyCreatorModel.prototype.initSurveyWithJSON = function (json, clearState) {
|
|
21455
21544
|
var _this = this;
|
|
21545
|
+
this.expandCollapseManager.clearExpandChoicesStates();
|
|
21456
21546
|
if (!json) {
|
|
21457
21547
|
json = { "headerView": "advanced" };
|
|
21458
21548
|
}
|
|
@@ -21611,11 +21701,13 @@ var SurveyCreatorModel = /** @class */ (function (_super) {
|
|
|
21611
21701
|
this.dragDropChoices = new survey_core__WEBPACK_IMPORTED_MODULE_1__.DragDropChoices(null, this);
|
|
21612
21702
|
this.dragDropChoices.onDragStart.add(function (sender, options) {
|
|
21613
21703
|
_this.startUndoRedoTransaction("drag drop");
|
|
21704
|
+
_this.expandCollapseManager.collapseChoices(_this.dragDropChoices.parentElement.choices);
|
|
21614
21705
|
});
|
|
21615
21706
|
this.dragDropChoices.onDragEnd.add(function (sender, options) {
|
|
21616
21707
|
_this.selectElement(options.draggedElement, undefined, false);
|
|
21617
21708
|
});
|
|
21618
21709
|
this.dragDropChoices.onDragClear.add(function (sender, options) {
|
|
21710
|
+
_this.expandCollapseManager.expandChoices();
|
|
21619
21711
|
_this.stopUndoRedoTransaction();
|
|
21620
21712
|
});
|
|
21621
21713
|
};
|
|
@@ -21628,6 +21720,8 @@ var SurveyCreatorModel = /** @class */ (function (_super) {
|
|
|
21628
21720
|
}
|
|
21629
21721
|
};
|
|
21630
21722
|
SurveyCreatorModel.prototype.updateConditionsOnNameChanged = function (obj, propertyName, oldValue) {
|
|
21723
|
+
if (this.isCreatingNewElement)
|
|
21724
|
+
return;
|
|
21631
21725
|
if (this.isObjQuestion(obj)) {
|
|
21632
21726
|
if (propertyName === "name" && !obj["valueName"]) {
|
|
21633
21727
|
this.updateLogicOnQuestionNameChanged(oldValue, obj["name"]);
|
|
@@ -21734,7 +21828,9 @@ var SurveyCreatorModel = /** @class */ (function (_super) {
|
|
|
21734
21828
|
this.addNewElementReason = "DROPPED_FROM_TOOLBOX";
|
|
21735
21829
|
};
|
|
21736
21830
|
SurveyCreatorModel.prototype.doOnQuestionAdded = function (question, parentPanel) {
|
|
21831
|
+
this.isCreatingNewElement = true;
|
|
21737
21832
|
question.name = this.generateUniqueName(question, question.name);
|
|
21833
|
+
this.isCreatingNewElement = false;
|
|
21738
21834
|
var page = this.getPageByElement(question);
|
|
21739
21835
|
if (!page)
|
|
21740
21836
|
return;
|
|
@@ -22535,15 +22631,38 @@ var SurveyCreatorModel = /** @class */ (function (_super) {
|
|
|
22535
22631
|
}
|
|
22536
22632
|
});
|
|
22537
22633
|
};
|
|
22538
|
-
SurveyCreatorModel.prototype.focusElement = function (element, focus, selEl, propertyName, startEdit) {
|
|
22634
|
+
SurveyCreatorModel.prototype.focusElement = function (element, focus, selEl, propertyName, startEdit, onCallback) {
|
|
22539
22635
|
var _this = this;
|
|
22540
22636
|
if (selEl === void 0) { selEl = null; }
|
|
22541
22637
|
if (propertyName === void 0) { propertyName = null; }
|
|
22542
22638
|
if (startEdit === void 0) { startEdit = null; }
|
|
22639
|
+
if (onCallback === void 0) { onCallback = null; }
|
|
22543
22640
|
if (!selEl)
|
|
22544
22641
|
selEl = this.getSelectedSurveyElement();
|
|
22545
22642
|
if (!selEl)
|
|
22546
22643
|
return;
|
|
22644
|
+
var doFocus = function () { return _this.focusElementCore(element, focus, selEl, propertyName, startEdit, onCallback); };
|
|
22645
|
+
if (element && _survey_helper__WEBPACK_IMPORTED_MODULE_10__.SurveyHelper.isChoiceItemPanel(element.parent)) {
|
|
22646
|
+
var panel = _survey_helper__WEBPACK_IMPORTED_MODULE_10__.SurveyHelper.getChoiceIItemPanel(element);
|
|
22647
|
+
var item_1 = panel["choiceItem"];
|
|
22648
|
+
var q = item_1.choiceOwner;
|
|
22649
|
+
if (q.isCollapsed)
|
|
22650
|
+
q.expand();
|
|
22651
|
+
this.focusElement(q, false, null, null, null, function () {
|
|
22652
|
+
item_1.onExpandPanelAtDesign.fire(item_1, {});
|
|
22653
|
+
doFocus();
|
|
22654
|
+
});
|
|
22655
|
+
}
|
|
22656
|
+
else {
|
|
22657
|
+
doFocus();
|
|
22658
|
+
}
|
|
22659
|
+
};
|
|
22660
|
+
SurveyCreatorModel.prototype.focusElementCore = function (element, focus, selEl, propertyName, startEdit, onCallback) {
|
|
22661
|
+
var _this = this;
|
|
22662
|
+
if (selEl === void 0) { selEl = null; }
|
|
22663
|
+
if (propertyName === void 0) { propertyName = null; }
|
|
22664
|
+
if (startEdit === void 0) { startEdit = null; }
|
|
22665
|
+
if (onCallback === void 0) { onCallback = null; }
|
|
22547
22666
|
var elementPage = this.getPageByElement(selEl);
|
|
22548
22667
|
clearInterval(this.currentFocusInterval);
|
|
22549
22668
|
clearTimeout(this.currentFocusTimeout);
|
|
@@ -22588,10 +22707,16 @@ var SurveyCreatorModel = /** @class */ (function (_super) {
|
|
|
22588
22707
|
if (startEdit && !!element) {
|
|
22589
22708
|
_components_string_editor__WEBPACK_IMPORTED_MODULE_23__.StringEditorConnector.get(element.locTitle).activateEditor();
|
|
22590
22709
|
}
|
|
22710
|
+
onCallback && onCallback();
|
|
22591
22711
|
}, 1);
|
|
22592
22712
|
}, 100);
|
|
22593
22713
|
}, 50);
|
|
22594
22714
|
};
|
|
22715
|
+
SurveyCreatorModel.prototype.getChoiceItemQuestionToExpand = function (element) {
|
|
22716
|
+
var panel = _survey_helper__WEBPACK_IMPORTED_MODULE_10__.SurveyHelper.getChoiceIItemPanel(element);
|
|
22717
|
+
var item = panel["choiceItem"];
|
|
22718
|
+
return item.choiceOwner;
|
|
22719
|
+
};
|
|
22595
22720
|
SurveyCreatorModel.prototype.getHtmlElementForScroll = function (element) {
|
|
22596
22721
|
var _a;
|
|
22597
22722
|
var id = element.getType() === "matrixdropdowncolumn" ? element.colOwner.id : element.id;
|
|
@@ -26526,15 +26651,6 @@ var DragDropSurveyElements = /** @class */ (function (_super) {
|
|
|
26526
26651
|
});
|
|
26527
26652
|
return result;
|
|
26528
26653
|
};
|
|
26529
|
-
DragDropSurveyElements.prototype.getDragDropElementType = function (element) {
|
|
26530
|
-
if (element.isPage)
|
|
26531
|
-
return _drag_drop_enums__WEBPACK_IMPORTED_MODULE_5__.ElType.Page;
|
|
26532
|
-
if (element.isPanel)
|
|
26533
|
-
return _drag_drop_enums__WEBPACK_IMPORTED_MODULE_5__.ElType.Panel;
|
|
26534
|
-
if (element instanceof survey_core__WEBPACK_IMPORTED_MODULE_1__.QuestionPanelDynamicModel)
|
|
26535
|
-
return _drag_drop_enums__WEBPACK_IMPORTED_MODULE_5__.ElType.DynamicPanel;
|
|
26536
|
-
return _drag_drop_enums__WEBPACK_IMPORTED_MODULE_5__.ElType.Question;
|
|
26537
|
-
};
|
|
26538
26654
|
DragDropSurveyElements.prototype.dragOver = function (event) {
|
|
26539
26655
|
var dropTargetNode = this.findDropTargetNodeFromPoint(event.clientX, event.clientY);
|
|
26540
26656
|
if (!dropTargetNode) {
|
|
@@ -27317,11 +27433,68 @@ var ExpandCollapseManager = /** @class */ (function () {
|
|
|
27317
27433
|
function ExpandCollapseManager(creator) {
|
|
27318
27434
|
this.creator = creator;
|
|
27319
27435
|
this._lockQuestions = false;
|
|
27436
|
+
this.expandChoicesStates = {};
|
|
27320
27437
|
}
|
|
27321
27438
|
ExpandCollapseManager.prototype.expandCollapseElements = function (reason, isCollapsed, elements) {
|
|
27322
27439
|
if (elements === void 0) { elements = null; }
|
|
27323
27440
|
this.updateCollapsed(elements || this.getCollapsableElements(), isCollapsed, reason);
|
|
27324
27441
|
};
|
|
27442
|
+
ExpandCollapseManager.prototype.clearExpandChoicesStates = function () {
|
|
27443
|
+
this.expandChoicesStates = {};
|
|
27444
|
+
};
|
|
27445
|
+
ExpandCollapseManager.prototype.setChoicesState = function (item, isExpanded, adorner) {
|
|
27446
|
+
var id = item.uniqueId;
|
|
27447
|
+
if (isExpanded) {
|
|
27448
|
+
var adorners = this.expandChoicesStates[id];
|
|
27449
|
+
if (!adorners) {
|
|
27450
|
+
adorners = [];
|
|
27451
|
+
this.expandChoicesStates[id] = adorners;
|
|
27452
|
+
}
|
|
27453
|
+
if (adorner) {
|
|
27454
|
+
adorners.push(adorner);
|
|
27455
|
+
}
|
|
27456
|
+
}
|
|
27457
|
+
else {
|
|
27458
|
+
delete this.expandChoicesStates[id];
|
|
27459
|
+
}
|
|
27460
|
+
};
|
|
27461
|
+
ExpandCollapseManager.prototype.isChoiceExpanded = function (item) {
|
|
27462
|
+
return !!this.expandChoicesStates[item.uniqueId];
|
|
27463
|
+
};
|
|
27464
|
+
ExpandCollapseManager.prototype.expandChoices = function () {
|
|
27465
|
+
if (Array.isArray(this.collapsedChoices)) {
|
|
27466
|
+
this.expandCollapseChoices(this.collapsedChoices, true);
|
|
27467
|
+
}
|
|
27468
|
+
this.collapsedChoices = null;
|
|
27469
|
+
};
|
|
27470
|
+
ExpandCollapseManager.prototype.collapseChoices = function (items) {
|
|
27471
|
+
this.collapsedChoices = items;
|
|
27472
|
+
this.expandCollapseChoices(items, false);
|
|
27473
|
+
};
|
|
27474
|
+
ExpandCollapseManager.prototype.disposeChoice = function (item, adorner) {
|
|
27475
|
+
var id = item.uniqueId;
|
|
27476
|
+
var adorners = this.expandChoicesStates[id];
|
|
27477
|
+
if (Array.isArray(adorners)) {
|
|
27478
|
+
var index = adorners.indexOf(adorner);
|
|
27479
|
+
if (index !== -1) {
|
|
27480
|
+
adorners.splice(index, 1);
|
|
27481
|
+
}
|
|
27482
|
+
if (adorners.length === 0) {
|
|
27483
|
+
delete this.expandChoicesStates[id];
|
|
27484
|
+
}
|
|
27485
|
+
}
|
|
27486
|
+
};
|
|
27487
|
+
ExpandCollapseManager.prototype.expandCollapseChoices = function (items, isExpanded) {
|
|
27488
|
+
var _this = this;
|
|
27489
|
+
items.forEach(function (item) {
|
|
27490
|
+
var adorners = _this.expandChoicesStates[item.uniqueId];
|
|
27491
|
+
if (Array.isArray(adorners)) {
|
|
27492
|
+
adorners.forEach(function (adorner) {
|
|
27493
|
+
adorner.expandCollapse(isExpanded);
|
|
27494
|
+
});
|
|
27495
|
+
}
|
|
27496
|
+
});
|
|
27497
|
+
};
|
|
27325
27498
|
Object.defineProperty(ExpandCollapseManager.prototype, "questionsLocked", {
|
|
27326
27499
|
get: function () {
|
|
27327
27500
|
return this._lockQuestions;
|
|
@@ -36773,10 +36946,8 @@ var SurveyConditionEditorItem = /** @class */ (function (_super) {
|
|
|
36773
36946
|
return val;
|
|
36774
36947
|
if (val[0] == "[")
|
|
36775
36948
|
return val.replace(/(?!^)(['])(?!$)/g, "\\$1");
|
|
36776
|
-
if (!this.isQuote(val
|
|
36777
|
-
val = "'" + val;
|
|
36778
|
-
if (!this.isQuote(val[val.length - 1]))
|
|
36779
|
-
val = val + "'";
|
|
36949
|
+
if (!this.isQuote(val))
|
|
36950
|
+
val = "'" + val + "'";
|
|
36780
36951
|
return val.replace(/(?!^)(['"])(?!$)/g, "\\$1");
|
|
36781
36952
|
};
|
|
36782
36953
|
SurveyConditionEditorItem.prototype.isNumeric = function (val) {
|
|
@@ -38105,10 +38276,15 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
38105
38276
|
/* harmony import */ var survey_core__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(survey_core__WEBPACK_IMPORTED_MODULE_1__);
|
|
38106
38277
|
/* harmony import */ var _index__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./index */ "./src/property-grid/index.ts");
|
|
38107
38278
|
/* harmony import */ var _editorLocalization__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../editorLocalization */ "./src/editorLocalization.ts");
|
|
38279
|
+
/* harmony import */ var _survey_helper__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../survey-helper */ "./src/survey-helper.ts");
|
|
38108
38280
|
|
|
38109
38281
|
|
|
38110
38282
|
|
|
38111
38283
|
|
|
38284
|
+
|
|
38285
|
+
function getSeparator() {
|
|
38286
|
+
return (0,_survey_helper__WEBPACK_IMPORTED_MODULE_4__.getItemValueSeparator)();
|
|
38287
|
+
}
|
|
38112
38288
|
var FastEntryEditorBase = /** @class */ (function (_super) {
|
|
38113
38289
|
(0,tslib__WEBPACK_IMPORTED_MODULE_0__.__extends)(FastEntryEditorBase, _super);
|
|
38114
38290
|
function FastEntryEditorBase(choices, options, className, names) {
|
|
@@ -38214,7 +38390,7 @@ var FastEntryEditorBase = /** @class */ (function (_super) {
|
|
|
38214
38390
|
for (var i = 0; i < texts.length; i++) {
|
|
38215
38391
|
if (!texts[i])
|
|
38216
38392
|
continue;
|
|
38217
|
-
var elements = texts[i].split(
|
|
38393
|
+
var elements = texts[i].split(getSeparator());
|
|
38218
38394
|
var valueItem = survey_core__WEBPACK_IMPORTED_MODULE_1__.Serializer.createClass(this.className);
|
|
38219
38395
|
this.names.forEach(function (name, i) {
|
|
38220
38396
|
valueItem[name] = elements[i];
|
|
@@ -38254,7 +38430,7 @@ var FastEntryEditorBase = /** @class */ (function (_super) {
|
|
|
38254
38430
|
var str = texts[i];
|
|
38255
38431
|
if (!str)
|
|
38256
38432
|
continue;
|
|
38257
|
-
var value = str.split(
|
|
38433
|
+
var value = str.split(getSeparator())[0];
|
|
38258
38434
|
if (values[value])
|
|
38259
38435
|
return value;
|
|
38260
38436
|
values[value] = true;
|
|
@@ -38279,7 +38455,7 @@ var FastEntryEditorBase = /** @class */ (function (_super) {
|
|
|
38279
38455
|
}
|
|
38280
38456
|
if (!survey_core__WEBPACK_IMPORTED_MODULE_1__.Helpers.isValueEmpty(str)) {
|
|
38281
38457
|
for (var i = 0; i < separatorCounter; i++) {
|
|
38282
|
-
text +=
|
|
38458
|
+
text += getSeparator();
|
|
38283
38459
|
}
|
|
38284
38460
|
text += str;
|
|
38285
38461
|
separatorCounter = 1;
|
|
@@ -39234,7 +39410,7 @@ var PropertyGridModel = /** @class */ (function () {
|
|
|
39234
39410
|
panel.collapse();
|
|
39235
39411
|
}
|
|
39236
39412
|
}
|
|
39237
|
-
if (focus) {
|
|
39413
|
+
if (focus && !question.isReadOnly) {
|
|
39238
39414
|
question.focus();
|
|
39239
39415
|
}
|
|
39240
39416
|
else {
|
|
@@ -39678,9 +39854,14 @@ var PropertyGridModel = /** @class */ (function () {
|
|
|
39678
39854
|
PropertyGridModel.prototype.onMatrixCellValueChanging = function (options) {
|
|
39679
39855
|
if (this.isCellCreating)
|
|
39680
39856
|
return;
|
|
39857
|
+
var obj = options.row.editingObj;
|
|
39858
|
+
var propName = options.columnName;
|
|
39859
|
+
if (this.options.trimValues && propName === "value" && obj.isDescendantOf("itemvalue") && typeof options.value === "string") {
|
|
39860
|
+
options.value = options.value.trim();
|
|
39861
|
+
}
|
|
39681
39862
|
var changingOptions = {
|
|
39682
|
-
obj:
|
|
39683
|
-
propertyName:
|
|
39863
|
+
obj: obj,
|
|
39864
|
+
propertyName: propName,
|
|
39684
39865
|
value: options.oldValue,
|
|
39685
39866
|
newValue: options.value,
|
|
39686
39867
|
doValidation: false
|
|
@@ -40319,10 +40500,11 @@ var PropertyGridEditorDropdown = /** @class */ (function (_super) {
|
|
|
40319
40500
|
return true;
|
|
40320
40501
|
if (this.isLocaleProp(prop))
|
|
40321
40502
|
return false;
|
|
40322
|
-
if (!this.canRenderAsButtonGroup
|
|
40323
|
-
|
|
40324
|
-
|
|
40325
|
-
|
|
40503
|
+
if (!this.canRenderAsButtonGroup)
|
|
40504
|
+
return false;
|
|
40505
|
+
if (!choices || !Array.isArray(choices))
|
|
40506
|
+
return false;
|
|
40507
|
+
if (choices.length == 0 || choices.length > 4)
|
|
40326
40508
|
return false;
|
|
40327
40509
|
var charCount = 0;
|
|
40328
40510
|
for (var i = 0; i < choices.length; i++) {
|
|
@@ -44598,7 +44780,8 @@ var SelectionHistory = /** @class */ (function (_super) {
|
|
|
44598
44780
|
__webpack_require__.r(__webpack_exports__);
|
|
44599
44781
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
44600
44782
|
/* harmony export */ ObjType: () => (/* binding */ ObjType),
|
|
44601
|
-
/* harmony export */ SurveyHelper: () => (/* binding */ SurveyHelper)
|
|
44783
|
+
/* harmony export */ SurveyHelper: () => (/* binding */ SurveyHelper),
|
|
44784
|
+
/* harmony export */ getItemValueSeparator: () => (/* binding */ getItemValueSeparator)
|
|
44602
44785
|
/* harmony export */ });
|
|
44603
44786
|
/* harmony import */ var survey_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! survey-core */ "survey-core");
|
|
44604
44787
|
/* harmony import */ var survey_core__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(survey_core__WEBPACK_IMPORTED_MODULE_0__);
|
|
@@ -44607,6 +44790,10 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
44607
44790
|
|
|
44608
44791
|
|
|
44609
44792
|
|
|
44793
|
+
function getItemValueSeparator() {
|
|
44794
|
+
var res = survey_core__WEBPACK_IMPORTED_MODULE_0__.settings.itemValueSeparator;
|
|
44795
|
+
return !!res ? res : "|";
|
|
44796
|
+
}
|
|
44610
44797
|
var ObjType;
|
|
44611
44798
|
(function (ObjType) {
|
|
44612
44799
|
ObjType["Unknown"] = "unknown";
|
|
@@ -44848,6 +45035,17 @@ var SurveyHelper = /** @class */ (function () {
|
|
|
44848
45035
|
SurveyHelper.canSelectObj = function (obj) {
|
|
44849
45036
|
return !obj || obj["disableSelecting"] !== true;
|
|
44850
45037
|
};
|
|
45038
|
+
SurveyHelper.isChoiceItemPanel = function (panel) {
|
|
45039
|
+
return this.getChoiceIItemPanel(panel) !== null;
|
|
45040
|
+
};
|
|
45041
|
+
SurveyHelper.getChoiceIItemPanel = function (element) {
|
|
45042
|
+
while (!!element) {
|
|
45043
|
+
if (element.isPanel && !!element.choiceItem)
|
|
45044
|
+
return element;
|
|
45045
|
+
element = element.parent;
|
|
45046
|
+
}
|
|
45047
|
+
return null;
|
|
45048
|
+
};
|
|
44851
45049
|
SurveyHelper.warnNonSupported = function (name, newPropertyName) {
|
|
44852
45050
|
var outputText = (0,_utils_creator_utils__WEBPACK_IMPORTED_MODULE_2__.wrapTextByCurlyBraces)(name) + " is not supported in V2.";
|
|
44853
45051
|
if (!!newPropertyName) {
|
|
@@ -44905,7 +45103,7 @@ var SurveyHelper = /** @class */ (function () {
|
|
|
44905
45103
|
.map(function (row) {
|
|
44906
45104
|
return row.cells
|
|
44907
45105
|
.map(function (cell) { return cell.value || ""; })
|
|
44908
|
-
.join(
|
|
45106
|
+
.join(getItemValueSeparator())
|
|
44909
45107
|
.replace(/\|$/, "");
|
|
44910
45108
|
})
|
|
44911
45109
|
.join("\n");
|
|
@@ -44918,7 +45116,7 @@ var SurveyHelper = /** @class */ (function () {
|
|
|
44918
45116
|
text += "\n";
|
|
44919
45117
|
text += item.value;
|
|
44920
45118
|
if (item.pureText)
|
|
44921
|
-
text +=
|
|
45119
|
+
text += getItemValueSeparator() + item.pureText;
|
|
44922
45120
|
});
|
|
44923
45121
|
return text;
|
|
44924
45122
|
};
|
|
@@ -44930,7 +45128,7 @@ var SurveyHelper = /** @class */ (function () {
|
|
|
44930
45128
|
for (var i = 0; i < texts.length; i++) {
|
|
44931
45129
|
if (!texts[i])
|
|
44932
45130
|
continue;
|
|
44933
|
-
var elements = texts[i].split(
|
|
45131
|
+
var elements = texts[i].split(getItemValueSeparator());
|
|
44934
45132
|
var valueItem = survey_core__WEBPACK_IMPORTED_MODULE_0__.Serializer.createClass(className);
|
|
44935
45133
|
properties.forEach(function (p, i) {
|
|
44936
45134
|
valueItem[p.name] = elements[i];
|
|
@@ -48840,6 +49038,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
48840
49038
|
/* harmony export */ getElementWrapperComponentData: () => (/* reexport safe */ _creator_base__WEBPACK_IMPORTED_MODULE_5__.getElementWrapperComponentData),
|
|
48841
49039
|
/* harmony export */ getElementWrapperComponentName: () => (/* reexport safe */ _creator_base__WEBPACK_IMPORTED_MODULE_5__.getElementWrapperComponentName),
|
|
48842
49040
|
/* harmony export */ getFirstNonTextElement: () => (/* reexport safe */ _utils_html_element_utils__WEBPACK_IMPORTED_MODULE_80__.getFirstNonTextElement),
|
|
49041
|
+
/* harmony export */ getItemValueSeparator: () => (/* reexport safe */ _survey_helper__WEBPACK_IMPORTED_MODULE_86__.getItemValueSeparator),
|
|
48843
49042
|
/* harmony export */ getItemValueWrapperComponentData: () => (/* reexport safe */ _creator_base__WEBPACK_IMPORTED_MODULE_5__.getItemValueWrapperComponentData),
|
|
48844
49043
|
/* harmony export */ getItemValueWrapperComponentName: () => (/* reexport safe */ _creator_base__WEBPACK_IMPORTED_MODULE_5__.getItemValueWrapperComponentName),
|
|
48845
49044
|
/* harmony export */ getLocString: () => (/* reexport safe */ _editorLocalization__WEBPACK_IMPORTED_MODULE_2__.getLocString),
|
|
@@ -49019,7 +49218,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
49019
49218
|
/* harmony import */ var survey_core__WEBPACK_IMPORTED_MODULE_116__ = __webpack_require__(/*! survey-core */ "survey-core");
|
|
49020
49219
|
/* harmony import */ var survey_core__WEBPACK_IMPORTED_MODULE_116___default = /*#__PURE__*/__webpack_require__.n(survey_core__WEBPACK_IMPORTED_MODULE_116__);
|
|
49021
49220
|
var Version;
|
|
49022
|
-
Version = "".concat("2.3.
|
|
49221
|
+
Version = "".concat("2.3.12");
|
|
49023
49222
|
//should be loaded before other styles for easier override
|
|
49024
49223
|
|
|
49025
49224
|
|
|
@@ -49141,7 +49340,7 @@ Version = "".concat("2.3.10");
|
|
|
49141
49340
|
|
|
49142
49341
|
|
|
49143
49342
|
|
|
49144
|
-
(0,survey_core__WEBPACK_IMPORTED_MODULE_116__.checkLibraryVersion)("".concat("2.3.
|
|
49343
|
+
(0,survey_core__WEBPACK_IMPORTED_MODULE_116__.checkLibraryVersion)("".concat("2.3.12"), "survey-creator-core");
|
|
49145
49344
|
|
|
49146
49345
|
})();
|
|
49147
49346
|
|