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
@@ -142,10 +142,10 @@
142
142
  if (this.item.css) {
143
143
  css += " " + this.item.css;
144
144
  }
145
- css += (!this.item.isVisible ? " sv-action--hidden" : "");
145
+ css += (!this.item.isVisible ? " svc-tabbed-menu-item-container--hidden" : "");
146
146
  var component = surveyReactUi.ReactElementFactory.Instance.createElement(this.item.component || "svc-tabbed-menu-item", { item: this.item });
147
147
  return (React__namespace.createElement("span", { key: this.item.id, className: css, ref: this.ref },
148
- React__namespace.createElement("div", { className: "sv-action__content" }, component)));
148
+ React__namespace.createElement("div", { className: "svc-tabbed-menu-item-container__content" }, component)));
149
149
  };
150
150
  TabbedMenuItemWrapper.prototype.componentDidMount = function () {
151
151
  var _this = this;
@@ -304,7 +304,8 @@
304
304
  : surveyReactUi.ReactElementFactory.Instance.createElement(tab.componentContent, {
305
305
  creator: creator,
306
306
  survey: creator.survey,
307
- data: tab.data.model
307
+ data: tab.data.model,
308
+ model: tab.data.model
308
309
  });
309
310
  var className = "svc-creator-tab" + (creator.toolboxLocation == "right" ? " svc-creator__toolbox--right" : "");
310
311
  return (React__namespace.createElement("div", { role: "tabpanel", key: tab.id, id: "scrollableDiv-" + tab.id, "aria-labelledby": "tab-" + tab.id, className: className }, component));
@@ -795,8 +796,9 @@
795
796
  isChecked: _this.question.value === item.value
796
797
  }), _this.question, item))); })),
797
798
  this.dropdownModel.needToCollapse ?
798
- React__namespace.createElement(ActionButton, { click: this.dropdownModel.switchCollapse, text: this.dropdownModel.getButtonText(), allowBubble: true }) :
799
- null)));
799
+ surveyReactUi.ReactElementFactory.Instance.createElement("sv-action-bar-item", {
800
+ item: this.dropdownModel.collapseAction,
801
+ }) : null)));
800
802
  };
801
803
  return QuestionDropdownAdornerComponent;
802
804
  }(QuestionAdornerComponent));
@@ -836,9 +838,7 @@
836
838
  React__namespace.createElement(surveyReactUi.LoadingIndicatorComponent, null))));
837
839
  };
838
840
  QuestionImageAdornerComponent.prototype.renderChooseButton = function () {
839
- var _this = this;
840
- return (React__namespace.createElement("div", { className: "svc-image-question-controls" }, this.model.allowEdit ? surveyReactUi.attachKey2click(React__namespace.createElement("span", { className: "svc-context-button", onClick: function () { return _this.imageModel.chooseFile(_this.imageModel); } },
841
- React__namespace.createElement(surveyReactUi.SvgIcon, { size: "auto", iconName: "icon-choosefile" }))) : null));
841
+ return React__namespace.createElement(surveyReactUi.SurveyActionBar, { model: this.imageModel.imageActionsContainer });
842
842
  };
843
843
  QuestionImageAdornerComponent.prototype.renderElementPlaceholder = function () {
844
844
  return this.imageModel.isUploading ? this.renderLoadingPlaceholder() : this.renderChooseButton();
@@ -902,11 +902,7 @@
902
902
  var model = this.ratingModel;
903
903
  return (React__namespace.createElement(React__namespace.Fragment, null,
904
904
  React__namespace.createElement("div", { className: "svc-rating-question-content" },
905
- React__namespace.createElement("div", { className: model.controlsClassNames },
906
- model.allowRemove ? surveyReactUi.attachKey2click(React__namespace.createElement("span", { role: "button", className: model.removeClassNames, "aria-label": model.removeTooltip, onClick: function () { return model.removeItem(model); } },
907
- React__namespace.createElement(surveyReactUi.SvgIcon, { size: "auto", iconName: "icon-remove_16x16", title: model.removeTooltip }))) : null,
908
- model.allowAdd ? surveyReactUi.attachKey2click(React__namespace.createElement("span", { role: "button", className: model.addClassNames, "aria-label": model.addTooltip, onClick: function () { return model.addItem(model); } },
909
- React__namespace.createElement(surveyReactUi.SvgIcon, { size: "auto", iconName: "icon-add_16x16", title: model.addTooltip }))) : null),
905
+ React__namespace.createElement(surveyReactUi.SurveyActionBar, { model: model.rateActionsContainer }),
910
906
  this.props.element)));
911
907
  };
912
908
  return QuestionRatingAdornerComponent;
@@ -1110,35 +1106,32 @@
1110
1106
  }
1111
1107
  Object.defineProperty(AddQuestionButtonComponent.prototype, "model", {
1112
1108
  get: function () {
1113
- return this.props.item.data;
1109
+ return this.item.data;
1110
+ },
1111
+ enumerable: false,
1112
+ configurable: true
1113
+ });
1114
+ Object.defineProperty(AddQuestionButtonComponent.prototype, "item", {
1115
+ get: function () {
1116
+ return this.props.item;
1114
1117
  },
1115
1118
  enumerable: false,
1116
1119
  configurable: true
1117
1120
  });
1121
+ AddQuestionButtonComponent.prototype.getStateElement = function () {
1122
+ return this.item;
1123
+ };
1118
1124
  AddQuestionButtonComponent.prototype.renderTypeSelector = function () {
1119
- var questionTypeSelectorModel = this.model.questionTypeSelectorModel;
1120
- return surveyReactUi.attachKey2click(React__namespace.createElement("button", { type: "button", onClick: function (e) {
1121
- e.stopPropagation();
1122
- questionTypeSelectorModel.action();
1123
- }, className: "svc-element__question-type-selector", title: this.model.addNewQuestionText, role: "button" },
1124
- React__namespace.createElement("span", { className: "svc-element__question-type-selector-icon" },
1125
- React__namespace.createElement(surveyReactUi.SvgIcon, { iconName: questionTypeSelectorModel.iconName, size: "auto", title: this.model.addNewQuestionText })),
1126
- this.props.renderPopup === undefined || this.props.renderPopup ?
1127
- React__namespace.createElement(surveyReactUi.Popup, { model: questionTypeSelectorModel.popupModel })
1128
- : null));
1125
+ return React__namespace.createElement("div", { className: this.item.cssClasses.itemTypeSelector }, surveyReactUi.ReactElementFactory.Instance.createElement("sv-action-bar-item-dropdown", { item: this.model.questionTypeSelectorModel }));
1129
1126
  };
1130
1127
  AddQuestionButtonComponent.prototype.renderElement = function () {
1131
1128
  var _this = this;
1132
- var addButtonClass = this.props.buttonClass || "svc-btn";
1133
- return React__namespace.createElement(React__namespace.Fragment, null,
1134
- surveyReactUi.attachKey2click(React__namespace.createElement("div", { className: "svc-element__add-new-question " + addButtonClass, onClick: function (e) {
1135
- e.stopPropagation();
1136
- _this.model.addNewQuestion(_this.model, new ReactMouseEvent(e));
1137
- }, onMouseOver: function (e) { return _this.model.hoverStopper && _this.model.hoverStopper(e.nativeEvent, e.currentTarget); } },
1138
- React__namespace.createElement(surveyReactUi.SvgIcon, { className: "svc-panel__add-new-question-icon", iconName: "icon-add_24x24", size: "auto" }),
1139
- React__namespace.createElement("span", { className: "svc-add-new-item-button__text" }, this.model.addNewQuestionText),
1140
- this.props.renderPopup !== false ? this.renderTypeSelector() : null)),
1141
- this.props.renderPopup === false ? this.renderTypeSelector() : null);
1129
+ return React__namespace.createElement(React__namespace.Fragment, null, surveyReactUi.attachKey2click(React__namespace.createElement("div", { className: this.item.getActionBarItemCss(), onClick: function (e) {
1130
+ e.stopPropagation();
1131
+ _this.model.addNewQuestion(_this.model, new ReactMouseEvent(e));
1132
+ }, onMouseOver: function (e) { return _this.model.hoverStopper && _this.model.hoverStopper(e.nativeEvent, e.currentTarget); } },
1133
+ React__namespace.createElement("span", { className: this.item.getActionBarItemTitleCss() }, this.model.addNewQuestionText),
1134
+ this.renderTypeSelector())));
1142
1135
  };
