superdesk-ui-framework 3.0.1-beta.11 → 3.0.1-beta.12

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.
Files changed (32) hide show
  1. package/app/styles/_modals.scss +3 -3
  2. package/app/styles/_table-list.scss +100 -11
  3. package/app/styles/grids/_grid-layout.scss +3 -0
  4. package/app-typescript/components/Dropdown.tsx +20 -7
  5. package/app-typescript/components/DurationInput.tsx +7 -1
  6. package/app-typescript/components/Layouts/CoreLayout.tsx +2 -1
  7. package/app-typescript/components/Layouts/CoreLayoutMain.tsx +7 -1
  8. package/app-typescript/components/Lists/TableList.tsx +138 -25
  9. package/app-typescript/components/SearchBar.tsx +11 -3
  10. package/app-typescript/components/TimePicker.tsx +2 -13
  11. package/dist/examples.bundle.js +1681 -1533
  12. package/dist/playgrounds/react-playgrounds/CoreLayout.tsx +1 -0
  13. package/dist/react/TableList.tsx +15 -119
  14. package/dist/superdesk-ui.bundle.css +85 -17
  15. package/dist/superdesk-ui.bundle.js +1476 -1316
  16. package/dist/vendor.bundle.js +14 -14
  17. package/examples/pages/playgrounds/react-playgrounds/CoreLayout.tsx +1 -0
  18. package/examples/pages/react/TableList.tsx +15 -119
  19. package/package.json +1 -1
  20. package/react/components/Dropdown.d.ts +2 -1
  21. package/react/components/Dropdown.js +9 -4
  22. package/react/components/DurationInput.js +9 -1
  23. package/react/components/Layouts/CoreLayout.d.ts +1 -0
  24. package/react/components/Layouts/CoreLayout.js +1 -1
  25. package/react/components/Layouts/CoreLayoutMain.d.ts +1 -0
  26. package/react/components/Layouts/CoreLayoutMain.js +8 -1
  27. package/react/components/Lists/TableList.d.ts +22 -6
  28. package/react/components/Lists/TableList.js +78 -19
  29. package/react/components/SearchBar.d.ts +1 -1
  30. package/react/components/SearchBar.js +15 -7
  31. package/react/components/TimePicker.d.ts +1 -5
  32. package/react/components/TimePicker.js +3 -7
@@ -91,14 +91,22 @@ var SearchBar = /** @class */ (function (_super) {
91
91
  }
92
92
  }, onChange: function (event) { return _this.setState({ inputValue: event.target.value }); }, onFocus: function () { return _this.setState({ focused: true }); } }),
93
93
  this.state.inputValue &&
94
- React.createElement("button", { className: "sd-searchbar__cancel", onClick: function () { return _this.setState({ inputValue: '' }); } },
94
+ React.createElement("button", { className: "sd-searchbar__cancel", onClick: function () {
95
+ _this.setState({ inputValue: '' });
96
+ setTimeout(function () {
97
+ if (_this.props.onSubmit) {
98
+ _this.props.onSubmit(_this.state.inputValue);
99
+ }
100
+ });
101
+ } },
95
102
  React.createElement(Icon_1.Icon, { name: 'remove-sign' })),
96
- React.createElement("button", { id: "sd-searchbar__search-btn", className: "sd-searchbar__search-btn ".concat(this.state.keyDown ? 'sd-searchbar__search-btn--active' : ''), onClick: function () {
97
- if (_this.props.onSubmit) {
98
- _this.props.onSubmit(_this.state.inputValue);
99
- }
100
- } },
101
- React.createElement(Icon_1.Icon, { name: 'chevron-right-thin' }))));
103
+ this.state.inputValue &&
104
+ React.createElement("button", { id: "sd-searchbar__search-btn", className: "sd-searchbar__search-btn ".concat(this.state.keyDown ? 'sd-searchbar__search-btn--active' : ''), onClick: function () {
105
+ if (_this.props.onSubmit) {
106
+ _this.props.onSubmit(_this.state.inputValue);
107
+ }
108
+ } },
109
+ React.createElement(Icon_1.Icon, { name: 'chevron-right-thin' }))));
102
110
  };
103
111
  return SearchBar;
104
112
  }(React.PureComponent));
@@ -14,12 +14,8 @@ interface IProps {
14
14
  info?: string;
15
15
  error?: string;
16
16
  }
17
- interface IState {
18
- invalid: boolean;
19
- }
20
- export declare class TimePicker extends React.PureComponent<IProps, IState> {
17
+ export declare class TimePicker extends React.PureComponent<IProps> {
21
18
  private htmlId;
22
- constructor(props: IProps);
23
19
  render(): JSX.Element;
24
20
  }
25
21
  export {};
@@ -39,22 +39,18 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
39
39
  Object.defineProperty(exports, "__esModule", { value: true });
40
40
  exports.TimePicker = void 0;
41
41
  var React = __importStar(require("react"));
42
- // import classNames from 'classnames';
43
42
  var react_id_generator_1 = __importDefault(require("react-id-generator"));
44
43
  var Form_1 = require("./Form");
45
44
  var TimePicker = /** @class */ (function (_super) {
46
45
  __extends(TimePicker, _super);
47
- function TimePicker(props) {
48
- var _this = _super.call(this, props) || this;
46
+ function TimePicker() {
47
+ var _this = _super !== null && _super.apply(this, arguments) || this;
49
48
  _this.htmlId = (0, react_id_generator_1.default)();
50
- _this.state = {
51
- invalid: _this.props.invalid ? _this.props.invalid : false,
52
- };
53
49
  return _this;
54
50
  }
55
51
  TimePicker.prototype.render = function () {
56
52
  var _this = this;
57
- return (React.createElement(Form_1.InputWrapper, { label: this.props.label, error: this.props.error, required: this.props.required, disabled: this.props.disabled, invalid: this.state.invalid, info: this.props.info, inlineLabel: this.props.inlineLabel, labelHidden: this.props.labelHidden, fullWidth: this.props.fullWidth, htmlId: this.htmlId, tabindex: this.props.tabindex },
53
+ return (React.createElement(Form_1.InputWrapper, { label: this.props.label, error: this.props.error, required: this.props.required, disabled: this.props.disabled, invalid: this.props.invalid, info: this.props.info, inlineLabel: this.props.inlineLabel, labelHidden: this.props.labelHidden, fullWidth: this.props.fullWidth, htmlId: this.htmlId, tabindex: this.props.tabindex },
58
54
  React.createElement("input", { id: this.htmlId, "aria-labelledby": this.htmlId + 'label', type: "time", step: this.props.allowSeconds ? 1 : undefined, className: "sd-input__input", value: this.props.value, required: this.props.required, disabled: this.props.disabled, onChange: function (event) {
59
55
  _this.props.onChange(event.target.value);
60
56
  } })));