survey-creator-core 2.3.10 → 2.3.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/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 +184 -29
- 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 +204 -28
- 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 +4 -1
- package/typings/creator-options.d.ts +1 -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.11
|
|
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);
|
|
@@ -18705,10 +18776,11 @@ var TranslationEditor = /** @class */ (function () {
|
|
|
18705
18776
|
};
|
|
18706
18777
|
TranslationEditor.prototype.setupNavigationButtons = function (survey) {
|
|
18707
18778
|
var _this = this;
|
|
18779
|
+
survey.showCompleteButton = false;
|
|
18708
18780
|
var navigationBar = new _action_container_view_model__WEBPACK_IMPORTED_MODULE_11__.SurveyElementActionContainer();
|
|
18709
18781
|
navigationBar.allowResponsiveness();
|
|
18710
|
-
survey["
|
|
18711
|
-
survey.findLayoutElement("buttons-navigation").data = navigationBar;
|
|
18782
|
+
survey["navigationBarTopValue"] = navigationBar;
|
|
18783
|
+
survey.findLayoutElement("buttons-navigation-top").data = navigationBar;
|
|
18712
18784
|
navigationBar.locOwner = survey;
|
|
18713
18785
|
navigationBar.cssClasses = survey.css.actionBar;
|
|
18714
18786
|
navigationBar.containerCss = survey.css.footer;
|
|
@@ -18798,7 +18870,7 @@ var TranslationEditor = /** @class */ (function () {
|
|
|
18798
18870
|
return action;
|
|
18799
18871
|
};
|
|
18800
18872
|
TranslationEditor.prototype.updateFromLocaleAction = function () {
|
|
18801
|
-
var action = this.translation.stringsHeaderSurvey.findLayoutElement("buttons-navigation").data.getActionById("svc-translation-fromlocale");
|
|
18873
|
+
var action = this.translation.stringsHeaderSurvey.findLayoutElement("buttons-navigation-top").data.getActionById("svc-translation-fromlocale");
|
|
18802
18874
|
if (!!action) {
|
|
18803
18875
|
action.enabled = this.fromLocales.length > 0;
|
|
18804
18876
|
action.iconName = action.enabled ? "icon-chevron_16x16" : undefined;
|
|
@@ -20011,6 +20083,7 @@ var SurveyCreatorModel = /** @class */ (function (_super) {
|
|
|
20011
20083
|
* @see showTranslationTab
|
|
20012
20084
|
*/
|
|
20013
20085
|
_this.clearTranslationsOnSourceTextChange = false;
|
|
20086
|
+
_this.maxChoiceContentNestingLevel = 0;
|
|
20014
20087
|
/**
|
|
20015
20088
|
* 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
20089
|
* @see inplaceEditChoiceValues
|
|
@@ -21453,6 +21526,7 @@ var SurveyCreatorModel = /** @class */ (function (_super) {
|
|
|
21453
21526
|
*/
|
|
21454
21527
|
SurveyCreatorModel.prototype.initSurveyWithJSON = function (json, clearState) {
|
|
21455
21528
|
var _this = this;
|
|
21529
|
+
this.expandCollapseManager.clearExpandChoicesStates();
|
|
21456
21530
|
if (!json) {
|
|
21457
21531
|
json = { "headerView": "advanced" };
|
|
21458
21532
|
}
|
|
@@ -21611,11 +21685,13 @@ var SurveyCreatorModel = /** @class */ (function (_super) {
|
|
|
21611
21685
|
this.dragDropChoices = new survey_core__WEBPACK_IMPORTED_MODULE_1__.DragDropChoices(null, this);
|
|
21612
21686
|
this.dragDropChoices.onDragStart.add(function (sender, options) {
|
|
21613
21687
|
_this.startUndoRedoTransaction("drag drop");
|
|
21688
|
+
_this.expandCollapseManager.collapseChoices(_this.dragDropChoices.parentElement.choices);
|
|
21614
21689
|
});
|
|
21615
21690
|
this.dragDropChoices.onDragEnd.add(function (sender, options) {
|
|
21616
21691
|
_this.selectElement(options.draggedElement, undefined, false);
|
|
21617
21692
|
});
|
|
21618
21693
|
this.dragDropChoices.onDragClear.add(function (sender, options) {
|
|
21694
|
+
_this.expandCollapseManager.expandChoices();
|
|
21619
21695
|
_this.stopUndoRedoTransaction();
|
|
21620
21696
|
});
|
|
21621
21697
|
};
|
|
@@ -22535,15 +22611,38 @@ var SurveyCreatorModel = /** @class */ (function (_super) {
|
|
|
22535
22611
|
}
|
|
22536
22612
|
});
|
|
22537
22613
|
};
|
|
22538
|
-
SurveyCreatorModel.prototype.focusElement = function (element, focus, selEl, propertyName, startEdit) {
|
|
22614
|
+
SurveyCreatorModel.prototype.focusElement = function (element, focus, selEl, propertyName, startEdit, onCallback) {
|
|
22539
22615
|
var _this = this;
|
|
22540
22616
|
if (selEl === void 0) { selEl = null; }
|
|
22541
22617
|
if (propertyName === void 0) { propertyName = null; }
|
|
22542
22618
|
if (startEdit === void 0) { startEdit = null; }
|
|
22619
|
+
if (onCallback === void 0) { onCallback = null; }
|
|
22543
22620
|
if (!selEl)
|
|
22544
22621
|
selEl = this.getSelectedSurveyElement();
|
|
22545
22622
|
if (!selEl)
|
|
22546
22623
|
return;
|
|
22624
|
+
var doFocus = function () { return _this.focusElementCore(element, focus, selEl, propertyName, startEdit, onCallback); };
|
|
22625
|
+
if (element && _survey_helper__WEBPACK_IMPORTED_MODULE_10__.SurveyHelper.isChoiceItemPanel(element.parent)) {
|
|
22626
|
+
var panel = _survey_helper__WEBPACK_IMPORTED_MODULE_10__.SurveyHelper.getChoiceIItemPanel(element);
|
|
22627
|
+
var item_1 = panel["choiceItem"];
|
|
22628
|
+
var q = item_1.choiceOwner;
|
|
22629
|
+
if (q.isCollapsed)
|
|
22630
|
+
q.expand();
|
|
22631
|
+
this.focusElement(q, false, null, null, null, function () {
|
|
22632
|
+
item_1.onExpandPanelAtDesign.fire(item_1, {});
|
|
22633
|
+
doFocus();
|
|
22634
|
+
});
|
|
22635
|
+
}
|
|
22636
|
+
else {
|
|
22637
|
+
doFocus();
|
|
22638
|
+
}
|
|
22639
|
+
};
|
|
22640
|
+
SurveyCreatorModel.prototype.focusElementCore = function (element, focus, selEl, propertyName, startEdit, onCallback) {
|
|
22641
|
+
var _this = this;
|
|
22642
|
+
if (selEl === void 0) { selEl = null; }
|
|
22643
|
+
if (propertyName === void 0) { propertyName = null; }
|
|
22644
|
+
if (startEdit === void 0) { startEdit = null; }
|
|
22645
|
+
if (onCallback === void 0) { onCallback = null; }
|
|
22547
22646
|
var elementPage = this.getPageByElement(selEl);
|
|
22548
22647
|
clearInterval(this.currentFocusInterval);
|
|
22549
22648
|
clearTimeout(this.currentFocusTimeout);
|
|
@@ -22588,10 +22687,16 @@ var SurveyCreatorModel = /** @class */ (function (_super) {
|
|
|
22588
22687
|
if (startEdit && !!element) {
|
|
22589
22688
|
_components_string_editor__WEBPACK_IMPORTED_MODULE_23__.StringEditorConnector.get(element.locTitle).activateEditor();
|
|
22590
22689
|
}
|
|
22690
|
+
onCallback && onCallback();
|
|
22591
22691
|
}, 1);
|
|
22592
22692
|
}, 100);
|
|
22593
22693
|
}, 50);
|
|
22594
22694
|
};
|
|
22695
|
+
SurveyCreatorModel.prototype.getChoiceItemQuestionToExpand = function (element) {
|
|
22696
|
+
var panel = _survey_helper__WEBPACK_IMPORTED_MODULE_10__.SurveyHelper.getChoiceIItemPanel(element);
|
|
22697
|
+
var item = panel["choiceItem"];
|
|
22698
|
+
return item.choiceOwner;
|
|
22699
|
+
};
|
|
22595
22700
|
SurveyCreatorModel.prototype.getHtmlElementForScroll = function (element) {
|
|
22596
22701
|
var _a;
|
|
22597
22702
|
var id = element.getType() === "matrixdropdowncolumn" ? element.colOwner.id : element.id;
|
|
@@ -26526,15 +26631,6 @@ var DragDropSurveyElements = /** @class */ (function (_super) {
|
|
|
26526
26631
|
});
|
|
26527
26632
|
return result;
|
|
26528
26633
|
};
|
|
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
26634
|
DragDropSurveyElements.prototype.dragOver = function (event) {
|
|
26539
26635
|
var dropTargetNode = this.findDropTargetNodeFromPoint(event.clientX, event.clientY);
|
|
26540
26636
|
if (!dropTargetNode) {
|
|
@@ -27317,11 +27413,68 @@ var ExpandCollapseManager = /** @class */ (function () {
|
|
|
27317
27413
|
function ExpandCollapseManager(creator) {
|
|
27318
27414
|
this.creator = creator;
|
|
27319
27415
|
this._lockQuestions = false;
|
|
27416
|
+
this.expandChoicesStates = {};
|
|
27320
27417
|
}
|
|
27321
27418
|
ExpandCollapseManager.prototype.expandCollapseElements = function (reason, isCollapsed, elements) {
|
|
27322
27419
|
if (elements === void 0) { elements = null; }
|
|
27323
27420
|
this.updateCollapsed(elements || this.getCollapsableElements(), isCollapsed, reason);
|
|
27324
27421
|
};
|
|
27422
|
+
ExpandCollapseManager.prototype.clearExpandChoicesStates = function () {
|
|
27423
|
+
this.expandChoicesStates = {};
|
|
27424
|
+
};
|
|
27425
|
+
ExpandCollapseManager.prototype.setChoicesState = function (item, isExpanded, adorner) {
|
|
27426
|
+
var id = item.uniqueId;
|
|
27427
|
+
if (isExpanded) {
|
|
27428
|
+
var adorners = this.expandChoicesStates[id];
|
|
27429
|
+
if (!adorners) {
|
|
27430
|
+
adorners = [];
|
|
27431
|
+
this.expandChoicesStates[id] = adorners;
|
|
27432
|
+
}
|
|
27433
|
+
if (adorner) {
|
|
27434
|
+
adorners.push(adorner);
|
|
27435
|
+
}
|
|
27436
|
+
}
|
|
27437
|
+
else {
|
|
27438
|
+
delete this.expandChoicesStates[id];
|
|
27439
|
+
}
|
|
27440
|
+
};
|
|
27441
|
+
ExpandCollapseManager.prototype.isChoiceExpanded = function (item) {
|
|
27442
|
+
return !!this.expandChoicesStates[item.uniqueId];
|
|
27443
|
+
};
|
|
27444
|
+
ExpandCollapseManager.prototype.expandChoices = function () {
|
|
27445
|
+
if (Array.isArray(this.collapsedChoices)) {
|
|
27446
|
+
this.expandCollapseChoices(this.collapsedChoices, true);
|
|
27447
|
+
}
|
|
27448
|
+
this.collapsedChoices = null;
|
|
27449
|
+
};
|
|
27450
|
+
ExpandCollapseManager.prototype.collapseChoices = function (items) {
|
|
27451
|
+
this.collapsedChoices = items;
|
|
27452
|
+
this.expandCollapseChoices(items, false);
|
|
27453
|
+
};
|
|
27454
|
+
ExpandCollapseManager.prototype.disposeChoice = function (item, adorner) {
|
|
27455
|
+
var id = item.uniqueId;
|
|
27456
|
+
var adorners = this.expandChoicesStates[id];
|
|
27457
|
+
if (Array.isArray(adorners)) {
|
|
27458
|
+
var index = adorners.indexOf(adorner);
|
|
27459
|
+
if (index !== -1) {
|
|
27460
|
+
adorners.splice(index, 1);
|
|
27461
|
+
}
|
|
27462
|
+
if (adorners.length === 0) {
|
|
27463
|
+
delete this.expandChoicesStates[id];
|
|
27464
|
+
}
|
|
27465
|
+
}
|
|
27466
|
+
};
|
|
27467
|
+
ExpandCollapseManager.prototype.expandCollapseChoices = function (items, isExpanded) {
|
|
27468
|
+
var _this = this;
|
|
27469
|
+
items.forEach(function (item) {
|
|
27470
|
+
var adorners = _this.expandChoicesStates[item.uniqueId];
|
|
27471
|
+
if (Array.isArray(adorners)) {
|
|
27472
|
+
adorners.forEach(function (adorner) {
|
|
27473
|
+
adorner.expandCollapse(isExpanded);
|
|
27474
|
+
});
|
|
27475
|
+
}
|
|
27476
|
+
});
|
|
27477
|
+
};
|
|
27325
27478
|
Object.defineProperty(ExpandCollapseManager.prototype, "questionsLocked", {
|
|
27326
27479
|
get: function () {
|
|
27327
27480
|
return this._lockQuestions;
|
|
@@ -38105,10 +38258,15 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
38105
38258
|
/* harmony import */ var survey_core__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(survey_core__WEBPACK_IMPORTED_MODULE_1__);
|
|
38106
38259
|
/* harmony import */ var _index__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./index */ "./src/property-grid/index.ts");
|
|
38107
38260
|
/* harmony import */ var _editorLocalization__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../editorLocalization */ "./src/editorLocalization.ts");
|
|
38261
|
+
/* harmony import */ var _survey_helper__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../survey-helper */ "./src/survey-helper.ts");
|
|
38108
38262
|
|
|
38109
38263
|
|
|
38110
38264
|
|
|
38111
38265
|
|
|
38266
|
+
|
|
38267
|
+
function getSeparator() {
|
|
38268
|
+
return (0,_survey_helper__WEBPACK_IMPORTED_MODULE_4__.getItemValueSeparator)();
|
|
38269
|
+
}
|
|
38112
38270
|
var FastEntryEditorBase = /** @class */ (function (_super) {
|
|
38113
38271
|
(0,tslib__WEBPACK_IMPORTED_MODULE_0__.__extends)(FastEntryEditorBase, _super);
|
|
38114
38272
|
function FastEntryEditorBase(choices, options, className, names) {
|
|
@@ -38214,7 +38372,7 @@ var FastEntryEditorBase = /** @class */ (function (_super) {
|
|
|
38214
38372
|
for (var i = 0; i < texts.length; i++) {
|
|
38215
38373
|
if (!texts[i])
|
|
38216
38374
|
continue;
|
|
38217
|
-
var elements = texts[i].split(
|
|
38375
|
+
var elements = texts[i].split(getSeparator());
|
|
38218
38376
|
var valueItem = survey_core__WEBPACK_IMPORTED_MODULE_1__.Serializer.createClass(this.className);
|
|
38219
38377
|
this.names.forEach(function (name, i) {
|
|
38220
38378
|
valueItem[name] = elements[i];
|
|
@@ -38254,7 +38412,7 @@ var FastEntryEditorBase = /** @class */ (function (_super) {
|
|
|
38254
38412
|
var str = texts[i];
|
|
38255
38413
|
if (!str)
|
|
38256
38414
|
continue;
|
|
38257
|
-
var value = str.split(
|
|
38415
|
+
var value = str.split(getSeparator())[0];
|
|
38258
38416
|
if (values[value])
|
|
38259
38417
|
return value;
|
|
38260
38418
|
values[value] = true;
|
|
@@ -38279,7 +38437,7 @@ var FastEntryEditorBase = /** @class */ (function (_super) {
|
|
|
38279
38437
|
}
|
|
38280
38438
|
if (!survey_core__WEBPACK_IMPORTED_MODULE_1__.Helpers.isValueEmpty(str)) {
|
|
38281
38439
|
for (var i = 0; i < separatorCounter; i++) {
|
|
38282
|
-
text +=
|
|
38440
|
+
text += getSeparator();
|
|
38283
38441
|
}
|
|
38284
38442
|
text += str;
|
|
38285
38443
|
separatorCounter = 1;
|
|
@@ -39234,7 +39392,7 @@ var PropertyGridModel = /** @class */ (function () {
|
|
|
39234
39392
|
panel.collapse();
|
|
39235
39393
|
}
|
|
39236
39394
|
}
|
|
39237
|
-
if (focus) {
|
|
39395
|
+
if (focus && !question.isReadOnly) {
|
|
39238
39396
|
question.focus();
|
|
39239
39397
|
}
|
|
39240
39398
|
else {
|
|
@@ -40319,10 +40477,11 @@ var PropertyGridEditorDropdown = /** @class */ (function (_super) {
|
|
|
40319
40477
|
return true;
|
|
40320
40478
|
if (this.isLocaleProp(prop))
|
|
40321
40479
|
return false;
|
|
40322
|
-
if (!this.canRenderAsButtonGroup
|
|
40323
|
-
|
|
40324
|
-
|
|
40325
|
-
|
|
40480
|
+
if (!this.canRenderAsButtonGroup)
|
|
40481
|
+
return false;
|
|
40482
|
+
if (!choices || !Array.isArray(choices))
|
|
40483
|
+
return false;
|
|
40484
|
+
if (choices.length == 0 || choices.length > 4)
|
|
40326
40485
|
return false;
|
|
40327
40486
|
var charCount = 0;
|
|
40328
40487
|
for (var i = 0; i < choices.length; i++) {
|
|
@@ -44598,7 +44757,8 @@ var SelectionHistory = /** @class */ (function (_super) {
|
|
|
44598
44757
|
__webpack_require__.r(__webpack_exports__);
|
|
44599
44758
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
44600
44759
|
/* harmony export */ ObjType: () => (/* binding */ ObjType),
|
|
44601
|
-
/* harmony export */ SurveyHelper: () => (/* binding */ SurveyHelper)
|
|
44760
|
+
/* harmony export */ SurveyHelper: () => (/* binding */ SurveyHelper),
|
|
44761
|
+
/* harmony export */ getItemValueSeparator: () => (/* binding */ getItemValueSeparator)
|
|
44602
44762
|
/* harmony export */ });
|
|
44603
44763
|
/* harmony import */ var survey_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! survey-core */ "survey-core");
|
|
44604
44764
|
/* harmony import */ var survey_core__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(survey_core__WEBPACK_IMPORTED_MODULE_0__);
|
|
@@ -44607,6 +44767,10 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
44607
44767
|
|
|
44608
44768
|
|
|
44609
44769
|
|
|
44770
|
+
function getItemValueSeparator() {
|
|
44771
|
+
var res = survey_core__WEBPACK_IMPORTED_MODULE_0__.settings.itemValueSeparator;
|
|
44772
|
+
return !!res ? res : "|";
|
|
44773
|
+
}
|
|
44610
44774
|
var ObjType;
|
|
44611
44775
|
(function (ObjType) {
|
|
44612
44776
|
ObjType["Unknown"] = "unknown";
|
|
@@ -44848,6 +45012,17 @@ var SurveyHelper = /** @class */ (function () {
|
|
|
44848
45012
|
SurveyHelper.canSelectObj = function (obj) {
|
|
44849
45013
|
return !obj || obj["disableSelecting"] !== true;
|
|
44850
45014
|
};
|
|
45015
|
+
SurveyHelper.isChoiceItemPanel = function (panel) {
|
|
45016
|
+
return this.getChoiceIItemPanel(panel) !== null;
|
|
45017
|
+
};
|
|
45018
|
+
SurveyHelper.getChoiceIItemPanel = function (element) {
|
|
45019
|
+
while (!!element) {
|
|
45020
|
+
if (element.isPanel && !!element.choiceItem)
|
|
45021
|
+
return element;
|
|
45022
|
+
element = element.parent;
|
|
45023
|
+
}
|
|
45024
|
+
return null;
|
|
45025
|
+
};
|
|
44851
45026
|
SurveyHelper.warnNonSupported = function (name, newPropertyName) {
|
|
44852
45027
|
var outputText = (0,_utils_creator_utils__WEBPACK_IMPORTED_MODULE_2__.wrapTextByCurlyBraces)(name) + " is not supported in V2.";
|
|
44853
45028
|
if (!!newPropertyName) {
|
|
@@ -44905,7 +45080,7 @@ var SurveyHelper = /** @class */ (function () {
|
|
|
44905
45080
|
.map(function (row) {
|
|
44906
45081
|
return row.cells
|
|
44907
45082
|
.map(function (cell) { return cell.value || ""; })
|
|
44908
|
-
.join(
|
|
45083
|
+
.join(getItemValueSeparator())
|
|
44909
45084
|
.replace(/\|$/, "");
|
|
44910
45085
|
})
|
|
44911
45086
|
.join("\n");
|
|
@@ -44918,7 +45093,7 @@ var SurveyHelper = /** @class */ (function () {
|
|
|
44918
45093
|
text += "\n";
|
|
44919
45094
|
text += item.value;
|
|
44920
45095
|
if (item.pureText)
|
|
44921
|
-
text +=
|
|
45096
|
+
text += getItemValueSeparator() + item.pureText;
|
|
44922
45097
|
});
|
|
44923
45098
|
return text;
|
|
44924
45099
|
};
|
|
@@ -44930,7 +45105,7 @@ var SurveyHelper = /** @class */ (function () {
|
|
|
44930
45105
|
for (var i = 0; i < texts.length; i++) {
|
|
44931
45106
|
if (!texts[i])
|
|
44932
45107
|
continue;
|
|
44933
|
-
var elements = texts[i].split(
|
|
45108
|
+
var elements = texts[i].split(getItemValueSeparator());
|
|
44934
45109
|
var valueItem = survey_core__WEBPACK_IMPORTED_MODULE_0__.Serializer.createClass(className);
|
|
44935
45110
|
properties.forEach(function (p, i) {
|
|
44936
45111
|
valueItem[p.name] = elements[i];
|
|
@@ -48840,6 +49015,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
48840
49015
|
/* harmony export */ getElementWrapperComponentData: () => (/* reexport safe */ _creator_base__WEBPACK_IMPORTED_MODULE_5__.getElementWrapperComponentData),
|
|
48841
49016
|
/* harmony export */ getElementWrapperComponentName: () => (/* reexport safe */ _creator_base__WEBPACK_IMPORTED_MODULE_5__.getElementWrapperComponentName),
|
|
48842
49017
|
/* harmony export */ getFirstNonTextElement: () => (/* reexport safe */ _utils_html_element_utils__WEBPACK_IMPORTED_MODULE_80__.getFirstNonTextElement),
|
|
49018
|
+
/* harmony export */ getItemValueSeparator: () => (/* reexport safe */ _survey_helper__WEBPACK_IMPORTED_MODULE_86__.getItemValueSeparator),
|
|
48843
49019
|
/* harmony export */ getItemValueWrapperComponentData: () => (/* reexport safe */ _creator_base__WEBPACK_IMPORTED_MODULE_5__.getItemValueWrapperComponentData),
|
|
48844
49020
|
/* harmony export */ getItemValueWrapperComponentName: () => (/* reexport safe */ _creator_base__WEBPACK_IMPORTED_MODULE_5__.getItemValueWrapperComponentName),
|
|
48845
49021
|
/* harmony export */ getLocString: () => (/* reexport safe */ _editorLocalization__WEBPACK_IMPORTED_MODULE_2__.getLocString),
|
|
@@ -49019,7 +49195,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
49019
49195
|
/* harmony import */ var survey_core__WEBPACK_IMPORTED_MODULE_116__ = __webpack_require__(/*! survey-core */ "survey-core");
|
|
49020
49196
|
/* harmony import */ var survey_core__WEBPACK_IMPORTED_MODULE_116___default = /*#__PURE__*/__webpack_require__.n(survey_core__WEBPACK_IMPORTED_MODULE_116__);
|
|
49021
49197
|
var Version;
|
|
49022
|
-
Version = "".concat("2.3.
|
|
49198
|
+
Version = "".concat("2.3.11");
|
|
49023
49199
|
//should be loaded before other styles for easier override
|
|
49024
49200
|
|
|
49025
49201
|
|
|
@@ -49141,7 +49317,7 @@ Version = "".concat("2.3.10");
|
|
|
49141
49317
|
|
|
49142
49318
|
|
|
49143
49319
|
|
|
49144
|
-
(0,survey_core__WEBPACK_IMPORTED_MODULE_116__.checkLibraryVersion)("".concat("2.3.
|
|
49320
|
+
(0,survey_core__WEBPACK_IMPORTED_MODULE_116__.checkLibraryVersion)("".concat("2.3.11"), "survey-creator-core");
|
|
49145
49321
|
|
|
49146
49322
|
})();
|
|
49147
49323
|
|