1143
1136
  return AddQuestionButtonComponent;
1144
1137
  }(surveyReactUi.SurveyElementBase));
@@ -1152,30 +1145,23 @@
1152
1145
  return _super !== null && _super.apply(this, arguments) || this;
1153
1146
  }
1154
1147
  PanelAdornerComponent.prototype.renderElementPlaceholder = function () {
1155
- var _this = this;
1156
1148
  if (!this.model.isEmptyElement) {
1157
1149
  return null;
1158
1150
  }
1159
1151
  return (React__namespace.createElement("div", { className: "svc-panel__placeholder_frame-wrapper" },
1160
1152
  React__namespace.createElement("div", { className: "svc-panel__placeholder_frame" },
1161
1153
  React__namespace.createElement("div", { className: "svc-panel__placeholder" }, this.model.placeholderText),
1162
- this.model.showAddQuestionButton ? surveyReactUi.attachKey2click(React__namespace.createElement("div", { className: "svc-panel__add-new-question svc-action-button", onClick: function (e) {
1163
- e.stopPropagation();
1164
- _this.model.addNewQuestion();
1165
- } },
1166
- React__namespace.createElement(surveyReactUi.SvgIcon, { className: "svc-panel__add-new-question-icon", iconName: "icon-add_24x24", size: "auto" }),
1167
- React__namespace.createElement("span", { className: "svc-add-new-item-button__text" }, this.model.addNewQuestionText))) : null)));
1154
+ this.model.showAddQuestionButton ? React__namespace.createElement(surveyReactUi.SurveyActionBar, { model: this.model.addQuestionActionsContainer }) : null)));
1168
1155
  };
1169
1156
  PanelAdornerComponent.prototype.disableTabStop = function () {
1170
1157
  return true;
1171
1158
  };
1159
+ PanelAdornerComponent.prototype.createQuestionViewModel = function (props) {
1160
+ return new surveyCreatorCore.PanelAdornerViewModel(props.componentData, props.question, null);
1161
+ };
1172
1162
  PanelAdornerComponent.prototype.renderFooter = function () {
1173
1163
  return (React__namespace.createElement(React__namespace.Fragment, null,
1174
- !this.model.isEmptyElement && this.model.element.isPanel && this.model.showAddQuestionButton ? (React__namespace.createElement("div", { className: "svc-panel__add-new-question-container" },
1175
- React__namespace.createElement("div", { className: "svc-panel__question-type-selector-popup" },
1176
- React__namespace.createElement(surveyReactUi.Popup, { model: this.model.questionTypeSelectorModel.popupModel })),
1177
- React__namespace.createElement("div", { className: "svc-panel__add-new-question-wrapper" },
1178
- React__namespace.createElement(AddQuestionButtonComponent, { item: { data: this.model }, buttonClass: "svc-action-button", renderPopup: false })))) : null,
1164
+ !this.model.isEmptyElement && this.model.element.isPanel && this.model.showAddQuestionButton ? (React__namespace.createElement(surveyReactUi.SurveyActionBar, { model: this.model.addQuestionActionsContainer, handleClick: false })) : null,
1179
1165
  _super.prototype.renderFooter.call(this)));
1180
1166
  };
1181
1167
  return PanelAdornerComponent;
@@ -1208,20 +1194,8 @@
1208
1194
  _super.prototype.componentDidMount.call(this);
1209
1195
  this.model.root = this.rootRef.current;
1210
1196
  };
1211
- LogoImageComponent.prototype.renderChooseButton = function () {
1212
- var _this = this;
1213
- return surveyReactUi.attachKey2click(React__namespace.createElement("span", { className: "svc-context-button", onClick: function () { return _this.model.chooseFile(_this.model); } },
1214
- React__namespace.createElement(surveyReactUi.SvgIcon, { size: "auto", iconName: "icon-choosefile" })));
1215
- };
1216
- LogoImageComponent.prototype.renderClearButton = function () {
1217
- var _this = this;
1218
- return surveyReactUi.attachKey2click(React__namespace.createElement("span", { className: "svc-context-button svc-context-button--danger", onClick: function () { return _this.model.remove(_this.model); } },
1219
- React__namespace.createElement(surveyReactUi.SvgIcon, { size: "auto", iconName: "icon-clear" })));
1220
- };
1221
1197
  LogoImageComponent.prototype.renderButtons = function () {
1222
- return (React__namespace.createElement("div", { className: "svc-context-container svc-logo-image-controls" },
1223
- this.renderChooseButton(),
1224
- this.renderClearButton()));
1198
+ return React__namespace.createElement(surveyReactUi.SurveyActionBar, { model: this.model.actionsContainer });
1225
1199
  };
