config-editor-base 2.0.0 → 2.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -18198,6 +18198,47 @@ function EditorNavs(_ref) {
18198
18198
  }))))));
18199
18199
  }
18200
18200
 
18201
+ function ArrayFieldTemplate(props) {
18202
+ return /*#__PURE__*/React.createElement("div", {
18203
+ className: "reset-margins"
18204
+ }, /*#__PURE__*/React.createElement("legend", null, props.title), /*#__PURE__*/React.createElement("p", null, props.schema.description), props.items && props.items.map(function (element) {
18205
+ return /*#__PURE__*/React.createElement("div", {
18206
+ key: element.index
18207
+ }, /*#__PURE__*/React.createElement("div", {
18208
+ className: "position-relative"
18209
+ }, /*#__PURE__*/React.createElement("div", {
18210
+ className: "rjsf-array-list"
18211
+ }, /*#__PURE__*/React.createElement("div", null, element.children), /*#__PURE__*/React.createElement("div", {
18212
+ className: "special-array-buttons"
18213
+ }, element.hasMoveDown && /*#__PURE__*/React.createElement("button", {
18214
+ className: "btn btn-default array-item-move-down",
18215
+ onClick: element.onReorderClick(element.index, element.index + 1)
18216
+ }, /*#__PURE__*/React.createElement("i", {
18217
+ className: "glyphicon glyphicon-arrow-down"
18218
+ })), element.hasMoveUp && /*#__PURE__*/React.createElement("button", {
18219
+ className: "btn btn-default array-item-move-up",
18220
+ onClick: element.onReorderClick(element.index, element.index - 1)
18221
+ }, /*#__PURE__*/React.createElement("i", {
18222
+ className: "glyphicon glyphicon-arrow-up"
18223
+ })), /*#__PURE__*/React.createElement("button", {
18224
+ className: "btn btn-danger array-item-remove",
18225
+ onClick: element.onDropIndexClick(element.index)
18226
+ }, /*#__PURE__*/React.createElement("i", {
18227
+ className: "glyphicon glyphicon-remove"
18228
+ }))))));
18229
+ }), props.canAdd && /*#__PURE__*/React.createElement("div", {
18230
+ className: "add-row-button"
18231
+ }, /*#__PURE__*/React.createElement("p", {
18232
+ className: "col-xs-2 col-xs-offset-10 array-item-add text-right"
18233
+ }, /*#__PURE__*/React.createElement("button", {
18234
+ className: "btn btn-info btn-add col-xs-12",
18235
+ onClick: props.onAddClick,
18236
+ type: "button"
18237
+ }, /*#__PURE__*/React.createElement("i", {
18238
+ className: "glyphicon glyphicon-plus"
18239
+ }), " "))));
18240
+ }
18241
+
18201
18242
  var selectOptions$1 = function selectOptions(Files) {
18202
18243
  Files = lodash.orderBy(Files, ["name"], ["desc"]);
18203
18244
  return [].concat(Files, [{
@@ -18701,6 +18742,9 @@ var EditorSection = /*#__PURE__*/function (_React$Component) {
18701
18742
  onChange: this.handleChange,
18702
18743
  onError: this.handleError,
18703
18744
  onNavChange: this.onNavChange.bind(this),
18745
+ templates: {
18746
+ ArrayFieldTemplate: ArrayFieldTemplate
18747
+ },
18704
18748
  activeNav: activatedTab
18705
18749
  }, /*#__PURE__*/React.createElement(EditorChangesComparison$1, {
18706
18750
  isCompareChanges: this.state.isCompareChanges,