survey-js-ui 2.5.24 → 2.5.25
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/fesm/survey-js-ui.mjs +11 -4
- package/fesm/survey-js-ui.mjs.map +1 -1
- package/package.json +2 -2
- package/survey-js-ui.js +15 -4
- package/survey-js-ui.js.map +1 -1
- package/survey-js-ui.min.js +2 -2
- package/typings/survey-react-ui/src/components/paneldynamic-actions/paneldynamic-add-btn.d.ts +1 -0
package/fesm/survey-js-ui.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* surveyjs - Survey JavaScript library v2.5.
|
|
2
|
+
* surveyjs - Survey JavaScript library v2.5.25
|
|
3
3
|
* Copyright (c) 2015-2026 Devsoft Baltic OÜ - http://surveyjs.io/
|
|
4
4
|
* License: MIT (http://www.opensource.org/licenses/mit-license.php)
|
|
5
5
|
*/
|
|
@@ -6258,11 +6258,16 @@ class SurveyQuestionPanelDynamicAction extends ReactSurveyElement {
|
|
|
6258
6258
|
get question() {
|
|
6259
6259
|
return (this.props.item && this.props.item.data.question) || this.props.data.question;
|
|
6260
6260
|
}
|
|
6261
|
+
get isActionEnabled() {
|
|
6262
|
+
return !this.props.item || this.props.item.enabled !== false;
|
|
6263
|
+
}
|
|
6261
6264
|
}
|
|
6262
6265
|
class SurveyQuestionPanelDynamicAddButton extends SurveyQuestionPanelDynamicAction {
|
|
6263
6266
|
constructor() {
|
|
6264
6267
|
super(...arguments);
|
|
6265
6268
|
this.handleClick = (event) => {
|
|
6269
|
+
if (!this.isActionEnabled)
|
|
6270
|
+
return;
|
|
6266
6271
|
this.question.addPanelUI();
|
|
6267
6272
|
};
|
|
6268
6273
|
}
|
|
@@ -6270,7 +6275,7 @@ class SurveyQuestionPanelDynamicAddButton extends SurveyQuestionPanelDynamicActi
|
|
|
6270
6275
|
if (!this.question.canAddPanel)
|
|
6271
6276
|
return null;
|
|
6272
6277
|
const btnText = this.renderLocString(this.question.locAddPanelText);
|
|
6273
|
-
return (_$1("button", { type: "button", id: this.question.addButtonId, className: this.question.getAddButtonCss(), onClick: this.handleClick },
|
|
6278
|
+
return (_$1("button", { type: "button", id: this.question.addButtonId, className: this.question.getAddButtonCss(), onClick: this.handleClick, disabled: !this.isActionEnabled },
|
|
6274
6279
|
_$1("span", { className: this.question.cssClasses.buttonAddText }, btnText)));
|
|
6275
6280
|
}
|
|
6276
6281
|
}
|
|
@@ -6282,13 +6287,15 @@ class SurveyQuestionPanelDynamicRemoveButton extends SurveyQuestionPanelDynamicA
|
|
|
6282
6287
|
constructor() {
|
|
6283
6288
|
super(...arguments);
|
|
6284
6289
|
this.handleClick = (event) => {
|
|
6290
|
+
if (!this.isActionEnabled)
|
|
6291
|
+
return;
|
|
6285
6292
|
this.question.removePanelUI(this.data.panel);
|
|
6286
6293
|
};
|
|
6287
6294
|
}
|
|
6288
6295
|
renderElement() {
|
|
6289
6296
|
const btnText = this.renderLocString(this.question.locRemovePanelText);
|
|
6290
6297
|
const id = this.question.getPanelRemoveButtonId(this.data.panel);
|
|
6291
|
-
return (_$1("button", { id: id, className: this.question.getPanelRemoveButtonCss(), onClick: this.handleClick, type: "button" },
|
|
6298
|
+
return (_$1("button", { id: id, className: this.question.getPanelRemoveButtonCss(), onClick: this.handleClick, disabled: !this.isActionEnabled, type: "button" },
|
|
6292
6299
|
_$1("span", { className: this.question.cssClasses.buttonRemoveText }, btnText),
|
|
6293
6300
|
_$1("span", { className: this.question.cssClasses.iconRemove })));
|
|
6294
6301
|
}
|
|
@@ -6585,7 +6592,7 @@ SurveyModel.prototype["render"] = function (element = null) {
|
|
|
6585
6592
|
}
|
|
6586
6593
|
};
|
|
6587
6594
|
const preact = React;
|
|
6588
|
-
checkLibraryVersion(`${"2.5.
|
|
6595
|
+
checkLibraryVersion(`${"2.5.25"}`, "survey-js-ui");
|
|
6589
6596
|
|
|
6590
6597
|
export { CharacterCounterComponent, O as Children, x$3 as Component, ComponentsContainer, k$3 as Fragment, Header, HeaderCell, HeaderMobile, List, ListItemContent, ListItemGroup, LoadingIndicatorComponent, LogoImage, MatrixRow, NotifierComponent, Popup, PopupModal, PopupSurvey, N as PureComponent, QuestionErrorComponent, RatingDropdownItem, RatingItem, RatingItemSmiley, RatingItemStar, ReactElementFactory, ReactQuestionFactory, ReactSurveyElement, ReactSurveyElementsWrapper, Scroll, Skeleton, SliderLabelItem, Cn as StrictMode, Survey, SurveyActionBar, SurveyElementBase, SurveyElementErrors, SurveyFileChooseButton, SurveyFileItem, SurveyFilePreview, SurveyFlowPanel, SurveyHeader, SurveyLocStringEditor, SurveyLocStringViewer, SurveyNavigationBase, SurveyNavigationButton, SurveyPage, SurveyPanel, SurveyProgress, SurveyProgressButtons, SurveyProgressToc, SurveyQuestion, SurveyQuestionAndErrorsCell, SurveyQuestionBoolean, SurveyQuestionBooleanCheckbox, SurveyQuestionBooleanRadio, SurveyQuestionButtonGroup, SurveyQuestionButtonGroupDropdown, SurveyQuestionCheckbox, SurveyQuestionCheckboxItem, SurveyQuestionComment, SurveyQuestionCommentItem, SurveyQuestionComposite, SurveyQuestionCustom, SurveyQuestionDropdown, SurveyQuestionDropdownBase, SurveyQuestionDropdownSelect, SurveyQuestionElementBase, SurveyQuestionEmpty, SurveyQuestionExpression, SurveyQuestionFile, SurveyQuestionHtml, SurveyQuestionImage, SurveyQuestionImageMap, SurveyQuestionImagePicker, SurveyQuestionMatrix, SurveyQuestionMatrixCell, SurveyQuestionMatrixDetailButton, SurveyQuestionMatrixDropdown, SurveyQuestionMatrixDropdownBase, SurveyQuestionMatrixDropdownCell, SurveyQuestionMatrixDynamic, SurveyQuestionMatrixDynamicAddButton, SurveyQuestionMatrixDynamicDragDropIcon, SurveyQuestionMatrixDynamicRemoveButton, SurveyQuestionMatrixRow, SurveyQuestionMultipleText, SurveyQuestionOptionItem, SurveyQuestionPanelDynamic, SurveyQuestionPanelDynamicAddButton, SurveyQuestionPanelDynamicNextButton, SurveyQuestionPanelDynamicPrevButton, SurveyQuestionPanelDynamicProgressText, SurveyQuestionPanelDynamicRemoveButton, SurveyQuestionRadioItem, SurveyQuestionRadiogroup, SurveyQuestionRanking, SurveyQuestionRankingItem, SurveyQuestionRankingItemContent, SurveyQuestionRating, SurveyQuestionRatingDropdown, SurveyQuestionSignaturePad, SurveyQuestionSlider, SurveyQuestionTagbox, SurveyQuestionTagboxItem, SurveyQuestionText, SurveyRow, SurveyTimerPanel, SurveyWindow, P as Suspense, B as SuspenseList, SvgBundleComponent, SvgIcon, TagboxFilterString, TitleActions, TitleElement, attachKey2click, _n as cloneElement, Q$2 as createContext, _$1 as createElement, dn as createFactory, $ as createPortal, b$1 as createRef, Sn as findDOMNode, En as flushSync, D as forwardRef, tn as hydrate, pn as isFragment, yn as isMemo, mn as isValidElement, z as lazy, M as memo, preact, nn as render, renderPopupSurvey, renderSurvey, R as startTransition, bn as unmountComponentAtNode, gn as unstable_batchedUpdates, q$2 as useCallback, x$2 as useContext, P$2 as useDebugValue, w as useDeferredValue, y as useEffect, g$2 as useId, F$2 as useImperativeHandle, I as useInsertionEffect, _ as useLayoutEffect, T$2 as useMemo, h as useReducer, A$2 as useRef, d as useState, C as useSyncExternalStore, k as useTransition, vn as version };
|
|
6591
6598
|
//# sourceMappingURL=survey-js-ui.mjs.map
|