1226
1200
  LogoImageComponent.prototype.renderImage = function () {
1227
1201
  return React__namespace.createElement("div", { className: this.model.containerCss },
@@ -1417,19 +1391,19 @@
1417
1391
  _super.prototype.componentWillUnmount.call(this);
1418
1392
  this.props.item.setRootElement(undefined);
1419
1393
  };
1394
+ ItemValueAdornerComponent.prototype.renderButton = function (action) {
1395
+ return surveyReactUi.ReactElementFactory.Instance.createElement("sv-action-bar-item", {
1396
+ item: action,
1397
+ });
1398
+ };
1420
1399
  ItemValueAdornerComponent.prototype.render = function () {
1421
1400
  var _this = this;
1422
1401
  this.model.item = this.props.item;
1423
- var button = this.model.allowAdd ? (surveyReactUi.attachKey2click(React__namespace.createElement("span", { role: "button", className: "svc-item-value-controls__button svc-item-value-controls__add", "aria-label": this.model.tooltip, onClick: function () {
1424
- _this.model.add(_this.model);
1425
- _this.model.isNew = false;
1426
- } },
1427
- React__namespace.createElement(surveyReactUi.SvgIcon, { size: "auto", iconName: "icon-add_16x16", title: this.model.tooltip })))) : (React__namespace.createElement(React__namespace.Fragment, null,
1402
+ var button = this.model.allowAdd ? (this.renderButton(this.model.addAction)) : (React__namespace.createElement(React__namespace.Fragment, null,
1428
1403
  " ",
1429
- this.model.isDraggable ? (React__namespace.createElement("span", { className: "svc-item-value-controls__button svc-item-value-controls__drag" },
1404
+ this.model.isDraggable ? (React__namespace.createElement("span", { className: "svc-item-value-controls__drag" },
1430
1405
  React__namespace.createElement(surveyReactUi.SvgIcon, { className: "svc-item-value-controls__drag-icon", size: "auto", iconName: "icon-drag-24x24", title: this.model.dragTooltip }))) : null,
1431
- this.model.allowRemove ? surveyReactUi.attachKey2click(React__namespace.createElement("span", { role: "button", className: "svc-item-value-controls__button svc-item-value-controls__remove", "aria-label": this.model.tooltip, onClick: function () { return _this.model.remove(_this.model); } },
1432
- React__namespace.createElement(surveyReactUi.SvgIcon, { size: "auto", iconName: "icon-remove_16x16", title: this.model.tooltip }))) : null));
1406
+ this.model.allowRemove ? this.renderButton(this.model.removeAction) : null));
1433
1407
  var itemkey = this.props.element.key + (this.model.allowAdd ? "_new" : "");
1434
1408
  return (React__namespace.createElement(React__namespace.Fragment, null,
1435
1409
  React__namespace.createElement("div", { ref: this.rootRef, className: "svc-item-value-wrapper" +
@@ -1445,19 +1419,13 @@
1445
1419
  this.renderPanel()));
1446
1420
  };
1447
1421
  ItemValueAdornerComponent.prototype.renderPanelAction = function () {
1448
- var _this = this;
1449
1422
  if (!this.model.canShowPanel())
1450
1423
  return null;
1451
- var isShowPanel = this.model.showPanel;
1452
- var icName = isShowPanel ? "icon-collapsepanel-16x16" : "icon-expandpanel-16x16";
1453
- var btn = surveyReactUi.attachKey2click(React__namespace.createElement("span", { role: "button", className: "svc-item-value-controls__button svc-item-value-controls__add svc-choice-elements-button", onClick: function () {
1454
- _this.model.togglePanel();
1455
- } },
1456
- React__namespace.createElement(surveyReactUi.SvgIcon, { size: "auto", iconName: icName })));
1424
+ var btn = this.renderButton(this.model.expandPanelAction);
1457
1425
  return React__namespace.createElement("div", { className: "svc-item-value-controls svc-choice-elements-button-container" }, btn);
1458
1426
  };
1459
1427
  ItemValueAdornerComponent.prototype.renderPanel = function () {
1460
- if (!this.model.showPanel)
1428
+ if (!this.model.renderedShowPanel)
1461
1429
  return null;
1462
1430
  var creator = this.model.creator;
1463
1431
  var survey = creator.survey;
@@ -1513,14 +1481,11 @@
1513
1481
  React__namespace.createElement(surveyReactUi.LoadingIndicatorComponent, null));
1514
1482
  };
1515
1483
  ImageItemValueAdornerComponent.prototype.renderNewItemControls = function () {
1516
- var _this = this;
1517
- var addButton = surveyReactUi.attachKey2click(React__namespace.createElement("span", { className: this.model.addButtonCss, onClick: function () { return _this.model.chooseNewFile(_this.model); } }, this.model.showChooseButtonAsIcon ?
1518
- React__namespace.createElement(surveyReactUi.SvgIcon, { size: "auto", iconName: "icon-add-lg", title: this.model.addFileTitle }) :
1519
- React__namespace.createElement("span", null, this.model.chooseImageText)));
1484
+ var controls = React__namespace.createElement(surveyReactUi.SurveyActionBar, { model: this.model.actionsContainer });
1520
1485
  var placeholder = this.model.showPlaceholder ? React__namespace.createElement("span", { className: "svc-image-item-value__placeholder" }, this.model.placeholderText) : null;
1521
1486
  return React__namespace.createElement(React__namespace.Fragment, null,
1522
1487
  placeholder,
1523
- addButton);
1488
+ controls);
1524
1489
  };
1525
1490
  ImageItemValueAdornerComponent.prototype.render = function () {
1526
1491
  var _this = this;
@@ -1542,17 +1507,7 @@
1542
1507
  else {
1543
1508
  content = (React__namespace.createElement(React__namespace.Fragment, null,
1544
1509
  React__namespace.createElement("div", { className: "svc-image-item-value__item" }, this.props.element),
1545
- this.model.isDraggable && this.model.canRenderControls ?
1546
- React__namespace.createElement("span", { className: "svc-context-button svc-image-item-value-controls__drag-area-indicator", onPointerDown: function (event) { return _this.model.onPointerDown(event); } },
1547
- React__namespace.createElement(surveyReactUi.SvgIcon, { size: "auto", iconName: "icon-drag-24x24" }))
1548
- : null,
1549
- this.model.canRenderControls ?
1550
- React__namespace.createElement("div", { className: "svc-context-container svc-image-item-value-controls" },
1551
- this.model.allowRemove && !this.model.isUploading ? surveyReactUi.attachKey2click(React__namespace.createElement("span", { className: "svc-context-button", onClick: function () { return _this.model.chooseFile(_this.model); } },
1552
- React__namespace.createElement(surveyReactUi.SvgIcon, { role: "button", size: "auto", iconName: "icon-choosefile", title: this.model.selectFileTitle }))) : null,
1553
- this.model.allowRemove && !this.model.isUploading ? surveyReactUi.attachKey2click(React__namespace.createElement("span", { className: "svc-context-button svc-context-button--danger", onClick: function () { return _this.model.remove(_this.model); } },
1554
- React__namespace.createElement(surveyReactUi.SvgIcon, { role: "button", size: "auto", iconName: "icon-delete", title: this.model.removeFileTitle }))) : null)
1555
- : null));
1510
+ this.model.canRenderControls ? React__namespace.createElement(surveyReactUi.SurveyActionBar, { model: this.model.topActionsContainer }) : null));
1556
1511
  }
1557
1512
  return (React__namespace.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: function (event) { return _this.model.onPointerDown(event); }, onDragStart: this.preventDragHandler, onDrop: this.model.onDrop, onDragEnter: this.model.onDragEnter, onDragOver: this.model.onDragOver, onDragLeave: this.model.onDragLeave },
1558
1513
  React__namespace.createElement("div", { className: "svc-image-item-value-wrapper__ghost", style: imageStyle }),
@@ -1568,6 +1523,21 @@
1568
1523
  };
1569
1524
  return ImageItemValueAdornerComponent;
1570
1525
  }(CreatorModelElement));
1526
+ var ImageItemDragAction = /** @class */ (function (_super) {
1527
+ __extends(ImageItemDragAction, _super);
1528
+ function ImageItemDragAction() {
1529
+ return _super !== null && _super.apply(this, arguments) || this;
1530
+ }
1531
+ ImageItemDragAction.prototype.renderElement = function () {
1532
+ var _this = this;
1533
+ return React__namespace.createElement("span", { className: this.props.item.getActionBarItemCss(), onPointerDown: function (event) { return _this.props.item.data.model.onPointerDown(event); } },
1534
+ React__namespace.createElement(surveyReactUi.SvgIcon, { size: "auto", iconName: this.props.item.iconName, className: this.props.item.cssClasses.itemIcon }));
1535
+ };
1536
+ return ImageItemDragAction;
1537
+ }(surveyReactUi.SurveyElementBase));
1538
+ surveyReactUi.ReactElementFactory.Instance.registerElement("svc-image-item-drag-action", function (props) {
1539
+ return React__namespace.createElement(ImageItemDragAction, props);
1540
+ });
1571
1541
  surveyReactUi.ReactElementFactory.Instance.registerElement("svc-image-item-value", function (props) {
1572
1542
  return React__namespace.createElement(ImageItemValueAdornerComponent, props);
1573
1543
  });
@@ -1606,8 +1576,9 @@
1606
1576
  var _this = this;
1607
1577
  var controls = null;
1608
1578
  if (!!this.model.isSupportCellEditor) {
1609
- controls = React__namespace.createElement("div", { className: "svc-matrix-cell__question-controls" }, surveyReactUi.attachKey2click(React__namespace.createElement("span", { className: "svc-matrix-cell__question-controls-button svc-context-button", onClick: function (event) { return _this.model.editQuestion(_this.model, event); } },
1610
- React__namespace.createElement(surveyReactUi.SvgIcon, { size: "auto", iconName: "icon-edit" }))));
1579
+ controls = React__namespace.createElement("div", { className: "svc-matrix-cell__question-controls" }, surveyReactUi.ReactElementFactory.Instance.createElement("sv-action-bar-item", {
1580
+ item: this.model.editAction,
1581
+ }));
1611
1582
  }
