survey-creator-react 3.0.0-beta.2 → 3.0.0-beta.4

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.
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * SurveyJS Creator v3.0.0-beta.2
2
+ * SurveyJS Creator v3.0.0-beta.4
3
3
  * (c) 2015-2026 Devsoft Baltic OÜ - http://surveyjs.io/
4
4
  * Github: https://github.com/surveyjs/survey-creator
5
5
  * License: https://surveyjs.io/Licenses#SurveyCreator
@@ -7,8 +7,8 @@
7
7
 
8
8
  import * as React from 'react';
9
9
  import { createElement, Fragment } from 'react';
10
- import { ReactElementFactory, SurveyElementBase, attachKey2click, SvgIcon, Survey, ReactQuestionFactory, SurveyLocStringViewer, SvgBundleComponent, PopupModal, SurveyActionBar, NotifierComponent, TitleElement, ReactSurveyElementsWrapper, LoadingIndicatorComponent, SurveyPage, Popup, LogoImage, SurveyQuestionElementBase, SurveyQuestion, SurveyPanel, Scroll, CharacterCounterComponent, SurveyQuestionDropdown, SurveyHeader, List, SurveyQuestionText } from 'survey-react-ui';
11
- import { SurveyCreatorModel, assign, RowViewModel, QuestionAdornerViewModel, QuestionDropdownAdornerViewModel, QuestionImageAdornerViewModel, QuestionRatingAdornerViewModel, PageAdorner, LogoImageViewModel, editorLocalization, ItemValueWrapperViewModel, ImageItemValueWrapperViewModel, MatrixCellWrapperViewModel, SurveyResultsModel, ToolboxToolViewModel, editableStringRendererName, StringEditorViewModelBase, initLogicOperator, PageNavigatorViewModel } from 'survey-creator-core';
10
+ import { ReactElementFactory, SurveyElementBase, attachKey2click, SvgIcon, Survey, ReactQuestionFactory, SurveyLocStringViewer, SvgBundleComponent, PopupModal, SurveyActionBar, NotifierComponent, TitleElement, ReactSurveyElementsWrapper, LoadingIndicatorComponent, SurveyPage, LogoImage, SurveyQuestionElementBase, SurveyQuestion, SurveyPanel, Popup, Scroll, CharacterCounterComponent, SurveyQuestionDropdown, SurveyHeader, List, SurveyQuestionText } from 'survey-react-ui';
11
+ import { SurveyCreatorModel, assign, RowViewModel, QuestionAdornerViewModel, QuestionDropdownAdornerViewModel, QuestionImageAdornerViewModel, QuestionRatingAdornerViewModel, PageAdorner, PanelAdornerViewModel, LogoImageViewModel, editorLocalization, ItemValueWrapperViewModel, ImageItemValueWrapperViewModel, MatrixCellWrapperViewModel, SurveyResultsModel, ToolboxToolViewModel, editableStringRendererName, StringEditorViewModelBase, initLogicOperator, PageNavigatorViewModel } from 'survey-creator-core';
12
12
  export { PropertyGridEditorCollection, SurveyLogic, SurveyLogicUI, SurveyQuestionEditorDefinition, ToolboxToolViewModel, editorLocalization, localization, settings, svgBundle } from 'survey-creator-core';
13
13
  import * as ReactDOM from 'react-dom';
14
14
  import { CssClassBuilder, settings, RendererFactory, unwrap, checkLibraryVersion } from 'survey-core';
@@ -64,10 +64,10 @@ class TabbedMenuItemWrapper extends SurveyElementBase {
64
64
  if (this.item.css) {
65
65
  css += " " + this.item.css;
66
66
  }
67
- css += (!this.item.isVisible ? " sv-action--hidden" : "");
67
+ css += (!this.item.isVisible ? " svc-tabbed-menu-item-container--hidden" : "");
68
68
  const component = ReactElementFactory.Instance.createElement(this.item.component || "svc-tabbed-menu-item", { item: this.item });
69
69
  return (React.createElement("span", { key: this.item.id, className: css, ref: this.ref },
70
- React.createElement("div", { className: "sv-action__content" }, component)));
70
+ React.createElement("div", { className: "svc-tabbed-menu-item-container__content" }, component)));
71
71
  }
72
72
  componentDidMount() {
73
73
  super.componentDidMount();
@@ -205,7 +205,8 @@ class SurveyCreatorComponent extends SurveyElementBase {
205
205
  : ReactElementFactory.Instance.createElement(tab.componentContent, {
206
206
  creator: creator,
207
207
  survey: creator.survey,
208
- data: tab.data.model
208
+ data: tab.data.model,
209
+ model: tab.data.model
209
210
  });
210
211
  const className = "svc-creator-tab" + (creator.toolboxLocation == "right" ? " svc-creator__toolbox--right" : "");
211
212
  return (React.createElement("div", { role: "tabpanel", key: tab.id, id: "scrollableDiv-" + tab.id, "aria-labelledby": "tab-" + tab.id, className: className }, component));
@@ -598,8 +599,9 @@ class QuestionDropdownAdornerComponent extends QuestionAdornerComponent {
598
599
  isChecked: this.question.value === item.value
599
600
  }), this.question, item))))),
600
601
  this.dropdownModel.needToCollapse ?
601
- React.createElement(ActionButton, { click: this.dropdownModel.switchCollapse, text: this.dropdownModel.getButtonText(), allowBubble: true }) :
602
- null)));
602
+ ReactElementFactory.Instance.createElement("sv-action-bar-item", {
603
+ item: this.dropdownModel.collapseAction,
604
+ }) : null)));
603
605
  }
604
606
  }
605
607
  ReactElementFactory.Instance.registerElement("svc-dropdown-question", (props) => {
@@ -630,8 +632,7 @@ class QuestionImageAdornerComponent extends QuestionAdornerComponent {
630
632
  React.createElement(LoadingIndicatorComponent, null))));
631
633
  }
632
634
  renderChooseButton() {
633
- return (React.createElement("div", { className: "svc-image-question-controls" }, this.model.allowEdit ? attachKey2click(React.createElement("span", { className: "svc-context-button", onClick: () => this.imageModel.chooseFile(this.imageModel) },
634
- React.createElement(SvgIcon, { size: "auto", iconName: "icon-choosefile" }))) : null));
635
+ return React.createElement(SurveyActionBar, { model: this.imageModel.imageActionsContainer });
635
636
  }
636
637
  renderElementPlaceholder() {
637
638
  return this.imageModel.isUploading ? this.renderLoadingPlaceholder() : this.renderChooseButton();
@@ -682,11 +683,7 @@ class QuestionRatingAdornerComponent extends CreatorModelElement {
682
683
  const model = this.ratingModel;
683
684
  return (React.createElement(React.Fragment, null,
684
685
  React.createElement("div", { className: "svc-rating-question-content" },
685
- React.createElement("div", { className: model.controlsClassNames },
686
- model.allowRemove ? attachKey2click(React.createElement("span", { role: "button", className: model.removeClassNames, "aria-label": model.removeTooltip, onClick: () => model.removeItem(model) },
687
- React.createElement(SvgIcon, { size: "auto", iconName: "icon-remove_16x16", title: model.removeTooltip }))) : null,
688
- model.allowAdd ? attachKey2click(React.createElement("span", { role: "button", className: model.addClassNames, "aria-label": model.addTooltip, onClick: () => model.addItem(model) },
689
- React.createElement(SvgIcon, { size: "auto", iconName: "icon-add_16x16", title: model.addTooltip }))) : null),
686
+ React.createElement(SurveyActionBar, { model: model.rateActionsContainer }),
690
687
  this.props.element)));
691
688
  }
692
689
  }
