superdesk-ui-framework 3.1.13 → 3.1.14

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "superdesk-ui-framework",
3
- "version": "3.1.13",
3
+ "version": "3.1.14",
4
4
  "license": "AGPL-3.0",
5
5
  "repository": {
6
6
  "type": "git",
@@ -15,7 +15,6 @@ interface IDatePicker extends IDatePickerBase {
15
15
  onChange(valueNext: Date | null): void;
16
16
  maxDate?: Date;
17
17
  minDate?: Date;
18
- showButtonBar?: boolean;
19
18
  'data-test-id'?: string;
20
19
  }
21
20
  interface IState {
@@ -61,6 +61,7 @@ var calendar_1 = require("@superdesk/primereact/calendar");
61
61
  var lodash_1 = require("lodash");
62
62
  var react_id_generator_1 = __importDefault(require("react-id-generator"));
63
63
  var Form_1 = require("./Form");
64
+ var Button_1 = require("./Button");
64
65
  var internalPrimereactClassnames = {
65
66
  overlayVisible: 'p-input-overlay-visible',
66
67
  };
@@ -137,7 +138,10 @@ var DatePicker = /** @class */ (function (_super) {
137
138
  React.createElement("span", null, (0, moment_1.default)(this.state.value).format(this.props.dateFormat))));
138
139
  }
139
140
  return (React.createElement(Form_1.InputWrapper, { label: this.props.label, error: this.props.error, invalid: this.props.error != null, required: this.props.required, disabled: this.props.disabled, info: this.props.info, inlineLabel: this.props.inlineLabel, labelHidden: this.props.labelHidden, htmlId: this.htmlId, tabindex: this.props.tabindex },
140
- React.createElement(calendar_1.Calendar, { showButtonBar: this.props.showButtonBar, inputId: this.htmlId, ariaLabelledBy: this.htmlId + 'label', ref: function (ref) {
141
+ React.createElement(calendar_1.Calendar, { footerTemplate: this.props.required !== true ? function () { return (React.createElement("div", { className: 'd-flex justify-end' },
142
+ React.createElement(Button_1.Button, { onClick: function () {
143
+ _this.props.onChange(null);
144
+ }, text: 'Clear', "data-test-id": 'clear-button' }))); } : undefined, inputId: this.htmlId, ariaLabelledBy: this.htmlId + 'label', ref: function (ref) {
141
145
  _this.instance = ref;
142
146
  var refAny = ref;
143
147
  if (_this.props['data-test-id'] != null && (refAny === null || refAny === void 0 ? void 0 : refAny.inputElement) != null) {