1612
1583
  return (React__namespace.createElement("div", { className: "svc-matrix-cell", tabIndex: -1, key: this.props.element.key, onClick: function (e) { return !_this.props.question && _this.model.selectContext(_this.model, e); }, onMouseOut: function (e) { return _this.model.hover(e.nativeEvent, e.currentTarget); }, onMouseOver: function (e) { return _this.model.hover(e.nativeEvent, e.currentTarget); } },
1613
1584
  React__namespace.createElement("div", { className: "svc-matrix-cell--selected" + (this.model.isSelected ? " svc-visible" : "") }),
@@ -1757,7 +1728,7 @@
1757
1728
  });
1758
1729
  return (React__namespace.createElement("div", { className: item.css, key: item.id, ref: this.rootRef },
1759
1730
  (item.needSeparator && !this.creator.toolbox.showCategoryTitles) ? (React__namespace.createElement("div", { className: "svc-toolbox__category-separator" })) : null,
1760
- React__namespace.createElement("div", { className: "svc-toolbox__tool-content sv-action__content", onPointerDown: function (event) {
1731
+ React__namespace.createElement("div", { className: "svc-toolbox__tool-content", onPointerDown: function (event) {
1761
1732
  event.persist();
1762
1733
  _this.model.onPointerDown(event);
1763
1734
  } }, itemComponent)));
@@ -2243,11 +2214,10 @@
2243
2214
  var model = this.props.model;
2244
2215
  if (!model.visible)
2245
2216
  return null;
2246
- var button = surveyReactUi.attachKey2click(React__namespace.createElement("div", { className: model.buttonClassName, title: model.tooltip, onClick: function () { model.action(); } },
2247
- React__namespace.createElement("div", { className: "svc-menu-action__icon" },
2248
- React__namespace.createElement("div", { className: "svc-menu-action__icon-container" },
2249
- React__namespace.createElement(surveyReactUi.SvgIcon, { iconName: model.iconName, size: "auto" })))), model);
2250
- return (React__namespace.createElement("div", { className: "svc-menu-action" }, button));
2217
+ var itemComponent = surveyReactUi.ReactElementFactory.Instance.createElement(this.props.model.component || "sv-action-bar-item", {
2218
+ item: this.props.model,
2219
+ });
2220
+ return (React__namespace.createElement("div", { className: "svc-sidebar-tabs__item" }, itemComponent));
2251
2221
  };
2252
2222
  return TabButtonComponent;
2253
2223
  }(surveyReactUi.SurveyElementBase));
@@ -2343,7 +2313,7 @@
2343
2313
  };
2344
2314
  SideBarPropertyGridHeader.prototype.renderElement = function () {
2345
2315
  var _this = this;
2346
- var button = surveyReactUi.attachKey2click(React__namespace.createElement("div", { className: this.objectSelectionAction.buttonClassName, onClick: function () { return _this.objectSelectionAction.action(); } },
2316
+ var button = surveyReactUi.attachKey2click(React__namespace.createElement("div", { className: this.objectSelectionAction.getActionBarItemCss() + " svc-sidebar__header-object-selector", onClick: function () { return _this.objectSelectionAction.action(); } },
2347
2317
  React__namespace.createElement("div", { className: "svc-sidebar__header-caption" },
2348
2318
  React__namespace.createElement("span", { className: "svc-sidebar__header-title" }, this.objectSelectionAction.title),
2349
2319
  React__namespace.createElement("span", { className: "svc-sidebar__header-subtitle" }, this.objectSelectionAction.tooltip))), this.props.model);
@@ -2468,6 +2438,31 @@
2468
2438
  return React__namespace.createElement(SidebarComponent, props);
2469
2439
  });
2470
2440
 
2441
+ var SideBarLaunchCard = /** @class */ (function (_super) {
2442
+ __extends(SideBarLaunchCard, _super);
2443
+ function SideBarLaunchCard() {
2444
+ return _super !== null && _super.apply(this, arguments) || this;
2445
+ }
2446
+ SideBarLaunchCard.prototype.render = function () {
2447
+ var model = this.props.model;
2448
+ if (!model)
2449
+ return null;
2450
+ return (React__namespace.createElement("div", { className: "spg-launch" },
2451
+ React__namespace.createElement("button", { className: "spg-launch__card", onClick: model.onClick },
2452
+ React__namespace.createElement("div", { className: "spg-launch__container" },
2453
+ React__namespace.createElement("div", { className: "spg-launch__text" }, model.title),
2454
+ React__namespace.createElement("div", { className: "spg-launch__text2" }, model.description)),
2455
+ React__namespace.createElement("div", { className: "spg-launch__icon" },
2456
+ React__namespace.createElement("div", { className: "spg-launch__chevron-right-16-x-16" },
2457
+ React__namespace.createElement("div", { className: "spg-launch__icon2" },
2458
+ React__namespace.createElement(surveyReactUi.SvgIcon, { size: "auto", iconName: "chevrondown-24x24" })))))));
2459
+ };
2460
+ return SideBarLaunchCard;
2461
+ }(React__namespace.Component));
2462
+ surveyReactUi.ReactElementFactory.Instance.registerElement("svc-side-bar-launch-card", function (props) {
2463
+ return React__namespace.createElement(SideBarLaunchCard, props);
2464
+ });
2465
+
2471
2466
  var TranslationLineSkeleton = /** @class */ (function (_super) {
2472
2467
  __extends(TranslationLineSkeleton, _super);
2473
2468
  function TranslationLineSkeleton() {
@@ -2763,10 +2758,8 @@
2763
2758
  };
2764
2759
  SurveyPageNavigator.prototype.componentDidMount = function () {
2765
2760
  _super.prototype.componentDidMount.call(this);
2766
- if (this.props.pageEditMode !== "bypage") {
2767
- var el = this.containerRef.current;
2768
- this.model.attachToUI(el);
2769
- }
2761
+ var el = this.containerRef.current;
2762
+ this.model.attachToUI(el);
2770
2763
  };
2771
2764
  SurveyPageNavigator.prototype.componentWillUnmount = function () {
2772
2765
  _super.prototype.componentWillUnmount.call(this);
@@ -2774,15 +2767,8 @@
2774
2767
  this.model.setScrollableContainer(undefined);
2775
2768
  };
2776
2769
  SurveyPageNavigator.prototype.renderElement = function () {
2777
- var _this = this;
2778
- var className = "svc-page-navigator__selector svc-page-navigator__button";
2779
- if (this.model.isPopupOpened)
2780
- className += " svc-page-navigator__button--pressed";
2781
2770
  return (React__namespace.createElement("div", { className: "svc-page-navigator", ref: this.containerRef, style: { display: this.model.visible ? "flex" : "none" } },
2782
- React__namespace.createElement("div", null,
2783
- surveyReactUi.attachKey2click(React__namespace.createElement("div", { role: "button", className: className, onClick: function () { return _this.model.togglePageSelector(); }, title: this.model.pageSelectorCaption },
2784
- React__namespace.createElement(surveyReactUi.SvgIcon, { className: "svc-page-navigator__button-icon", iconName: this.model.icon, size: "auto", title: this.model.pageSelectorCaption }))),
2785
- React__namespace.createElement(surveyReactUi.Popup, { model: this.model.popupModel })),
2771
+ React__namespace.createElement("div", null, surveyReactUi.ReactElementFactory.Instance.createElement("sv-action-bar-item-dropdown", { item: this.model.selectorAction })),
2786
2772
  React__namespace.createElement("div", null, this.model.visibleItems.map(function (item) { return (React__namespace.createElement(SurveyPageNavigatorItem, { key: item.id, item: item })); }))));
2787
2773
  };
2788
2774
  return SurveyPageNavigator;
@@ -3091,35 +3077,6 @@
3091
3077
  return React__namespace.createElement(TabJsonEditorAceComponent, props);
3092
3078
  });
3093
3079
 
3094
- var TabLogicAddButtonComponent = /** @class */ (function (_super) {
3095
- __extends(TabLogicAddButtonComponent, _super);
3096
- function TabLogicAddButtonComponent() {
3097
- return _super !== null && _super.apply(this, arguments) || this;
3098
- }
3099
- Object.defineProperty(TabLogicAddButtonComponent.prototype, "model", {
3100
- get: function () {
3101
- return this.props.button;
3102
- },
3103
- enumerable: false,
3104
- configurable: true
3105
- });
3106
- TabLogicAddButtonComponent.prototype.getStateElement = function () {
3107
- return this.model;
3108
- };
3109
- TabLogicAddButtonComponent.prototype.renderElement = function () {
3110
- var _this = this;
3111
- var buttonClassName = "svc-logic-tab__content-action svc-btn" + ((this.model.enabled !== undefined && !this.model.enabled) ? " svc-logic-tab__content-action--disabled" : "");
3112
- return surveyReactUi.attachKey2click(React__namespace.createElement("div", { role: "button", onClick: function (e) {
3113
- e.stopPropagation();
3114
- _this.model.action();
3115
- }, className: buttonClassName, title: this.model.title },
3116
- React__namespace.createElement("span", { className: "svc-btn__text" }, this.model.title)));
3117
- };
3118
- return TabLogicAddButtonComponent;
3119
- }(surveyReactUi.SurveyElementBase));
3120
- surveyReactUi.ReactElementFactory.Instance.registerElement("svc-tab-logic-add-button", function (props) {
3121
- return React__namespace.createElement(TabLogicAddButtonComponent, props);
3122
- });
3123
3080
  var TabLogicComponent = /** @class */ (function (_super) {
3124
3081
  __extends(TabLogicComponent, _super);
3125
3082
  function TabLogicComponent() {
@@ -3143,15 +3100,15 @@
3143
3100
  };
3144
3101
  TabLogicComponent.prototype.renderViewContent = function () {
3145
3102
  var logicTabClassName = "svc-plugin-tab__content svc-logic-tab svc-logic-tab__content " + (this.model.hasItems ? "" : "svc-logic-tab--empty");
3146
- var addLogic = !this.model.readOnly ? React__namespace.createElement(TabLogicAddButtonComponent, { button: this.model.addNewButton }) : undefined;
3103
+ var actions = !this.model.readOnly ? React__namespace.createElement(surveyReactUi.SurveyActionBar, { model: this.model.contentActionsContainer }) : undefined;
3147
3104
  return (React__namespace.createElement(React.Fragment, null,
3148
3105
  React__namespace.createElement("div", { className: logicTabClassName }, this.model.hasItems ?
3149
3106
  (React__namespace.createElement(React__namespace.Fragment, null,
3150
3107
  React__namespace.createElement(surveyReactUi.Survey, { model: this.model.itemsSurvey }),
3151
- addLogic))
3108
+ actions))
3152
3109
  : (React__namespace.createElement("div", { className: "svc-logic-tab__content-empty" },
3153
3110
  React__namespace.createElement(SurfacePlaceholder, { name: "logic", placeholderTitleText: this.model.placeholderTitleText, placeholderDescriptionText: this.model.placeholderDescriptionText }),
3154
- addLogic)))));
3111
+ actions)))));
3155
3112
  };