@@ -859,31 +856,24 @@ ReactElementFactory.Instance.registerElement("svc-page", (props) => {
859
856
 
860
857
  class AddQuestionButtonComponent extends SurveyElementBase {
861
858
  get model() {
862
- return this.props.item.data;
859
+ return this.item.data;
860
+ }
861
+ get item() {
862
+ return this.props.item;
863
+ }
864
+ getStateElement() {
865
+ return this.item;
863
866
  }
864
867
  renderTypeSelector() {
865
- const questionTypeSelectorModel = this.model.questionTypeSelectorModel;
866
- return attachKey2click(React.createElement("button", { type: "button", onClick: (e) => {
867
- e.stopPropagation();
868
- questionTypeSelectorModel.action();
869
- }, className: "svc-element__question-type-selector", title: this.model.addNewQuestionText, role: "button" },
870
- React.createElement("span", { className: "svc-element__question-type-selector-icon" },
871
- React.createElement(SvgIcon, { iconName: questionTypeSelectorModel.iconName, size: "auto", title: this.model.addNewQuestionText })),
872
- this.props.renderPopup === undefined || this.props.renderPopup ?
873
- React.createElement(Popup, { model: questionTypeSelectorModel.popupModel })
874
- : null));
868
+ return React.createElement("div", { className: this.item.cssClasses.itemTypeSelector }, ReactElementFactory.Instance.createElement("sv-action-bar-item-dropdown", { item: this.model.questionTypeSelectorModel }));
875
869
  }
876
870
  renderElement() {
877
- const addButtonClass = this.props.buttonClass || "svc-btn";
878
- return React.createElement(React.Fragment, null,
879
- attachKey2click(React.createElement("div", { className: "svc-element__add-new-question " + addButtonClass, onClick: (e) => {
880
- e.stopPropagation();
881
- this.model.addNewQuestion(this.model, new ReactMouseEvent(e));
882
- }, onMouseOver: (e) => this.model.hoverStopper && this.model.hoverStopper(e.nativeEvent, e.currentTarget) },
883
- React.createElement(SvgIcon, { className: "svc-panel__add-new-question-icon", iconName: "icon-add_24x24", size: "auto" }),
884
- React.createElement("span", { className: "svc-add-new-item-button__text" }, this.model.addNewQuestionText),
885
- this.props.renderPopup !== false ? this.renderTypeSelector() : null)),
886
- this.props.renderPopup === false ? this.renderTypeSelector() : null);
871
+ return React.createElement(React.Fragment, null, attachKey2click(React.createElement("div", { className: this.item.getActionBarItemCss(), onClick: (e) => {
872
+ e.stopPropagation();
873
+ this.model.addNewQuestion(this.model, new ReactMouseEvent(e));
874
+ }, onMouseOver: (e) => this.model.hoverStopper && this.model.hoverStopper(e.nativeEvent, e.currentTarget) },
875
+ React.createElement("span", { className: this.item.getActionBarItemTitleCss() }, this.model.addNewQuestionText),
876
+ this.renderTypeSelector())));
887
877
  }
888
878
  }
889
879
  ReactElementFactory.Instance.registerElement("svc-add-new-question-btn", (props) => {
@@ -898,23 +888,17 @@ class PanelAdornerComponent extends QuestionAdornerComponent {
898
888
  return (React.createElement("div", { className: "svc-panel__placeholder_frame-wrapper" },
899
889
  React.createElement("div", { className: "svc-panel__placeholder_frame" },
900
890
  React.createElement("div", { className: "svc-panel__placeholder" }, this.model.placeholderText),
901
- this.model.showAddQuestionButton ? attachKey2click(React.createElement("div", { className: "svc-panel__add-new-question svc-action-button", onClick: (e) => {
902
- e.stopPropagation();
903
- this.model.addNewQuestion();
904
- } },
905
- React.createElement(SvgIcon, { className: "svc-panel__add-new-question-icon", iconName: "icon-add_24x24", size: "auto" }),
906
- React.createElement("span", { className: "svc-add-new-item-button__text" }, this.model.addNewQuestionText))) : null)));
891
+ this.model.showAddQuestionButton ? React.createElement(SurveyActionBar, { model: this.model.addQuestionActionsContainer }) : null)));
907
892
  }
908
893
  disableTabStop() {
909
894
  return true;
910
895
  }
896
+ createQuestionViewModel(props) {
897
+ return new PanelAdornerViewModel(props.componentData, props.question, null);
898
+ }
911
899
  renderFooter() {
912
900
  return (React.createElement(React.Fragment, null,
913
- !this.model.isEmptyElement && this.model.element.isPanel && this.model.showAddQuestionButton ? (React.createElement("div", { className: "svc-panel__add-new-question-container" },
914
- React.createElement("div", { className: "svc-panel__question-type-selector-popup" },
915
- React.createElement(Popup, { model: this.model.questionTypeSelectorModel.popupModel })),
916
- React.createElement("div", { className: "svc-panel__add-new-question-wrapper" },
917
- React.createElement(AddQuestionButtonComponent, { item: { data: this.model }, buttonClass: "svc-action-button", renderPopup: false })))) : null,
901
+ !this.model.isEmptyElement && this.model.element.isPanel && this.model.showAddQuestionButton ? (React.createElement(SurveyActionBar, { model: this.model.addQuestionActionsContainer, handleClick: false })) : null,
918
902
  super.renderFooter()));
919
903
  }
920
904
  }
@@ -944,18 +928,8 @@ class LogoImageComponent extends CreatorModelElement {
944
928
  super.componentDidMount();
945
929
  this.model.root = this.rootRef.current;
946
930
  }
947
- renderChooseButton() {
948
- return attachKey2click(React.createElement("span", { className: "svc-context-button", onClick: () => this.model.chooseFile(this.model) },
949
- React.createElement(SvgIcon, { size: "auto", iconName: "icon-choosefile" })));
950
- }
951
- renderClearButton() {
952
- return attachKey2click(React.createElement("span", { className: "svc-context-button svc-context-button--danger", onClick: () => this.model.remove(this.model) },
953
- React.createElement(SvgIcon, { size: "auto", iconName: "icon-clear" })));
954
- }
955
931
  renderButtons() {
956
- return (React.createElement("div", { className: "svc-context-container svc-logo-image-controls" },
957
- this.renderChooseButton(),
958
- this.renderClearButton()));
932
+ return React.createElement(SurveyActionBar, { model: this.model.actionsContainer });
959
933
  }