3156
3113
  return TabLogicComponent;
3157
3114
  }(surveyReactUi.SurveyElementBase));
@@ -3159,6 +3116,12 @@
3159
3116
  return React__namespace.createElement(TabLogicComponent, props);
3160
3117
  });
3161
3118
 
3119
+ function simulatorShellStyle(overlayHeight) {
3120
+ var _a;
3121
+ return overlayHeight
3122
+ ? (_a = {}, _a["--sv-popup-overlay-height"] = overlayHeight, _a)
3123
+ : {};
3124
+ }
3162
3125
  var SurveySimulator = /** @class */ (function (_super) {
3163
3126
  __extends(SurveySimulator, _super);
3164
3127
  function SurveySimulator() {
@@ -3174,9 +3137,22 @@
3174
3137
  SurveySimulator.prototype.getStateElement = function () {
3175
3138
  return this.model;
3176
3139
  };
3140
+ SurveySimulator.prototype.componentDidMount = function () {
3141
+ _super.prototype.componentDidMount.call(this);
3142
+ this.model.queueSurveyLayoutRefresh();
3143
+ };
3144
+ SurveySimulator.prototype.componentDidUpdate = function (prevProps, prevState) {
3145
+ _super.prototype.componentDidUpdate.call(this, prevProps, prevState);
3146
+ this.model.queueSurveyLayoutRefresh();
3147
+ };
3148
+ SurveySimulator.prototype.componentWillUnmount = function () {
3149
+ this.model.cancelSurveyLayoutRefresh();
3150
+ _super.prototype.componentWillUnmount.call(this);
3151
+ };
3177
3152
  SurveySimulator.prototype.renderElement = function () {
3178
3153
  var _this = this;
3179
3154
  var mainSimulatorClass = this.model.getRootCss();
3155
+ var shellStyle = simulatorShellStyle(this.model.popupOverlayHeight);
3180
3156
  if (!this.model.survey) {
3181
3157
  return React__namespace.createElement("div", { className: mainSimulatorClass });
3182
3158
  }
@@ -3193,47 +3169,18 @@
3193
3169
  this.model.simulatorFrame.scale +
3194
3170
  ") translate(-50%, -50%)"
3195
3171
  } },
3196
- React__namespace.createElement("div", { className: "svd-simulator-content" },
3172
+ React__namespace.createElement("div", { className: "svd-simulator-content", style: shellStyle },
3197
3173
  React__namespace.createElement(surveyReactUi.Survey, { model: this.model.survey }))))));
3198
3174
  }
3199
3175
  else {
3200
3176
  return (React__namespace.createElement("div", { className: mainSimulatorClass },
3201
- React__namespace.createElement("div", { className: "svd-simulator-content" },
3177
+ React__namespace.createElement("div", { className: "svd-simulator-content", style: shellStyle },
3202
3178
  React__namespace.createElement(surveyReactUi.Survey, { model: this.model.survey }))));
3203
3179
  }
3204
3180
  };
3205
3181
  return SurveySimulator;
3206
3182
  }(surveyReactUi.SurveyElementBase));
3207
3183
 