960
934
  renderImage() {
961
935
  return React.createElement("div", { className: this.model.containerCss },
@@ -1116,18 +1090,18 @@ class ItemValueAdornerComponent extends CreatorModelElement {
1116
1090
  super.componentWillUnmount();
1117
1091
  this.props.item.setRootElement(undefined);
1118
1092
  }
1093
+ renderButton(action) {
1094
+ return ReactElementFactory.Instance.createElement("sv-action-bar-item", {
1095
+ item: action,
1096
+ });
1097
+ }
1119
1098
  render() {
1120
1099
  this.model.item = this.props.item;
1121
- const button = this.model.allowAdd ? (attachKey2click(React.createElement("span", { role: "button", className: "svc-item-value-controls__button svc-item-value-controls__add", "aria-label": this.model.tooltip, onClick: () => {
1122
- this.model.add(this.model);
1123
- this.model.isNew = false;
1124
- } },
1125
- React.createElement(SvgIcon, { size: "auto", iconName: "icon-add_16x16", title: this.model.tooltip })))) : (React.createElement(React.Fragment, null,
1100
+ const button = this.model.allowAdd ? (this.renderButton(this.model.addAction)) : (React.createElement(React.Fragment, null,
1126
1101
  " ",
1127
- this.model.isDraggable ? (React.createElement("span", { className: "svc-item-value-controls__button svc-item-value-controls__drag" },
1102
+ this.model.isDraggable ? (React.createElement("span", { className: "svc-item-value-controls__drag" },
1128
1103
  React.createElement(SvgIcon, { className: "svc-item-value-controls__drag-icon", size: "auto", iconName: "icon-drag-24x24", title: this.model.dragTooltip }))) : null,
1129
- this.model.allowRemove ? attachKey2click(React.createElement("span", { role: "button", className: "svc-item-value-controls__button svc-item-value-controls__remove", "aria-label": this.model.tooltip, onClick: () => this.model.remove(this.model) },
1130
- React.createElement(SvgIcon, { size: "auto", iconName: "icon-remove_16x16", title: this.model.tooltip }))) : null));
1104
+ this.model.allowRemove ? this.renderButton(this.model.removeAction) : null));
1131
1105
  const itemkey = this.props.element.key + (this.model.allowAdd ? "_new" : "");
1132
1106
  return (React.createElement(React.Fragment, null,
1133
1107
  React.createElement("div", { ref: this.rootRef, className: "svc-item-value-wrapper" +
@@ -1145,16 +1119,11 @@ class ItemValueAdornerComponent extends CreatorModelElement {
1145
1119
  renderPanelAction() {
1146
1120
  if (!this.model.canShowPanel())
1147
1121
  return null;
1148
- const isShowPanel = this.model.showPanel;
1149
- const icName = isShowPanel ? "icon-collapsepanel-16x16" : "icon-expandpanel-16x16";
1150
- const btn = attachKey2click(React.createElement("span", { role: "button", className: "svc-item-value-controls__button svc-item-value-controls__add svc-choice-elements-button", onClick: () => {
1151
- this.model.togglePanel();
1152
- } },
1153
- React.createElement(SvgIcon, { size: "auto", iconName: icName })));
1122
+ const btn = this.renderButton(this.model.expandPanelAction);
1154
1123
  return React.createElement("div", { className: "svc-item-value-controls svc-choice-elements-button-container" }, btn);
1155
1124
  }
1156
1125
  renderPanel() {
1157
- if (!this.model.showPanel)
1126
+ if (!this.model.renderedShowPanel)
1158
1127
  return null;
1159
1128
  const creator = this.model.creator;
1160
1129
  const survey = creator.survey;
@@ -1202,13 +1171,11 @@ class ImageItemValueAdornerComponent extends CreatorModelElement {
1202
1171
  React.createElement(LoadingIndicatorComponent, null));
1203
1172
  }
1204
1173
  renderNewItemControls() {
1205
- const addButton = attachKey2click(React.createElement("span", { className: this.model.addButtonCss, onClick: () => this.model.chooseNewFile(this.model) }, this.model.showChooseButtonAsIcon ?
1206
- React.createElement(SvgIcon, { size: "auto", iconName: "icon-add-lg", title: this.model.addFileTitle }) :
1207
- React.createElement("span", null, this.model.chooseImageText)));
1174
+ const controls = React.createElement(SurveyActionBar, { model: this.model.actionsContainer });
1208
1175
  const placeholder = this.model.showPlaceholder ? React.createElement("span", { className: "svc-image-item-value__placeholder" }, this.model.placeholderText) : null;
1209
1176
  return React.createElement(React.Fragment, null,
1210
1177
  placeholder,
1211
- addButton);
1178
+ controls);
1212
1179
  }
1213
1180
  render() {
1214
1181
  this.model.item = this.props.item;
@@ -1229,17 +1196,7 @@ class ImageItemValueAdornerComponent extends CreatorModelElement {
1229
1196
  else {
1230
1197
  content = (React.createElement(React.Fragment, null,
1231
1198
  React.createElement("div", { className: "svc-image-item-value__item" }, this.props.element),
1232
- this.model.isDraggable && this.model.canRenderControls ?
1233
- React.createElement("span", { className: "svc-context-button svc-image-item-value-controls__drag-area-indicator", onPointerDown: (event) => this.model.onPointerDown(event) },
1234
- React.createElement(SvgIcon, { size: "auto", iconName: "icon-drag-24x24" }))
1235
- : null,
1236
- this.model.canRenderControls ?
1237
- React.createElement("div", { className: "svc-context-container svc-image-item-value-controls" },
1238
- this.model.allowRemove && !this.model.isUploading ? attachKey2click(React.createElement("span", { className: "svc-context-button", onClick: () => this.model.chooseFile(this.model) },
1239
- React.createElement(SvgIcon, { role: "button", size: "auto", iconName: "icon-choosefile", title: this.model.selectFileTitle }))) : null,
1240
- this.model.allowRemove && !this.model.isUploading ? attachKey2click(React.createElement("span", { className: "svc-context-button svc-context-button--danger", onClick: () => this.model.remove(this.model) },
1241
- React.createElement(SvgIcon, { role: "button", size: "auto", iconName: "icon-delete", title: this.model.removeFileTitle }))) : null)
1242
- : null));
1199
+ this.model.canRenderControls ? React.createElement(SurveyActionBar, { model: this.model.topActionsContainer }) : null));
1243
1200
  }
1244
1201
  return (React.createElement("div", { ref: this.rootRef, className: this.model.getRootCss(), key: this.props.element.key, "data-sv-drop-target-item-value": this.model.isDraggable ? this.model.item.value : undefined, onPointerDown: (event) => this.model.onPointerDown(event), onDragStart: this.preventDragHandler, onDrop: this.model.onDrop, onDragEnter: this.model.onDragEnter, onDragOver: this.model.onDragOver, onDragLeave: this.model.onDragLeave },
1245
1202
  React.createElement("div", { className: "svc-image-item-value-wrapper__ghost", style: imageStyle }),
@@ -1254,6 +1211,15 @@ class ImageItemValueAdornerComponent extends CreatorModelElement {
1254
1211
  content)));
1255
1212
  }
1256
1213
  }
1214
+ class ImageItemDragAction extends SurveyElementBase {
1215
+ renderElement() {
1216
+ return React.createElement("span", { className: this.props.item.getActionBarItemCss(), onPointerDown: (event) => this.props.item.data.model.onPointerDown(event) },
1217
+ React.createElement(SvgIcon, { size: "auto", iconName: this.props.item.iconName, className: this.props.item.cssClasses.itemIcon }));
1218
+ }
1219
+ }
1220
+ ReactElementFactory.Instance.registerElement("svc-image-item-drag-action", (props) => {
1221
+ return React.createElement(ImageItemDragAction, props);
1222
+ });
1257
1223
  ReactElementFactory.Instance.registerElement("svc-image-item-value", (props) => {
1258
1224
  return React.createElement(ImageItemValueAdornerComponent, props);
1259
1225
  });
@@ -1287,8 +1253,9 @@ class MatrixCellAdornerComponent extends CreatorModelElement {
1287
1253
  render() {
1288
1254
  let controls = null;
1289
1255
  if (!!this.model.isSupportCellEditor) {
1290
- controls = React.createElement("div", { className: "svc-matrix-cell__question-controls" }, attachKey2click(React.createElement("span", { className: "svc-matrix-cell__question-controls-button svc-context-button", onClick: (event) => this.model.editQuestion(this.model, event) },
1291
- React.createElement(SvgIcon, { size: "auto", iconName: "icon-edit" }))));
1256
+ controls = React.createElement("div", { className: "svc-matrix-cell__question-controls" }, ReactElementFactory.Instance.createElement("sv-action-bar-item", {
1257
+ item: this.model.editAction,
1258
+ }));
1292
1259
  }
1293
1260
  return (React.createElement("div", { className: "svc-matrix-cell", tabIndex: -1, key: this.props.element.key, onClick: (e) => !this.props.question && this.model.selectContext(this.model, e), onMouseOut: e => this.model.hover(e.nativeEvent, e.currentTarget), onMouseOver: e => this.model.hover(e.nativeEvent, e.currentTarget) },
1294
1261
  React.createElement("div", { className: "svc-matrix-cell--selected" + (this.model.isSelected ? " svc-visible" : "") }),
@@ -1406,7 +1373,7 @@ class SurveyCreatorToolboxTool extends CreatorModelElement {
1406
1373
  });
1407
1374
  return (React.createElement("div", { className: item.css, key: item.id, ref: this.rootRef },
1408
1375
  (item.needSeparator && !this.creator.toolbox.showCategoryTitles) ? (React.createElement("div", { className: "svc-toolbox__category-separator" })) : null,
1409
- React.createElement("div", { className: "svc-toolbox__tool-content sv-action__content", onPointerDown: (event) => {
1376
+ React.createElement("div", { className: "svc-toolbox__tool-content", onPointerDown: (event) => {
1410
1377
  event.persist();
1411
1378
  this.model.onPointerDown(event);
1412
1379
  } }, itemComponent)));
@@ -1778,11 +1745,10 @@ class TabButtonComponent extends SurveyElementBase {
1778
1745
  const model = this.props.model;
1779
1746
  if (!model.visible)
1780
1747
  return null;
1781
- const button = attachKey2click(React.createElement("div", { className: model.buttonClassName, title: model.tooltip, onClick: () => { model.action(); } },
1782
- React.createElement("div", { className: "svc-menu-action__icon" },
1783
- React.createElement("div", { className: "svc-menu-action__icon-container" },
1784
- React.createElement(SvgIcon, { iconName: model.iconName, size: "auto" })))), model);
1785
- return (React.createElement("div", { className: "svc-menu-action" }, button));
1748
+ const itemComponent = ReactElementFactory.Instance.createElement(this.props.model.component || "sv-action-bar-item", {
1749
+ item: this.props.model,
1750
+ });
1751
+ return (React.createElement("div", { className: "svc-sidebar-tabs__item" }, itemComponent));
1786
1752
  }
1787
1753
  }
1788
1754
 
@@ -1855,7 +1821,7 @@ class SideBarPropertyGridHeader extends SurveyElementBase {
1855
1821
  return this.objectSelectionAction;
1856
1822
  }
1857
1823
  renderElement() {
1858
- const button = attachKey2click(React.createElement("div", { className: this.objectSelectionAction.buttonClassName, onClick: () => this.objectSelectionAction.action() },
1824
+ const button = attachKey2click(React.createElement("div", { className: this.objectSelectionAction.getActionBarItemCss() + " svc-sidebar__header-object-selector", onClick: () => this.objectSelectionAction.action() },
1859
1825
  React.createElement("div", { className: "svc-sidebar__header-caption" },
1860
1826
  React.createElement("span", { className: "svc-sidebar__header-title" }, this.objectSelectionAction.title),
1861
1827
  React.createElement("span", { className: "svc-sidebar__header-subtitle" }, this.objectSelectionAction.tooltip))), this.props.model);
@@ -1953,6 +1919,26 @@ ReactElementFactory.Instance.registerElement("svc-side-bar", (props) => {
1953
1919
  return React.createElement(SidebarComponent, props);
1954
1920
  });
1955
1921
 
1922
+ class SideBarLaunchCard extends React.Component {
1923
+ render() {
1924
+ const model = this.props.model;
1925
+ if (!model)
1926
+ return null;
1927
+ return (React.createElement("div", { className: "spg-launch" },
1928
+ React.createElement("button", { className: "spg-launch__card", onClick: model.onClick },
1929
+ React.createElement("div", { className: "spg-launch__container" },
1930
+ React.createElement("div", { className: "spg-launch__text" }, model.title),
1931
+ React.createElement("div", { className: "spg-launch__text2" }, model.description)),
1932
+ React.createElement("div", { className: "spg-launch__icon" },
1933
+ React.createElement("div", { className: "spg-launch__chevron-right-16-x-16" },
1934
+ React.createElement("div", { className: "spg-launch__icon2" },
1935
+ React.createElement(SvgIcon, { size: "auto", iconName: "chevrondown-24x24" })))))));
1936
+ }
1937
+ }
1938
+ ReactElementFactory.Instance.registerElement("svc-side-bar-launch-card", (props) => {
1939
+ return React.createElement(SideBarLaunchCard, props);
1940
+ });
1941
+
1956
1942
  class TranslationLineSkeleton extends React.Component {
1957
1943
  render() {
1958
1944
  return (React.createElement("div", { className: "sd-translation-line-skeleton" }));
@@ -2193,10 +2179,8 @@ class SurveyPageNavigator extends CreatorModelElement {
2193
2179
  }
2194
2180
  componentDidMount() {
2195
2181
  super.componentDidMount();
2196
- if (this.props.pageEditMode !== "bypage") {
2197
- const el = this.containerRef.current;
2198
- this.model.attachToUI(el);
2199
- }
2182
+ const el = this.containerRef.current;
2183
+ this.model.attachToUI(el);
2200
2184
  }
2201
2185
  componentWillUnmount() {
2202
2186
  super.componentWillUnmount();
@@ -2204,14 +2188,8 @@ class SurveyPageNavigator extends CreatorModelElement {
2204
2188
  this.model.setScrollableContainer(undefined);
2205
2189
  }
2206
2190
  renderElement() {
2207
- let className = "svc-page-navigator__selector svc-page-navigator__button";
2208
- if (this.model.isPopupOpened)
2209
- className += " svc-page-navigator__button--pressed";
2210
2191
  return (React.createElement("div", { className: "svc-page-navigator", ref: this.containerRef, style: { display: this.model.visible ? "flex" : "none" } },
2211
- React.createElement("div", null,
2212
- attachKey2click(React.createElement("div", { role: "button", className: className, onClick: () => this.model.togglePageSelector(), title: this.model.pageSelectorCaption },
2213
- React.createElement(SvgIcon, { className: "svc-page-navigator__button-icon", iconName: this.model.icon, size: "auto", title: this.model.pageSelectorCaption }))),
2214
- React.createElement(Popup, { model: this.model.popupModel })),
2192
+ React.createElement("div", null, ReactElementFactory.Instance.createElement("sv-action-bar-item-dropdown", { item: this.model.selectorAction })),
2215
2193
  React.createElement("div", null, this.model.visibleItems.map((item) => (React.createElement(SurveyPageNavigatorItem, { key: item.id, item: item }))))));
2216
2194
  }
2217
2195
  }
@@ -2470,25 +2448,6 @@ ReactElementFactory.Instance.registerElement("svc-tab-json-editor-ace", (props)
2470
2448
  return React.createElement(TabJsonEditorAceComponent, props);
2471
2449
  });
2472
2450
 
2473
- class TabLogicAddButtonComponent extends SurveyElementBase {
2474
- get model() {
2475
- return this.props.button;
2476
- }
2477
- getStateElement() {
2478
- return this.model;
2479
- }
2480
- renderElement() {
2481
- const buttonClassName = "svc-logic-tab__content-action svc-btn" + ((this.model.enabled !== undefined && !this.model.enabled) ? " svc-logic-tab__content-action--disabled" : "");
2482
- return attachKey2click(React.createElement("div", { role: "button", onClick: (e) => {
2483
- e.stopPropagation();
2484
- this.model.action();
2485
- }, className: buttonClassName, title: this.model.title },
2486
- React.createElement("span", { className: "svc-btn__text" }, this.model.title)));
2487
- }
2488
- }
2489
- ReactElementFactory.Instance.registerElement("svc-tab-logic-add-button", (props) => {
2490
- return React.createElement(TabLogicAddButtonComponent, props);
2491
- });
2492
2451
  class TabLogicComponent extends SurveyElementBase {
2493
2452
  get model() {
2494
2453
  return this.props.data;
@@ -2504,21 +2463,26 @@ class TabLogicComponent extends SurveyElementBase {
2504
2463
  }
2505
2464
  renderViewContent() {
2506
2465
  const logicTabClassName = "svc-plugin-tab__content svc-logic-tab svc-logic-tab__content " + (this.model.hasItems ? "" : "svc-logic-tab--empty");
2507
- const addLogic = !this.model.readOnly ? React.createElement(TabLogicAddButtonComponent, { button: this.model.addNewButton }) : undefined;
2466
+ const actions = !this.model.readOnly ? React.createElement(SurveyActionBar, { model: this.model.contentActionsContainer }) : undefined;
2508
2467
  return (React.createElement(Fragment, null,
2509
2468
  React.createElement("div", { className: logicTabClassName }, this.model.hasItems ?
2510
2469
  (React.createElement(React.Fragment, null,
2511
2470
  React.createElement(Survey, { model: this.model.itemsSurvey }),
2512
- addLogic))
2471
+ actions))
2513
2472
  : (React.createElement("div", { className: "svc-logic-tab__content-empty" },
2514
2473
  React.createElement(SurfacePlaceholder, { name: "logic", placeholderTitleText: this.model.placeholderTitleText, placeholderDescriptionText: this.model.placeholderDescriptionText }),
2515
- addLogic)))));
2474
+ actions)))));
2516
2475
  }
2517
2476
  }
2518
2477
  ReactElementFactory.Instance.registerElement("svc-tab-logic", (props) => {
2519
2478
  return React.createElement(TabLogicComponent, props);
2520
2479
  });
2521
2480
 
2481
+ function simulatorShellStyle(overlayHeight) {
2482
+ return overlayHeight
2483
+ ? { ["--sv-popup-overlay-height"]: overlayHeight }
2484
+ : {};
2485
+ }
2522
2486
  class SurveySimulator extends SurveyElementBase {
2523
2487
  get model() {
2524
2488
  return this.props.model;
@@ -2526,8 +2490,21 @@ class SurveySimulator extends SurveyElementBase {
2526
2490
  getStateElement() {
2527
2491
  return this.model;
2528
2492
  }
2493
+ componentDidMount() {
2494
+ super.componentDidMount();
2495
+ this.model.queueSurveyLayoutRefresh();
2496
+ }
2497
+ componentDidUpdate(prevProps, prevState) {
2498
+ super.componentDidUpdate(prevProps, prevState);
2499
+ this.model.queueSurveyLayoutRefresh();
2500
+ }
2501
+ componentWillUnmount() {
2502
+ this.model.cancelSurveyLayoutRefresh();
2503
+ super.componentWillUnmount();
2504
+ }
2529
2505
  renderElement() {
2530
2506
  const mainSimulatorClass = this.model.getRootCss();
2507
+ const shellStyle = simulatorShellStyle(this.model.popupOverlayHeight);
2531
2508
  if (!this.model.survey) {
2532
2509
  return React.createElement("div", { className: mainSimulatorClass });
2533
2510
  }
@@ -2544,36 +2521,17 @@ class SurveySimulator extends SurveyElementBase {
2544
2521
  this.model.simulatorFrame.scale +
2545
2522
  ") translate(-50%, -50%)"
2546
2523
  } },
2547
- React.createElement("div", { className: "svd-simulator-content" },
2524
+ React.createElement("div", { className: "svd-simulator-content", style: shellStyle },
2548
2525
  React.createElement(Survey, { model: this.model.survey }))))));
2549
2526
  }
2550
2527
  else {
2551
2528
  return (React.createElement("div", { className: mainSimulatorClass },
2552
- React.createElement("div", { className: "svd-simulator-content" },
2529
+ React.createElement("div", { className: "svd-simulator-content", style: shellStyle },
2553
2530
  React.createElement(Survey, { model: this.model.survey }))));
2554
2531
  }
2555
2532
  }
2556
2533
  }
2557
2534
 
2558
- class TabPreviewTestSurveyAgainComponent extends SurveyElementBase {
2559
- get model() {
2560
- return this.props.model.testAgainAction;
2561
- }
2562
- getStateElement() {
2563
- return this.model;
2564
- }
2565
- renderElement() {
2566
- const buttonClassName = "svc-preview__test-again svc-btn";
2567
- return attachKey2click(React.createElement("div", { role: "button", onClick: (e) => {
2568
- e.stopPropagation();
2569
- this.model.action();
2570
- }, className: buttonClassName, title: this.model.title },
2571
- React.createElement("span", { className: "svc-btn__text" }, this.model.title)));
2572
- }
2573
- }
2574
- ReactElementFactory.Instance.registerElement("svc-complete-page", (props) => {
2575
- return React.createElement(TabPreviewTestSurveyAgainComponent, props);
2576
- });
2577
2535
  class TabPreviewSurveyComponent extends SurveyElementBase {
2578
2536
  constructor(props) {
2579
2537
  super(props);
@@ -2593,7 +2551,7 @@ class TabPreviewSurveyComponent extends SurveyElementBase {
2593
2551
  this.model.showResults ? React.createElement(SurveyResults, { survey: this.model.simulator.survey }) : null));
2594
2552
  }
2595
2553
  renderElement() {
2596
- const tabContentClassName = "svc-creator-tab__content svc-test-tab__content" + (this.model.isPageToolbarVisible ? " svc-creator-tab__content--with-toolbar" : "");
2554
+ const tabContentClassName = "svc-creator-tab__content svc-test-tab__content " + this.model.tabContentAdditionalCss;
2597
2555
  return (React.createElement("div", { className: tabContentClassName },
2598
2556
  this.model.simulator.survey.isEmpty ? this.renderPlaceholder() : this.renderSimulator(),
2599
2557
  this.getBottomToolbar()));
@@ -2643,7 +2601,7 @@ class TabThemeSurveyComponent extends SurveyElementBase {
2643
2601
  this.model.showResults ? React.createElement(SurveyResults, { survey: this.model.simulator.survey }) : null));
2644
2602
  }
2645
2603
  renderElement() {
2646
- const tabContentClassName = "svc-creator-tab__content svc-test-tab__content" + (this.model.isPageToolbarVisible ? " svc-creator-tab__content--with-toolbar" : "");
2604
+ const tabContentClassName = "svc-creator-tab__content svc-test-tab__content " + this.model.tabContentAdditionalCss;
2647
2605
  return (React.createElement("div", { className: tabContentClassName },
2648
2606
  this.model.simulator.survey.isEmpty ? this.renderPlaceholder() : this.renderSimulator(),
2649
2607
  this.getBottomToolbar()));
@@ -2736,15 +2694,37 @@ class ComponentContainer extends React.Component {
2736
2694
  super(props);
2737
2695
  }
2738
2696
  render() {
2739
- return (React.createElement("div", { className: this.props.model.cssClass }, this.props.model.elements.map((element, index) => {
2697
+ const children = this.props.model.elements.map((element, index) => {
2740
2698
  return ReactElementFactory.Instance.createElement(element.componentName, Object.assign(Object.assign({}, element.componentData), { key: index }));
2741
- })));
2699
+ });
2700
+ const inner = this.props.model.scrollable ? React.createElement(Scroll, null,
2701
+ " ",
2702
+ children,
2703
+ " ") : children;
2704
+ return (this.props.model.wrapped ? React.createElement("div", { className: this.props.model.cssClass },
2705
+ " ",
2706
+ inner,
2707
+ " ") : React.createElement(React.Fragment, null, inner));
2742
2708
  }
2743
2709
  }
2744
2710
  ReactElementFactory.Instance.registerElement("svc-component-container", (props) => {
2745
2711
  return React.createElement(ComponentContainer, props);
2746
2712
  });
2747
2713
 
2714
+ class IconItem extends React.Component {
2715
+ render() {
2716
+ const item = this.props.item;
2717
+ if (!item)
2718
+ return null;
2719
+ return (React.createElement("div", { className: "svc-icon-item" },
2720
+ React.createElement(SvgIcon, { className: "svc-icon-item__icon", size: "auto", iconName: item.value }),
2721
+ React.createElement("span", { className: "svc-icon-item__text" }, item.title)));
2722
+ }
2723
+ }
2724
+ ReactElementFactory.Instance.registerElement("svc-presets-icon-item", (props) => {
2725
+ return React.createElement(IconItem, props);
2726
+ });
2727
+
2748
2728
  class SwitcherComponent extends SurveyElementBase {
2749
2729
  get item() {
2750
2730
  return this.props.item;
@@ -2788,6 +2768,24 @@ ReactElementFactory.Instance.registerElement("json-error-item", (props) => {
2788
2768
  return React.createElement(ItemTemplateComponent$1, props);
2789
2769
  });
2790
2770
 
2771
+ class TabContainerComponent extends SurveyElementBase {
2772
+ constructor(props) {
2773
+ super(props);
2774
+ }
2775
+ getStateElement() {
2776
+ return this.model;
2777
+ }
2778
+ get model() {
2779
+ return this.props.data;
2780
+ }
2781
+ renderElement() {
2782
+ return React.createElement(ComponentContainer, { model: this.model.containerModel });
2783
+ }
2784
+ }
2785
+ ReactElementFactory.Instance.registerElement("svc-tab-container", (props) => {
2786
+ return React.createElement(TabContainerComponent, props);
2787
+ });
2788
+
2791
2789
  class SurveyQuestionSpinEditor extends SurveyQuestionText {
2792
2790
  constructor(props) {
2793
2791
  super(props);
@@ -2808,13 +2806,30 @@ class SurveyQuestionSpinEditor extends SurveyQuestionText {
2808
2806
  return this.question.renderedValue;
2809
2807
  }
2810
2808
  renderButtons() {
2811
- return (React.createElement("span", { className: this.question.cssClasses.buttonsContainer },
2812
- React.createElement("button", { tabIndex: -1, "aria-hidden": "true", className: this.question.cssClasses.arrowButton, disabled: this.isDisplayMode, onClick: this.question.onDownButtonClick, onMouseDown: this.question.onDownButtonMouseDown, onMouseUp: this.question.onButtonMouseUp, onMouseLeave: this.question.onButtonMouseLeave, onBlur: event => this.question.onBlur(event.nativeEvent), onFocus: event => this.question.onFocus(event.nativeEvent) },
2813
- React.createElement(SvgIcon, { iconName: this.question.cssClasses.decreaseButtonIcon, size: "auto" })),
2814
- React.createElement("button", { tabIndex: -1, "aria-hidden": "true", className: this.question.cssClasses.arrowButton, disabled: this.isDisplayMode, onClick: this.question.onUpButtonClick, onMouseDown: this.question.onUpButtonMouseDown, onMouseUp: this.question.onButtonMouseUp, onMouseLeave: this.question.onButtonMouseLeave, onBlur: event => this.question.onBlur(event.nativeEvent), onFocus: event => this.question.onFocus(event.nativeEvent) },
2815
- React.createElement(SvgIcon, { iconName: this.question.cssClasses.increaseButtonIcon, size: "auto" }))));
2809
+ return React.createElement(SurveyActionBar, { model: this.question.inputActionsContainer });
2810
+ }
2811
+ }
2812
+ class SurveySpinEditorButton extends SurveyElementBase {
2813
+ get item() {
2814
+ return this.props.item;
2815
+ }
2816
+ get itemAction() {
2817
+ return this.props.item;
2818
+ }
2819
+ getStateElement() {
2820
+ return this.itemAction;
2821
+ }
2822
+ get question() {
2823
+ return this.item.data.question;
2824
+ }
2825
+ renderElement() {
2826
+ return React.createElement("button", { tabIndex: -1, "aria-hidden": "true", className: this.itemAction.getActionBarItemCss(), disabled: this.itemAction.disabled, onClick: () => this.item.action(), onMouseDown: this.item.data.onMouseDown, onMouseUp: this.question.onButtonMouseUp, onMouseLeave: this.question.onButtonMouseLeave, onBlur: event => this.question.onBlur(event.nativeEvent), onFocus: event => this.question.onFocus(event.nativeEvent) },
2827
+ React.createElement(SvgIcon, { className: this.itemAction.cssClasses.itemIcon, iconName: this.item.iconName, size: "auto" }));
2816
2828
  }
2817
2829
  }
2830
+ ReactElementFactory.Instance.registerElement("sv-spinedit-button", (props) => {
2831
+ return React.createElement(SurveySpinEditorButton, props);
2832
+ });
2818
2833
  ReactQuestionFactory.Instance.registerQuestion("spinedit", (props) => {
2819
2834
  return React.createElement(SurveyQuestionSpinEditor, props);
2820
2835
  });
@@ -2843,10 +2858,11 @@ class SurveyQuestionColor extends SurveyQuestionText {
2843
2858
  React.createElement("input", { id: this.question.inputId, disabled: this.isDisplayMode, className: this.question.cssClasses.control, ref: (input) => (this.setControl(input)), placeholder: this.question.renderedPlaceholder, autoComplete: "off", onKeyUp: (event) => this.question.onKeyUp(event.nativeEvent), onBlur: (event) => this.question.onBlur(event.nativeEvent), onChange: this.question.onChange, onBeforeInput: event => this.question.onBeforeInput(event.nativeEvent), "aria-required": this.question.a11y_input_ariaRequired, "aria-labelledby": this.question.a11y_input_ariaLabelledBy, "aria-label": this.question.a11y_input_ariaLabel, "aria-invalid": this.question.a11y_input_ariaInvalid, "aria-describedby": this.question.a11y_input_ariaDescribedBy })));
2844
2859
  }
2845
2860
  renderElement() {
2846
- return (React.createElement("div", { className: this.question.cssClasses.root, onKeyDown: event => this.question.onKeyDown(event.nativeEvent) },
2847
- this.renderColorSwatch(),
2848
- this.renderInput(),
2849
- this.question.showDropdownAction ? this.renderDropdownAction() : null));
2861
+ return (React.createElement("div", { className: this.question.cssClasses.rootWrapper },
2862
+ React.createElement("div", { className: this.question.cssClasses.root, onKeyDown: event => this.question.onKeyDown(event.nativeEvent) },
2863
+ this.renderColorSwatch(),
2864
+ this.renderInput(),
2865
+ this.renderButtons())));
2850
2866
  }
2851
2867
  getValueCore() {
2852
2868
  return this.question.renderedValue;
@@ -2856,13 +2872,8 @@ class SurveyQuestionColor extends SurveyQuestionText {
2856
2872
  React.createElement(SvgIcon, { iconName: this.question.cssClasses.swatchIcon, size: "auto" }),
2857
2873
  React.createElement("input", { type: "color", disabled: this.isDisplayMode, value: this.question.renderedColorValue, className: this.question.cssClasses.colorInput, onChange: (event) => this.question.onColorInputChange(event.nativeEvent), tabIndex: -1, "aria-required": this.question.a11y_input_ariaRequired, "aria-labelledby": this.question.a11y_input_ariaLabelledBy, "aria-label": this.question.a11y_input_ariaLabel, "aria-invalid": this.question.a11y_input_ariaInvalid, "aria-describedby": this.question.a11y_input_ariaDescribedBy }));
2858
2874
  }
2859
- renderDropdownAction() {
2860
- return (React.createElement(React.Fragment, null,
2861
- React.createElement("div", { "aria-hidden": "true", className: this.question.cssClasses.choicesButtonWrapper }, ReactElementFactory.Instance.createElement("sv-action-bar-item", { item: this.question.dropdownAction })),
2862
- this.renderPopup()));
2863
- }
2864
- renderPopup() {
2865
- return React.createElement(Popup, { model: this.question.dropdownAction.popupModel });
2875
+ renderButtons() {
2876
+ return this.question.hasVisibleInputActions ? React.createElement(SurveyActionBar, { model: this.question.inputActionsContainer }) : null;
2866
2877
  }
2867
2878
  }
2868
2879
  ReactQuestionFactory.Instance.registerQuestion("color", (props) => {
@@ -2883,32 +2894,38 @@ class SurveyQuestionFileEditor extends SurveyQuestionText {
2883
2894
  return (React.createElement(React.Fragment, null,
2884
2895
  React.createElement("input", { disabled: this.question.isTextInputReadOnly, className: this.questionFile.cssClasses.control, placeholder: this.questionFile.renderedPlaceholder, ref: (input) => (this.setControl(input)), autoComplete: "off", type: "text", onBlur: (event) => this.questionFile.onInputBlur(event.nativeEvent), onChange: (event) => this.questionFile.onInputChange(event.nativeEvent) })));
2885
2896
  }
2886
- renderFileInput() {
2887
- return (React.createElement("input", { type: "file", disabled: this.isDisplayMode, className: this.questionFile.cssClasses.fileInput, id: this.questionFile.inputId, "aria-required": this.questionFile.ariaRequired, "aria-label": this.questionFile.ariaLabel, "aria-invalid": this.questionFile.ariaInvalid, "aria-describedby": this.questionFile.ariaDescribedBy, multiple: false, title: this.questionFile.inputTitle, accept: this.questionFile.acceptedTypes, tabIndex: -1, onChange: (event) => this.questionFile.onFileInputChange(event.nativeEvent) }));
2888
- }
2889
2897
  renderButtons() {
2890
- return (React.createElement("div", { className: this.questionFile.cssClasses.buttonsContainer },
2891
- this.renderClearButton(),
2892
- this.renderChooseButton()));
2893
- }
2894
- renderClearButton() {
2895
- return attachKey2click((React.createElement("button", { className: this.questionFile.cssClasses.clearButton, title: this.questionFile.clearButtonCaption, disabled: this.questionFile.getIsClearButtonDisabled(), onClick: this.questionFile.doClean },
2896
- React.createElement(SvgIcon, { iconName: this.questionFile.cssClasses.clearButtonIcon, size: "auto" }))));
2897
- }
2898
- renderChooseButton() {
2899
- return (attachKey2click(React.createElement("label", { onClick: event => this.questionFile.chooseFiles(event.nativeEvent), className: this.questionFile.getChooseButtonCss(), htmlFor: this.questionFile.inputId, "aria-label": this.questionFile.chooseButtonCaption },
2900
- React.createElement(SvgIcon, { iconName: this.questionFile.cssClasses.chooseButtonIcon, size: "auto", title: this.questionFile.chooseButtonCaption }))));
2898
+ return this.question.hasVisibleInputActions ? React.createElement(SurveyActionBar, { model: this.questionFile.inputActionsContainer }) : null;
2901
2899
  }
2902
2900
  renderElement() {
2903
2901
  return (React.createElement("div", { className: this.questionFile.cssClasses.root, ref: el => this.setContent(el), onDragEnter: this.questionFile.onDragEnter, onDragOver: this.questionFile.onDragOver, onDrop: this.questionFile.onDrop, onDragLeave: this.questionFile.onDragLeave, onKeyDown: event => this.question.onKeyDown(event.nativeEvent) },
2904
2902
  this.renderInput(),
2905
- this.renderFileInput(),
2906
2903
  this.renderButtons()));
2907
2904
  }
2908
2905
  }
2906
+ class SurveyQuestionFileEditorButton extends SurveyElementBase {
2907
+ get item() {
2908
+ return this.props.item;
2909
+ }
2910
+ get question() {
2911
+ return this.props.item.data.question;
2912
+ }
2913
+ getStateElement() {
2914
+ return this.item;
2915
+ }
2916
+ renderElement() {
2917
+ return (React.createElement("div", null,
2918
+ attachKey2click(React.createElement("label", { onClick: event => this.question.chooseFiles(event.nativeEvent), className: this.item.getActionBarItemCss(), htmlFor: this.question.inputId, "aria-label": this.question.chooseButtonCaption },
2919
+ React.createElement(SvgIcon, { iconName: this.item.iconName, size: "auto", title: this.item.title, className: this.item.cssClasses.itemIcon }))),
2920
+ React.createElement("input", { type: "file", disabled: this.item.disabled, className: this.question.cssClasses.fileInput, id: this.question.inputId, "aria-required": this.question.ariaRequired, "aria-label": this.question.ariaLabel, "aria-invalid": this.question.ariaInvalid, "aria-describedby": this.question.ariaDescribedBy, multiple: false, title: this.question.inputTitle, accept: this.question.acceptedTypes, tabIndex: -1, onChange: (event) => this.question.onFileInputChange(event.nativeEvent) })));
2921
+ }
2922
+ }
2909
2923
  ReactQuestionFactory.Instance.registerQuestion("fileedit", (props) => {
2910
2924
  return React.createElement(SurveyQuestionFileEditor, props);
2911
2925
  });
2926
+ ReactElementFactory.Instance.registerElement("sv-fileedit-button", (props) => {
2927
+ return React.createElement(SurveyQuestionFileEditorButton, props);
2928
+ });
2912
2929
 
2913
2930
  class SurveyQuestionBooleanSwitch extends SurveyQuestionElementBase {
2914
2931
  renderElement() {
@@ -2929,8 +2946,8 @@ ReactQuestionFactory.Instance.registerQuestion("sv-boolean-switch", (props) => {
2929
2946
  RendererFactory.Instance.registerRenderer("boolean", "switch", "sv-boolean-switch");
2930
2947
 
2931
2948
  let Version;
2932
- Version = `${"3.0.0-beta.2"}`;
2933
- checkLibraryVersion(`${"3.0.0-beta.2"}`, "survey-creator-react");
2949
+ Version = `${"3.0.0-beta.4"}`;
2950
+ checkLibraryVersion(`${"3.0.0-beta.4"}`, "survey-creator-react");
2934
2951
 
2935
- export { ActionButton, AdaptiveToolbox, CellQuestionAdornerComponent, CellQuestionDropdownAdornerComponent, ComponentContainer, CreatorSurveyPageComponent, ImageItemValueAdornerComponent, ItemValueAdornerComponent, LogoImageComponent, MatrixCellAdornerComponent, PanelAdornerComponent, PropertyGridComponent, PropertyGridPlaceholderComponent, QuestionAdornerComponent, QuestionBanner, QuestionDropdownAdornerComponent, QuestionEditorContentComponent, QuestionErrorComponent, QuestionImageAdornerComponent, QuestionRatingAdornerComponent, QuestionWidgetAdornerComponent, QuestionWrapperFooter, QuestionWrapperHeader, ReactDragEvent, ReactMouseEvent, RowWrapper, SearchComponent, SideBarDefaultHeader, SidebarComponent, SurveyCreator, SurveyCreatorComponent, SurveyCreatorToolboxCategory, SurveyCreatorToolboxItem, SurveyCreatorToolboxItemGroup, SurveyCreatorToolboxTool, SurveyElementEmbeddedSurvey, SurveyLocStringEditor, SurveyLogicOpertor, SurveyNavigation, SurveyQuestionBooleanSwitch, SurveyQuestionColor, SurveyQuestionFileEditor, SurveyQuestionLinkValue, SurveyQuestionSpinEditor, SurveyResults, SurveyResultsByRow, SurveySimulator, SwitcherComponent, TabButtonComponent, TabDesignerComponent, TabJsonEditorAceComponent, TabJsonEditorErrorsComponent, TabJsonEditorTextareaComponent, TabLogicAddButtonComponent, TabLogicComponent, TabPreviewSurveyComponent, TabPreviewTestSurveyAgainComponent, TabThemeSurveyComponent, TabTranslationComponent, TabbedMenuComponent, TabbedMenuItemComponent, ToolboxList, TranslateFromAction, TranslationLineSkeleton, Version };
2952
+ export { ActionButton, AdaptiveToolbox, AddQuestionButtonComponent, CellQuestionAdornerComponent, CellQuestionDropdownAdornerComponent, ComponentContainer, CreatorSurveyPageComponent, IconItem, ImageItemValueAdornerComponent, ItemValueAdornerComponent, LogoImageComponent, MatrixCellAdornerComponent, PanelAdornerComponent, PropertyGridComponent, PropertyGridPlaceholderComponent, QuestionAdornerComponent, QuestionBanner, QuestionDropdownAdornerComponent, QuestionEditorContentComponent, QuestionErrorComponent, QuestionImageAdornerComponent, QuestionRatingAdornerComponent, QuestionWidgetAdornerComponent, QuestionWrapperFooter, QuestionWrapperHeader, ReactDragEvent, ReactMouseEvent, RowWrapper, SearchComponent, SideBarDefaultHeader, SideBarLaunchCard, SidebarComponent, SurveyCreator, SurveyCreatorComponent, SurveyCreatorToolboxCategory, SurveyCreatorToolboxItem, SurveyCreatorToolboxItemGroup, SurveyCreatorToolboxTool, SurveyElementEmbeddedSurvey, SurveyLocStringEditor, SurveyLogicOpertor, SurveyNavigation, SurveyQuestionBooleanSwitch, SurveyQuestionColor, SurveyQuestionFileEditor, SurveyQuestionFileEditorButton, SurveyQuestionLinkValue, SurveyQuestionSpinEditor, SurveyResults, SurveyResultsByRow, SurveySimulator, SurveySpinEditorButton, SwitcherComponent, TabButtonComponent, TabContainerComponent, TabDesignerComponent, TabJsonEditorAceComponent, TabJsonEditorErrorsComponent, TabJsonEditorTextareaComponent, TabLogicComponent, TabPreviewSurveyComponent, TabThemeSurveyComponent, TabTranslationComponent, TabbedMenuComponent, TabbedMenuItemComponent, ToolboxList, TranslateFromAction, TranslationLineSkeleton, Version };
2936
2953
  //# sourceMappingURL=survey-creator-react.mjs.map