3208
- var TabPreviewTestSurveyAgainComponent = /** @class */ (function (_super) {
3209
- __extends(TabPreviewTestSurveyAgainComponent, _super);
3210
- function TabPreviewTestSurveyAgainComponent() {
3211
- return _super !== null && _super.apply(this, arguments) || this;
3212
- }
3213
- Object.defineProperty(TabPreviewTestSurveyAgainComponent.prototype, "model", {
3214
- get: function () {
3215
- return this.props.model.testAgainAction;
3216
- },
3217
- enumerable: false,
3218
- configurable: true
3219
- });
3220
- TabPreviewTestSurveyAgainComponent.prototype.getStateElement = function () {
3221
- return this.model;
3222
- };
3223
- TabPreviewTestSurveyAgainComponent.prototype.renderElement = function () {
3224
- var _this = this;
3225
- var buttonClassName = "svc-preview__test-again svc-btn";
3226
- return surveyReactUi.attachKey2click(React__namespace.createElement("div", { role: "button", onClick: function (e) {
3227
- e.stopPropagation();
3228
- _this.model.action();
3229
- }, className: buttonClassName, title: this.model.title },
3230
- React__namespace.createElement("span", { className: "svc-btn__text" }, this.model.title)));
3231
- };
3232
- return TabPreviewTestSurveyAgainComponent;
3233
- }(surveyReactUi.SurveyElementBase));
3234
- surveyReactUi.ReactElementFactory.Instance.registerElement("svc-complete-page", function (props) {
3235
- return React__namespace.createElement(TabPreviewTestSurveyAgainComponent, props);
3236
- });
3237
3184
  var TabPreviewSurveyComponent = /** @class */ (function (_super) {
3238
3185
  __extends(TabPreviewSurveyComponent, _super);
3239
3186
  function TabPreviewSurveyComponent(props) {
@@ -3258,7 +3205,7 @@
3258
3205
  this.model.showResults ? React__namespace.createElement(SurveyResults, { survey: this.model.simulator.survey }) : null));
3259
3206
  };
3260
3207
  TabPreviewSurveyComponent.prototype.renderElement = function () {
3261
- var tabContentClassName = "svc-creator-tab__content svc-test-tab__content" + (this.model.isPageToolbarVisible ? " svc-creator-tab__content--with-toolbar" : "");
3208
+ var tabContentClassName = "svc-creator-tab__content svc-test-tab__content " + this.model.tabContentAdditionalCss;
3262
3209
  return (React__namespace.createElement("div", { className: tabContentClassName },
3263
3210
  this.model.simulator.survey.isEmpty ? this.renderPlaceholder() : this.renderSimulator(),
3264
3211
  this.getBottomToolbar()));
@@ -3322,7 +3269,7 @@
3322
3269
  this.model.showResults ? React__namespace.createElement(SurveyResults, { survey: this.model.simulator.survey }) : null));
3323
3270
  };
3324
3271
  TabThemeSurveyComponent.prototype.renderElement = function () {
3325
- var tabContentClassName = "svc-creator-tab__content svc-test-tab__content" + (this.model.isPageToolbarVisible ? " svc-creator-tab__content--with-toolbar" : "");
3272
+ var tabContentClassName = "svc-creator-tab__content svc-test-tab__content " + this.model.tabContentAdditionalCss;
3326
3273
  return (React__namespace.createElement("div", { className: tabContentClassName },
3327
3274
  this.model.simulator.survey.isEmpty ? this.renderPlaceholder() : this.renderSimulator(),
3328
3275
  this.getBottomToolbar()));
@@ -3444,9 +3391,17 @@
3444
3391
  return _super.call(this, props) || this;
3445
3392
  }
3446
3393
  ComponentContainer.prototype.render = function () {
3447
- return (React__namespace.createElement("div", { className: this.props.model.cssClass }, this.props.model.elements.map(function (element, index) {
3394
+ var children = this.props.model.elements.map(function (element, index) {
3448
3395
  return surveyReactUi.ReactElementFactory.Instance.createElement(element.componentName, __assign(__assign({}, element.componentData), { key: index }));
3449
- })));
3396
+ });
3397
+ var inner = this.props.model.scrollable ? React__namespace.createElement(surveyReactUi.Scroll, null,
3398
+ " ",
3399
+ children,
3400
+ " ") : children;
3401
+ return (this.props.model.wrapped ? React__namespace.createElement("div", { className: this.props.model.cssClass },
3402
+ " ",
3403
+ inner,
3404
+ " ") : React__namespace.createElement(React__namespace.Fragment, null, inner));
3450
3405
  };
3451
3406
  return ComponentContainer;
3452
3407
  }(React__namespace.Component));
@@ -3454,6 +3409,25 @@
3454
3409
  return React__namespace.createElement(ComponentContainer, props);
3455
3410
  });
3456
3411
 
3412
+ var IconItem = /** @class */ (function (_super) {
3413
+ __extends(IconItem, _super);
3414
+ function IconItem() {
3415
+ return _super !== null && _super.apply(this, arguments) || this;
3416
+ }
3417
+ IconItem.prototype.render = function () {
3418
+ var item = this.props.item;
3419
+ if (!item)
3420
+ return null;
3421
+ return (React__namespace.createElement("div", { className: "svc-icon-item" },
3422
+ React__namespace.createElement(surveyReactUi.SvgIcon, { className: "svc-icon-item__icon", size: "auto", iconName: item.value }),
3423
+ React__namespace.createElement("span", { className: "svc-icon-item__text" }, item.title)));
3424
+ };
3425
+ return IconItem;
3426
+ }(React__namespace.Component));
3427
+ surveyReactUi.ReactElementFactory.Instance.registerElement("svc-presets-icon-item", function (props) {
3428
+ return React__namespace.createElement(IconItem, props);
3429
+ });
3430
+
3457
3431
  var SwitcherComponent = /** @class */ (function (_super) {
3458
3432
  __extends(SwitcherComponent, _super);
3459
3433
  function SwitcherComponent() {
@@ -3512,6 +3486,30 @@
3512
3486
  return React__namespace.createElement(ItemTemplateComponent$1, props);
3513
3487
  });
3514
3488
 
3489
+ var TabContainerComponent = /** @class */ (function (_super) {
3490
+ __extends(TabContainerComponent, _super);
3491
+ function TabContainerComponent(props) {
3492
+ return _super.call(this, props) || this;
3493
+ }
3494
+ TabContainerComponent.prototype.getStateElement = function () {
3495
+ return this.model;
3496
+ };
3497
+ Object.defineProperty(TabContainerComponent.prototype, "model", {
3498
+ get: function () {
3499
+ return this.props.data;
3500
+ },
3501
+ enumerable: false,
3502
+ configurable: true
3503
+ });
3504
+ TabContainerComponent.prototype.renderElement = function () {
3505
+ return React__namespace.createElement(ComponentContainer, { model: this.model.containerModel });
3506
+ };
3507
+ return TabContainerComponent;
3508
+ }(surveyReactUi.SurveyElementBase));
3509
+ surveyReactUi.ReactElementFactory.Instance.registerElement("svc-tab-container", function (props) {
3510
+ return React__namespace.createElement(TabContainerComponent, props);
3511
+ });
3512
+
3515
3513
  var SurveyQuestionSpinEditor = /** @class */ (function (_super) {
3516
3514
  __extends(SurveyQuestionSpinEditor, _super);
3517
3515
  function SurveyQuestionSpinEditor(props) {
@@ -3539,15 +3537,49 @@
3539
3537
  return this.question.renderedValue;
3540
3538
  };
3541
3539
  SurveyQuestionSpinEditor.prototype.renderButtons = function () {
3542
- var _this = this;
3543
- return (React__namespace.createElement("span", { className: this.question.cssClasses.buttonsContainer },
3544
- React__namespace.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: function (event) { return _this.question.onBlur(event.nativeEvent); }, onFocus: function (event) { return _this.question.onFocus(event.nativeEvent); } },
3545
- React__namespace.createElement(surveyReactUi.SvgIcon, { iconName: this.question.cssClasses.decreaseButtonIcon, size: "auto" })),
3546
- React__namespace.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: function (event) { return _this.question.onBlur(event.nativeEvent); }, onFocus: function (event) { return _this.question.onFocus(event.nativeEvent); } },
3547
- React__namespace.createElement(surveyReactUi.SvgIcon, { iconName: this.question.cssClasses.increaseButtonIcon, size: "auto" }))));
3540
+ return React__namespace.createElement(surveyReactUi.SurveyActionBar, { model: this.question.inputActionsContainer });
3548
3541
  };
3549
3542
  return SurveyQuestionSpinEditor;
3550
3543
  }(surveyReactUi.SurveyQuestionText));
3544
+ var SurveySpinEditorButton = /** @class */ (function (_super) {
3545
+ __extends(SurveySpinEditorButton, _super);
3546
+ function SurveySpinEditorButton() {
3547
+ return _super !== null && _super.apply(this, arguments) || this;
3548
+ }
3549
+ Object.defineProperty(SurveySpinEditorButton.prototype, "item", {
3550
+ get: function () {
3551
+ return this.props.item;
3552
+ },
3553
+ enumerable: false,
3554
+ configurable: true
3555
+ });
3556
+ Object.defineProperty(SurveySpinEditorButton.prototype, "itemAction", {
3557
+ get: function () {
3558
+ return this.props.item;
3559
+ },
3560
+ enumerable: false,
3561
+ configurable: true
3562
+ });
3563
+ SurveySpinEditorButton.prototype.getStateElement = function () {
3564
+ return this.itemAction;
3565
+ };
3566
+ Object.defineProperty(SurveySpinEditorButton.prototype, "question", {
3567
+ get: function () {
3568
+ return this.item.data.question;
3569
+ },
3570
+ enumerable: false,
3571
+ configurable: true
3572
+ });
3573
+ SurveySpinEditorButton.prototype.renderElement = function () {
3574
+ var _this = this;
3575
+ return React__namespace.createElement("button", { tabIndex: -1, "aria-hidden": "true", className: this.itemAction.getActionBarItemCss(), disabled: this.itemAction.disabled, onClick: function () { return _this.item.action(); }, onMouseDown: this.item.data.onMouseDown, onMouseUp: this.question.onButtonMouseUp, onMouseLeave: this.question.onButtonMouseLeave, onBlur: function (event) { return _this.question.onBlur(event.nativeEvent); }, onFocus: function (event) { return _this.question.onFocus(event.nativeEvent); } },
3576
+ React__namespace.createElement(surveyReactUi.SvgIcon, { className: this.itemAction.cssClasses.itemIcon, iconName: this.item.iconName, size: "auto" }));
3577
+ };
3578
+ return SurveySpinEditorButton;
3579
+ }(surveyReactUi.SurveyElementBase));
3580
+ surveyReactUi.ReactElementFactory.Instance.registerElement("sv-spinedit-button", function (props) {
3581
+ return React__namespace.createElement(SurveySpinEditorButton, props);
3582
+ });
3551
3583
  surveyReactUi.ReactQuestionFactory.Instance.registerQuestion("spinedit", function (props) {
3552
3584
  return React__namespace.createElement(SurveyQuestionSpinEditor, props);
3553
3585
  });
@@ -3588,10 +3620,11 @@
3588
3620
  };
3589
3621
  SurveyQuestionColor.prototype.renderElement = function () {
3590
3622
  var _this = this;
3591
- return (React__namespace.createElement("div", { className: this.question.cssClasses.root, onKeyDown: function (event) { return _this.question.onKeyDown(event.nativeEvent); } },
3592
- this.renderColorSwatch(),
3593
- this.renderInput(),
3594
- this.question.showDropdownAction ? this.renderDropdownAction() : null));
3623
+ return (React__namespace.createElement("div", { className: this.question.cssClasses.rootWrapper },
3624
+ React__namespace.createElement("div", { className: this.question.cssClasses.root, onKeyDown: function (event) { return _this.question.onKeyDown(event.nativeEvent); } },
3625
+ this.renderColorSwatch(),
3626
+ this.renderInput(),
3627
+ this.renderButtons())));
3595
3628
  };
3596
3629
  SurveyQuestionColor.prototype.getValueCore = function () {
3597
3630
  return this.question.renderedValue;
@@ -3602,13 +3635,8 @@
3602
3635
  React__namespace.createElement(surveyReactUi.SvgIcon, { iconName: this.question.cssClasses.swatchIcon, size: "auto" }),
3603
3636
  React__namespace.createElement("input", { type: "color", disabled: this.isDisplayMode, value: this.question.renderedColorValue, className: this.question.cssClasses.colorInput, onChange: function (event) { return _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 }));
3604
3637
  };
3605
- SurveyQuestionColor.prototype.renderDropdownAction = function () {
3606
- return (React__namespace.createElement(React__namespace.Fragment, null,
3607
- React__namespace.createElement("div", { "aria-hidden": "true", className: this.question.cssClasses.choicesButtonWrapper }, surveyReactUi.ReactElementFactory.Instance.createElement("sv-action-bar-item", { item: this.question.dropdownAction })),
3608
- this.renderPopup()));
3609
- };
3610
- SurveyQuestionColor.prototype.renderPopup = function () {
3611
- return React__namespace.createElement(surveyReactUi.Popup, { model: this.question.dropdownAction.popupModel });
3638
+ SurveyQuestionColor.prototype.renderButtons = function () {
3639
+ return this.question.hasVisibleInputActions ? React__namespace.createElement(surveyReactUi.SurveyActionBar, { model: this.question.inputActionsContainer }) : null;
3612
3640
  };
3613
3641
  return SurveyQuestionColor;
3614
3642
  }(surveyReactUi.SurveyQuestionText));
@@ -3636,36 +3664,54 @@
3636
3664
  return (React__namespace.createElement(React__namespace.Fragment, null,
3637
3665
  React__namespace.createElement("input", { disabled: this.question.isTextInputReadOnly, className: this.questionFile.cssClasses.control, placeholder: this.questionFile.renderedPlaceholder, ref: function (input) { return (_this.setControl(input)); }, autoComplete: "off", type: "text", onBlur: function (event) { return _this.questionFile.onInputBlur(event.nativeEvent); }, onChange: function (event) { return _this.questionFile.onInputChange(event.nativeEvent); } })));
3638
3666
  };
3639
- SurveyQuestionFileEditor.prototype.renderFileInput = function () {
3640
- var _this = this;
3641
- return (React__namespace.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: function (event) { return _this.questionFile.onFileInputChange(event.nativeEvent); } }));
3642
- };
3643
3667
  SurveyQuestionFileEditor.prototype.renderButtons = function () {
3644
- return (React__namespace.createElement("div", { className: this.questionFile.cssClasses.buttonsContainer },
3645
- this.renderClearButton(),
3646
- this.renderChooseButton()));
3647
- };
3648
- SurveyQuestionFileEditor.prototype.renderClearButton = function () {
3649
- return surveyReactUi.attachKey2click((React__namespace.createElement("button", { className: this.questionFile.cssClasses.clearButton, title: this.questionFile.clearButtonCaption, disabled: this.questionFile.getIsClearButtonDisabled(), onClick: this.questionFile.doClean },
3650
- React__namespace.createElement(surveyReactUi.SvgIcon, { iconName: this.questionFile.cssClasses.clearButtonIcon, size: "auto" }))));
3651
- };
3652
- SurveyQuestionFileEditor.prototype.renderChooseButton = function () {
3653
- var _this = this;
3654
- return (surveyReactUi.attachKey2click(React__namespace.createElement("label", { onClick: function (event) { return _this.questionFile.chooseFiles(event.nativeEvent); }, className: this.questionFile.getChooseButtonCss(), htmlFor: this.questionFile.inputId, "aria-label": this.questionFile.chooseButtonCaption },
3655
- React__namespace.createElement(surveyReactUi.SvgIcon, { iconName: this.questionFile.cssClasses.chooseButtonIcon, size: "auto", title: this.questionFile.chooseButtonCaption }))));
3668
+ return this.question.hasVisibleInputActions ? React__namespace.createElement(surveyReactUi.SurveyActionBar, { model: this.questionFile.inputActionsContainer }) : null;
3656
3669
  };
3657
3670
  SurveyQuestionFileEditor.prototype.renderElement = function () {
3658
3671
  var _this = this;
3659
3672
  return (React__namespace.createElement("div", { className: this.questionFile.cssClasses.root, ref: function (el) { return _this.setContent(el); }, onDragEnter: this.questionFile.onDragEnter, onDragOver: this.questionFile.onDragOver, onDrop: this.questionFile.onDrop, onDragLeave: this.questionFile.onDragLeave, onKeyDown: function (event) { return _this.question.onKeyDown(event.nativeEvent); } },
3660
3673
  this.renderInput(),
3661
- this.renderFileInput(),
3662
3674
  this.renderButtons()));
3663
3675
  };
3664
3676
  return SurveyQuestionFileEditor;
3665
3677
  }(surveyReactUi.SurveyQuestionText));
3678
+ var SurveyQuestionFileEditorButton = /** @class */ (function (_super) {
3679
+ __extends(SurveyQuestionFileEditorButton, _super);
3680
+ function SurveyQuestionFileEditorButton() {
3681
+ return _super !== null && _super.apply(this, arguments) || this;
3682
+ }
3683
+ Object.defineProperty(SurveyQuestionFileEditorButton.prototype, "item", {
3684
+ get: function () {
3685
+ return this.props.item;
3686
+ },
3687
+ enumerable: false,
3688
+ configurable: true
3689
+ });
3690
+ Object.defineProperty(SurveyQuestionFileEditorButton.prototype, "question", {
3691
+ get: function () {
3692
+ return this.props.item.data.question;
3693
+ },
3694
+ enumerable: false,
3695
+ configurable: true
3696
+ });
3697
+ SurveyQuestionFileEditorButton.prototype.getStateElement = function () {
3698
+ return this.item;
3699
+ };
3700
+ SurveyQuestionFileEditorButton.prototype.renderElement = function () {
3701
+ var _this = this;
3702
+ return (React__namespace.createElement("div", null,
3703
+ surveyReactUi.attachKey2click(React__namespace.createElement("label", { onClick: function (event) { return _this.question.chooseFiles(event.nativeEvent); }, className: this.item.getActionBarItemCss(), htmlFor: this.question.inputId, "aria-label": this.question.chooseButtonCaption },
3704
+ React__namespace.createElement(surveyReactUi.SvgIcon, { iconName: this.item.iconName, size: "auto", title: this.item.title, className: this.item.cssClasses.itemIcon }))),
3705
+ React__namespace.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: function (event) { return _this.question.onFileInputChange(event.nativeEvent); } })));
3706
+ };
3707
+ return SurveyQuestionFileEditorButton;
3708
+ }(surveyReactUi.SurveyElementBase));
3666
3709
  surveyReactUi.ReactQuestionFactory.Instance.registerQuestion("fileedit", function (props) {
3667
3710
  return React__namespace.createElement(SurveyQuestionFileEditor, props);
3668
3711
  });
3712
+ surveyReactUi.ReactElementFactory.Instance.registerElement("sv-fileedit-button", function (props) {
3713
+ return React__namespace.createElement(SurveyQuestionFileEditorButton, props);
3714
+ });
3669
3715
 
3670
3716
  var SurveyQuestionBooleanSwitch = /** @class */ (function (_super) {
3671
3717
  __extends(SurveyQuestionBooleanSwitch, _super);
@@ -3692,8 +3738,8 @@
3692
3738
  surveyCore.RendererFactory.Instance.registerRenderer("boolean", "switch", "sv-boolean-switch");
3693
3739
 
3694
3740
  exports.Version = void 0;
3695
- exports.Version = "".concat("3.0.0-beta.2");
3696
- surveyCore.checkLibraryVersion("".concat("3.0.0-beta.2"), "survey-creator-react");
3741
+ exports.Version = "".concat("3.0.0-beta.4");
3742
+ surveyCore.checkLibraryVersion("".concat("3.0.0-beta.4"), "survey-creator-react");
3697
3743
 
3698
3744
  Object.defineProperty(exports, "PropertyGridEditorCollection", {
3699
3745
  enumerable: true,
@@ -3733,10 +3779,12 @@
3733
3779
  });
3734
3780
  exports.ActionButton = ActionButton;
3735
3781
  exports.AdaptiveToolbox = AdaptiveToolbox;
3782
+ exports.AddQuestionButtonComponent = AddQuestionButtonComponent;
3736
3783
  exports.CellQuestionAdornerComponent = CellQuestionAdornerComponent;
3737
3784
  exports.CellQuestionDropdownAdornerComponent = CellQuestionDropdownAdornerComponent;
3738
3785
  exports.ComponentContainer = ComponentContainer;
3739
3786
  exports.CreatorSurveyPageComponent = CreatorSurveyPageComponent;
3787
+ exports.IconItem = IconItem;
3740
3788
  exports.ImageItemValueAdornerComponent = ImageItemValueAdornerComponent;
3741
3789
  exports.ItemValueAdornerComponent = ItemValueAdornerComponent;
3742
3790
  exports.LogoImageComponent = LogoImageComponent;
@@ -3759,6 +3807,7 @@
3759
3807
  exports.RowWrapper = RowWrapper;
3760
3808
  exports.SearchComponent = SearchComponent;
3761
3809
  exports.SideBarDefaultHeader = SideBarDefaultHeader;
3810
+ exports.SideBarLaunchCard = SideBarLaunchCard;
3762
3811
  exports.SidebarComponent = SidebarComponent;
3763
3812
  exports.SurveyCreator = SurveyCreator;
3764
3813
  exports.SurveyCreatorComponent = SurveyCreatorComponent;
@@ -3773,21 +3822,22 @@
3773
3822
  exports.SurveyQuestionBooleanSwitch = SurveyQuestionBooleanSwitch;
3774
3823
  exports.SurveyQuestionColor = SurveyQuestionColor;
3775
3824
  exports.SurveyQuestionFileEditor = SurveyQuestionFileEditor;
3825
+ exports.SurveyQuestionFileEditorButton = SurveyQuestionFileEditorButton;
3776
3826
  exports.SurveyQuestionLinkValue = SurveyQuestionLinkValue;
3777
3827
  exports.SurveyQuestionSpinEditor = SurveyQuestionSpinEditor;
3778
3828
  exports.SurveyResults = SurveyResults;
3779
3829
  exports.SurveyResultsByRow = SurveyResultsByRow;
3780
3830
  exports.SurveySimulator = SurveySimulator;
3831
+ exports.SurveySpinEditorButton = SurveySpinEditorButton;
3781
3832
  exports.SwitcherComponent = SwitcherComponent;
3782
3833
  exports.TabButtonComponent = TabButtonComponent;
3834
+ exports.TabContainerComponent = TabContainerComponent;
3783
3835
  exports.TabDesignerComponent = TabDesignerComponent;
3784
3836
  exports.TabJsonEditorAceComponent = TabJsonEditorAceComponent;
3785
3837
  exports.TabJsonEditorErrorsComponent = TabJsonEditorErrorsComponent;
3786
3838
  exports.TabJsonEditorTextareaComponent = TabJsonEditorTextareaComponent;
3787
- exports.TabLogicAddButtonComponent = TabLogicAddButtonComponent;
3788
3839
  exports.TabLogicComponent = TabLogicComponent;
3789
3840
  exports.TabPreviewSurveyComponent = TabPreviewSurveyComponent;
3790
- exports.TabPreviewTestSurveyAgainComponent = TabPreviewTestSurveyAgainComponent;
3791
3841
  exports.TabThemeSurveyComponent = TabThemeSurveyComponent;
3792
3842
  exports.TabTranslationComponent = TabTranslationComponent;
3793
3843
  exports.TabbedMenuComponent = TabbedMenuComponent;