superdesk-ui-framework 4.0.32 → 4.0.33

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.
@@ -79,7 +79,7 @@
79
79
  }
80
80
  }
81
81
 
82
- .form__row-item:not(.sd-flex-no-grow) {
82
+ .form__row-item:not(.sd-flex-no-grow, .form__row-item--no-grow) {
83
83
  flex-basis: 0;
84
84
  }
85
85
 
@@ -758,6 +758,7 @@
758
758
  .sd-input__input-container {
759
759
  grid-row: 2/3;
760
760
  grid-column: 2/4;
761
+ min-width: min-content;
761
762
  }
762
763
 
763
764
  .sd-input__input-container:has(input[type="time"]) {
@@ -26,6 +26,7 @@ interface IPropsPanel {
26
26
  | {custom: React.CSSProperties['width']};
27
27
  background?: 'transparent' | 'light' | 'grey'; // defaults to light (white)
28
28
  open?: boolean;
29
+ ['data-test-id']?: string;
29
30
  }
30
31
 
31
32
  export default class Panel extends React.PureComponent<IPropsPanel> {
@@ -52,7 +53,13 @@ export default class Panel extends React.PureComponent<IPropsPanel> {
52
53
  let classes2 = classNames('side-panel__container', classes2Obj);
53
54
 
54
55
  return (
55
- <div className={classes2} style={style} data-theme={this.props.theme ? `${this.props.theme}-ui` : null}>
56
+ <div
57
+ className={classes2}
58
+ style={style}
59
+ data-theme={this.props.theme ? `${this.props.theme}-ui` : null}
60
+ data-test-id={this.props['data-test-id']}
61
+
62
+ >
56
63
  <div className={classes}>
57
64
  {this.props.children}
58
65
  </div>
@@ -58,6 +58,7 @@ interface IMenuBranch {
58
58
  interface IProps {
59
59
  items: Array<IMenuItem>;
60
60
  children: (toggle: (event: SyntheticEvent) => void) => JSX.Element;
61
+ 'data-test-id'?: string;
61
62
  }
62
63
 
63
64
  function isSeparator(item: IMenuItem): item is ISeparator {
@@ -162,7 +163,7 @@ export class Menu extends React.Component<IProps, {}> {
162
163
  firstMenuItem.focus();
163
164
  }
164
165
  }}
165
- data-test-id="menu"
166
+ data-test-id={this.props['data-test-id'] ?? 'menu'}
166
167
  zIndex={this.zIndex}
167
168
  />
168
169
  </div>
@@ -9,6 +9,7 @@ interface IProps {
9
9
  items: Array<ISideBarTab | 'divider'>;
10
10
  side?: 'none' | 'left' | 'right';
11
11
  disabled?: boolean;
12
+ ['data-test-id']?: string;
12
13
  }
13
14
 
14
15
  export interface ISideBarTab {
@@ -44,7 +45,7 @@ export class SideBarTabs extends React.PureComponent<IProps> {
44
45
 
45
46
  render() {
46
47
  return (
47
- <div className='sd-sidetab-menu sd-sidetab-menu--static'>
48
+ <div className='sd-sidetab-menu sd-sidetab-menu--static' data-test-id={this.props['data-test-id']}>
48
49
  <ul>
49
50
  {this.props.items.map((item, index) => {
50
51
  if (item === 'divider') {
@@ -65,6 +66,8 @@ export class SideBarTabs extends React.PureComponent<IProps> {
65
66
  },
66
67
  )}
67
68
  onClick={() => this.handleClick(item)}
69
+ data-test-id='widget-icon'
70
+ data-test-value={item.id}
68
71
  >
69
72
  {item.badgeValue != null && (
70
73
  <Badge text={item['badgeValue']} type='primary' />
@@ -50,7 +50,7 @@ class Select extends React.Component<ISelect> {
50
50
  className='sd-input__select'
51
51
  id={this.htmlId}
52
52
  value={this.props.value}
53
- aria-describedby={this.htmlId}
53
+ aria-describedby={this.htmlId + 'label'}
54
54
  tabIndex={this.props.tabindex}
55
55
  onChange={this.handleChange}
56
56
  disabled={this.props.disabled || this.props.readonly}
@@ -5,6 +5,7 @@ interface IProps {
5
5
  color?: 'light' | 'darker' | 'blueGrey' | 'blueGreyDarker'; // defaults to 'light'
6
6
  theme?: 'light' | 'dark'; // defaults to 'light
7
7
  className?: string;
8
+ ['data-test-id']?: string;
8
9
  }
9
10
  interface IPropsDivider {
10
11
  width?: 'small' | 'medium' | 'large' | 'x-large'; // defaults to 'medium'
@@ -38,6 +39,7 @@ export class SubNav extends React.PureComponent<IProps> {
38
39
  <div
39
40
  data-theme={this.props.theme ? `${this.props.theme}-ui` : defaultTheme}
40
41
  className={classes}
42
+ data-test-id={this.props['data-test-id']}
41
43
  >
42
44
  {this.props.children}
43
45
  </div>
@@ -65289,7 +65289,7 @@ var Panel = /** @class */ (function (_super) {
65289
65289
  style.width = this.props.size.custom;
65290
65290
  }
65291
65291
  var classes2 = (0, classnames_1.default)('side-panel__container', classes2Obj);
65292
- return (React.createElement("div", { className: classes2, style: style, "data-theme": this.props.theme ? "".concat(this.props.theme, "-ui") : null },
65292
+ return (React.createElement("div", { className: classes2, style: style, "data-theme": this.props.theme ? "".concat(this.props.theme, "-ui") : null, "data-test-id": this.props['data-test-id'] },
65293
65293
  React.createElement("div", { className: classes }, this.props.children)));
65294
65294
  };
65295
65295
  return Panel;
@@ -84623,7 +84623,7 @@ var Select = /** @class */ (function (_super) {
84623
84623
  }
84624
84624
  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, readonly: this.props.readonly, info: this.props.info, inlineLabel: this.props.inlineLabel, labelHidden: this.props.labelHidden, fullWidth: this.props.fullWidth, htmlId: this.htmlId, tabindex: this.props.tabindex },
84625
84625
  React.createElement("span", { className: 'sd-input__select-caret-wrapper' },
84626
- React.createElement("select", { className: 'sd-input__select', id: this.htmlId, value: this.props.value, "aria-describedby": this.htmlId, tabIndex: this.props.tabindex, onChange: this.handleChange, disabled: this.props.disabled || this.props.readonly, "data-test-id": this.props['data-test-id'] }, this.props.children))));
84626
+ React.createElement("select", { className: 'sd-input__select', id: this.htmlId, value: this.props.value, "aria-describedby": this.htmlId + 'label', tabIndex: this.props.tabindex, onChange: this.handleChange, disabled: this.props.disabled || this.props.readonly, "data-test-id": this.props['data-test-id'] }, this.props.children))));
84627
84627
  };
84628
84628
  return Select;
84629
84629
  }(React.Component));
@@ -128224,7 +128224,7 @@ var SubNav = /** @class */ (function (_super) {
128224
128224
  _a["subnav--".concat(this.props.color)] = this.props.color || this.props.color !== undefined,
128225
128225
  _a), this.props.className);
128226
128226
  var defaultTheme = darkColors.includes(this.props.color || '') ? 'dark-ui' : null;
128227
- return (React.createElement("div", { "data-theme": this.props.theme ? "".concat(this.props.theme, "-ui") : defaultTheme, className: classes }, this.props.children));
128227
+ return (React.createElement("div", { "data-theme": this.props.theme ? "".concat(this.props.theme, "-ui") : defaultTheme, className: classes, "data-test-id": this.props['data-test-id'] }, this.props.children));
128228
128228
  };
128229
128229
  return SubNav;
128230
128230
  }(React.PureComponent));
@@ -149174,6 +149174,7 @@ var Menu = /** @class */ (function (_super) {
149174
149174
  };
149175
149175
  Menu.prototype.render = function () {
149176
149176
  var _this = this;
149177
+ var _a;
149177
149178
  return (React.createElement(React.Fragment, null,
149178
149179
  this.props.children(this.toggle),
149179
149180
  React.createElement("div", { onKeyDown: function (event) {
@@ -149191,7 +149192,7 @@ var Menu = /** @class */ (function (_super) {
149191
149192
  if (firstMenuItem instanceof HTMLElement) {
149192
149193
  firstMenuItem.focus();
149193
149194
  }
149194
- }, "data-test-id": "menu", zIndex: this.zIndex }))));
149195
+ }, "data-test-id": (_a = this.props['data-test-id']) !== null && _a !== void 0 ? _a : 'menu', zIndex: this.zIndex }))));
149195
149196
  };
149196
149197
  return Menu;
149197
149198
  }(React.Component));
@@ -154430,7 +154431,7 @@ var SideBarTabs = /** @class */ (function (_super) {
154430
154431
  };
154431
154432
  SideBarTabs.prototype.render = function () {
154432
154433
  var _this = this;
154433
- return (React.createElement("div", { className: 'sd-sidetab-menu sd-sidetab-menu--static' },
154434
+ return (React.createElement("div", { className: 'sd-sidetab-menu sd-sidetab-menu--static', "data-test-id": this.props['data-test-id'] },
154434
154435
  React.createElement("ul", null, this.props.items.map(function (item, index) {
154435
154436
  if (item === 'divider') {
154436
154437
  return (React.createElement("li", { key: index, className: 'sd-sidetab-menu__spacer' }));
@@ -154438,7 +154439,7 @@ var SideBarTabs = /** @class */ (function (_super) {
154438
154439
  else {
154439
154440
  return (React.createElement("li", { key: index, "data-sd-tooltip": item.tooltip, "data-flow": 'left' },
154440
154441
  React.createElement("button", { disabled: _this.props.disabled, role: 'button', "aria-label": item.tooltip, className: (0, classnames_1.default)('sd-sidetab-menu__btn', { 'sd-sidetab-menu__btn--active': item.id === _this.props.activeTab && _this.props.disabled !== true,
154441
- }), onClick: function () { return _this.handleClick(item); } },
154442
+ }), onClick: function () { return _this.handleClick(item); }, "data-test-id": 'widget-icon', "data-test-value": item.id },
154442
154443
  item.badgeValue != null && (React.createElement(Badge_1.Badge, { text: item['badgeValue'], type: 'primary' })),
154443
154444
  React.createElement("span", { className: 'sd-sidetab-menu__main-icon ' },
154444
154445
  React.createElement(Icon_1.Icon, { size: item['size'], name: item['icon'] })),
@@ -188158,7 +188159,7 @@ exports.ThreePaneLayoutPattern = ThreePaneLayoutPattern;
188158
188159
  /* 938 */
188159
188160
  /***/ (function(module, exports) {
188160
188161
 
188161
- module.exports = {"name":"superdesk-ui-framework","version":"4.0.32","license":"AGPL-3.0","repository":{"type":"git","url":"https://github.com/superdesk/superdesk-ui-framework.git"},"main":"dist/superdesk-ui.bundle.js","types":"react/index.d.ts","contributors":["Nemanja Pavlovic","Vladimir Stefanovic","Darko Tomic","Aleksandar Jelicic","Tomas Kikutis","Dragana Zivkovic"],"scripts":{"start":"webpack-dev-server --config tasks/webpack.dev.js","server":"webpack --watch --config tasks/webpack.prod.js && tsc-watch","build":"webpack --config tasks/webpack.prod.js && tsc","build-ui":"webpack && tsc && npm run lint","playground-lint":"tsc -p examples/pages/playgrounds/react-playgrounds --noEmit","lint":"eslint --parser=@typescript-eslint/parser app && tslint -c tslint.json 'app-typescript/**/*.{ts,tsx}' && npm run playground-lint","lint-fix":"tsc -p tsconfig.json --noEmit && tslint --fix -c tslint.json 'app-typescript/**/*.{ts,tsx}'","prepublishOnly":"npm run build","unit-test":"mocha","debug-unit-tests":"mocha --inspect-brk"},"devDependencies":{"@types/assert":"^1.5.6","@types/chart.js":"^2.9.24","@types/classnames":"^2.2.9","@types/enzyme":"^3.10.12","@types/enzyme-adapter-react-16":"^1.0.6","@types/lodash":"^4.14.161","@types/mocha":"^9.1.1","@types/react":"16.8.23","@types/react-beautiful-dnd":"^13.1.2","@types/react-dom":"16.8.0","@types/react-router-dom":"^5.1.2","@types/react-scrollspy":"^3.3.5","@typescript-eslint/parser":"^5.58.0","angular":"^1.7.9","angular-animate":"^1.7.9","angular-route":"^1.7.9","babel-core":"^6.26.0","babel-loader":"^7.1.2","babel-plugin-transform-object-rest-spread":"^6.26.0","babel-preset-es2015":"^6.24.1","babel-preset-react":"^6.24.1","classnames":"^2.2.5","clean-webpack-plugin":"^1.0.0","code-prettify":"^0.1.0","copy-webpack-plugin":"^4.6.0","css-loader":"^2.1.1","enzyme":"^3.11.0","enzyme-adapter-react-16":"^1.15.7","eslint":"^4.6.1","eslint-loader":"^1.9.0","eslint-plugin-angular":"^3.1.1","eslint-plugin-react":"^7.3.0","extract-text-webpack-plugin":"^3.0.2","file-loader":"^0.11.2","html-loader":"^0.5.1","html-webpack-plugin":"^2.30.1","jquery":"^3.1.1","jquery-ui":"^1.12.1","jsdom":"20.0.3","jsdom-global":"3.0.2","lodash":"4.17.21","mocha":"^8.4.0","moment":"^2.29.3","node-sass":"6.0","prismjs":"^1.28.0","prop-types":"^15.6.0","react":"16.8.6","react-dom":"16.8.6","react-redux":"^5.0.6","react-router-dom":"^5.1.2","redux":"^3.7.2","redux-form":"^7.0.4","sass-loader":"^6.0.6","style-loader":"^0.18.2","superdesk-code-style":"^1.1.2","ts-loader":"^6.0.2","ts-node":"^10.9.1","tslint":"^5.18.0","typescript":"4.9.5","url-loader":"^1.1.2","webpack":"^3.5.5","webpack-cli":"3.3.10","webpack-dev-server":"2.11.1","webpack-merge":"^4.2.1"},"dependencies":{"@popperjs/core":"^2.4.0","@superdesk/common":"0.0.28","@superdesk/primereact":"^5.0.2-12","@superdesk/react-resizable-panels":"0.0.39","chart.js":"^2.9.3","date-fns":"2.7.0","popper-max-size-modifier":"^0.2.0","popper.js":"1.14.4","primeicons":"2.0.0","react-beautiful-dnd":"^13.0.0","react-id-generator":"^3.0.0","react-scrollspy":"^3.4.3","tippy.js":"^6.3.7"},"peerDependencies":{"moment":"*"},"volta":{"node":"14.21.3"}}
188162
+ module.exports = {"name":"superdesk-ui-framework","version":"4.0.33","license":"AGPL-3.0","repository":{"type":"git","url":"https://github.com/superdesk/superdesk-ui-framework.git"},"main":"dist/superdesk-ui.bundle.js","types":"react/index.d.ts","contributors":["Nemanja Pavlovic","Vladimir Stefanovic","Darko Tomic","Aleksandar Jelicic","Tomas Kikutis","Dragana Zivkovic"],"scripts":{"start":"webpack-dev-server --config tasks/webpack.dev.js","server":"webpack --watch --config tasks/webpack.prod.js && tsc-watch","build":"webpack --config tasks/webpack.prod.js && tsc","build-ui":"webpack && tsc && npm run lint","playground-lint":"tsc -p examples/pages/playgrounds/react-playgrounds --noEmit","lint":"eslint --parser=@typescript-eslint/parser app && tslint -c tslint.json 'app-typescript/**/*.{ts,tsx}' && npm run playground-lint","lint-fix":"tsc -p tsconfig.json --noEmit && tslint --fix -c tslint.json 'app-typescript/**/*.{ts,tsx}'","prepublishOnly":"npm run build","unit-test":"mocha","debug-unit-tests":"mocha --inspect-brk"},"devDependencies":{"@types/assert":"^1.5.6","@types/chart.js":"^2.9.24","@types/classnames":"^2.2.9","@types/enzyme":"^3.10.12","@types/enzyme-adapter-react-16":"^1.0.6","@types/lodash":"^4.14.161","@types/mocha":"^9.1.1","@types/react":"16.8.23","@types/react-beautiful-dnd":"^13.1.2","@types/react-dom":"16.8.0","@types/react-router-dom":"^5.1.2","@types/react-scrollspy":"^3.3.5","@typescript-eslint/parser":"^5.58.0","angular":"^1.7.9","angular-animate":"^1.7.9","angular-route":"^1.7.9","babel-core":"^6.26.0","babel-loader":"^7.1.2","babel-plugin-transform-object-rest-spread":"^6.26.0","babel-preset-es2015":"^6.24.1","babel-preset-react":"^6.24.1","classnames":"^2.2.5","clean-webpack-plugin":"^1.0.0","code-prettify":"^0.1.0","copy-webpack-plugin":"^4.6.0","css-loader":"^2.1.1","enzyme":"^3.11.0","enzyme-adapter-react-16":"^1.15.7","eslint":"^4.6.1","eslint-loader":"^1.9.0","eslint-plugin-angular":"^3.1.1","eslint-plugin-react":"^7.3.0","extract-text-webpack-plugin":"^3.0.2","file-loader":"^0.11.2","html-loader":"^0.5.1","html-webpack-plugin":"^2.30.1","jquery":"^3.1.1","jquery-ui":"^1.12.1","jsdom":"20.0.3","jsdom-global":"3.0.2","lodash":"4.17.21","mocha":"^8.4.0","moment":"^2.29.3","node-sass":"6.0","prismjs":"^1.28.0","prop-types":"^15.6.0","react":"16.8.6","react-dom":"16.8.6","react-redux":"^5.0.6","react-router-dom":"^5.1.2","redux":"^3.7.2","redux-form":"^7.0.4","sass-loader":"^6.0.6","style-loader":"^0.18.2","superdesk-code-style":"^1.1.2","ts-loader":"^6.0.2","ts-node":"^10.9.1","tslint":"^5.18.0","typescript":"4.9.5","url-loader":"^1.1.2","webpack":"^3.5.5","webpack-cli":"3.3.10","webpack-dev-server":"2.11.1","webpack-merge":"^4.2.1"},"dependencies":{"@popperjs/core":"^2.4.0","@superdesk/common":"0.0.28","@superdesk/primereact":"^5.0.2-12","@superdesk/react-resizable-panels":"0.0.39","chart.js":"^2.9.3","date-fns":"2.7.0","popper-max-size-modifier":"^0.2.0","popper.js":"1.14.4","primeicons":"2.0.0","react-beautiful-dnd":"^13.0.0","react-id-generator":"^3.0.0","react-scrollspy":"^3.4.3","tippy.js":"^6.3.7"},"peerDependencies":{"moment":"*"},"volta":{"node":"14.21.3"}}
188162
188163
 
188163
188164
  /***/ }),
188164
188165
  /* 939 */
@@ -39294,7 +39294,7 @@ textarea.sd-media-carousel__media-title {
39294
39294
  .form__row--flex .form__row-item:only-child {
39295
39295
  margin: 0; }
39296
39296
 
39297
- .form__row--flex .form__row-item:not(.sd-flex-no-grow) {
39297
+ .form__row--flex .form__row-item {
39298
39298
  flex-basis: 0; }
39299
39299
 
39300
39300
  .form__row--flex .form__row-item--no-grow {
@@ -40193,7 +40193,8 @@ textarea.sd-media-carousel__media-title {
40193
40193
  grid-column: 2/4; }
40194
40194
  .sd-input .sd-input__input-container {
40195
40195
  grid-row: 2/3;
40196
- grid-column: 2/4; }
40196
+ grid-column: 2/4;
40197
+ min-width: min-content; }
40197
40198
  .sd-input .sd-input__input-container:has(input[type="time"]) {
40198
40199
  min-width: 110px; }
40199
40200
  .sd-input textarea.sd-input__input {
@@ -64793,7 +64793,7 @@ var Panel = /** @class */ (function (_super) {
64793
64793
  style.width = this.props.size.custom;
64794
64794
  }
64795
64795
  var classes2 = (0, classnames_1.default)('side-panel__container', classes2Obj);
64796
- return (React.createElement("div", { className: classes2, style: style, "data-theme": this.props.theme ? "".concat(this.props.theme, "-ui") : null },
64796
+ return (React.createElement("div", { className: classes2, style: style, "data-theme": this.props.theme ? "".concat(this.props.theme, "-ui") : null, "data-test-id": this.props['data-test-id'] },
64797
64797
  React.createElement("div", { className: classes }, this.props.children)));
64798
64798
  };
64799
64799
  return Panel;
@@ -83744,7 +83744,7 @@ var Select = /** @class */ (function (_super) {
83744
83744
  }
83745
83745
  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, readonly: this.props.readonly, info: this.props.info, inlineLabel: this.props.inlineLabel, labelHidden: this.props.labelHidden, fullWidth: this.props.fullWidth, htmlId: this.htmlId, tabindex: this.props.tabindex },
83746
83746
  React.createElement("span", { className: 'sd-input__select-caret-wrapper' },
83747
- React.createElement("select", { className: 'sd-input__select', id: this.htmlId, value: this.props.value, "aria-describedby": this.htmlId, tabIndex: this.props.tabindex, onChange: this.handleChange, disabled: this.props.disabled || this.props.readonly, "data-test-id": this.props['data-test-id'] }, this.props.children))));
83747
+ React.createElement("select", { className: 'sd-input__select', id: this.htmlId, value: this.props.value, "aria-describedby": this.htmlId + 'label', tabIndex: this.props.tabindex, onChange: this.handleChange, disabled: this.props.disabled || this.props.readonly, "data-test-id": this.props['data-test-id'] }, this.props.children))));
83748
83748
  };
83749
83749
  return Select;
83750
83750
  }(React.Component));
@@ -127345,7 +127345,7 @@ var SubNav = /** @class */ (function (_super) {
127345
127345
  _a["subnav--".concat(this.props.color)] = this.props.color || this.props.color !== undefined,
127346
127346
  _a), this.props.className);
127347
127347
  var defaultTheme = darkColors.includes(this.props.color || '') ? 'dark-ui' : null;
127348
- return (React.createElement("div", { "data-theme": this.props.theme ? "".concat(this.props.theme, "-ui") : defaultTheme, className: classes }, this.props.children));
127348
+ return (React.createElement("div", { "data-theme": this.props.theme ? "".concat(this.props.theme, "-ui") : defaultTheme, className: classes, "data-test-id": this.props['data-test-id'] }, this.props.children));
127349
127349
  };
127350
127350
  return SubNav;
127351
127351
  }(React.PureComponent));
@@ -148295,6 +148295,7 @@ var Menu = /** @class */ (function (_super) {
148295
148295
  };
148296
148296
  Menu.prototype.render = function () {
148297
148297
  var _this = this;
148298
+ var _a;
148298
148299
  return (React.createElement(React.Fragment, null,
148299
148300
  this.props.children(this.toggle),
148300
148301
  React.createElement("div", { onKeyDown: function (event) {
@@ -148312,7 +148313,7 @@ var Menu = /** @class */ (function (_super) {
148312
148313
  if (firstMenuItem instanceof HTMLElement) {
148313
148314
  firstMenuItem.focus();
148314
148315
  }
148315
- }, "data-test-id": "menu", zIndex: this.zIndex }))));
148316
+ }, "data-test-id": (_a = this.props['data-test-id']) !== null && _a !== void 0 ? _a : 'menu', zIndex: this.zIndex }))));
148316
148317
  };
148317
148318
  return Menu;
148318
148319
  }(React.Component));
@@ -153551,7 +153552,7 @@ var SideBarTabs = /** @class */ (function (_super) {
153551
153552
  };
153552
153553
  SideBarTabs.prototype.render = function () {
153553
153554
  var _this = this;
153554
- return (React.createElement("div", { className: 'sd-sidetab-menu sd-sidetab-menu--static' },
153555
+ return (React.createElement("div", { className: 'sd-sidetab-menu sd-sidetab-menu--static', "data-test-id": this.props['data-test-id'] },
153555
153556
  React.createElement("ul", null, this.props.items.map(function (item, index) {
153556
153557
  if (item === 'divider') {
153557
153558
  return (React.createElement("li", { key: index, className: 'sd-sidetab-menu__spacer' }));
@@ -153559,7 +153560,7 @@ var SideBarTabs = /** @class */ (function (_super) {
153559
153560
  else {
153560
153561
  return (React.createElement("li", { key: index, "data-sd-tooltip": item.tooltip, "data-flow": 'left' },
153561
153562
  React.createElement("button", { disabled: _this.props.disabled, role: 'button', "aria-label": item.tooltip, className: (0, classnames_1.default)('sd-sidetab-menu__btn', { 'sd-sidetab-menu__btn--active': item.id === _this.props.activeTab && _this.props.disabled !== true,
153562
- }), onClick: function () { return _this.handleClick(item); } },
153563
+ }), onClick: function () { return _this.handleClick(item); }, "data-test-id": 'widget-icon', "data-test-value": item.id },
153563
153564
  item.badgeValue != null && (React.createElement(Badge_1.Badge, { text: item['badgeValue'], type: 'primary' })),
153564
153565
  React.createElement("span", { className: 'sd-sidetab-menu__main-icon ' },
153565
153566
  React.createElement(Icon_1.Icon, { size: item['size'], name: item['icon'] })),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "superdesk-ui-framework",
3
- "version": "4.0.32",
3
+ "version": "4.0.33",
4
4
  "license": "AGPL-3.0",
5
5
  "repository": {
6
6
  "type": "git",
@@ -9,6 +9,7 @@ interface IPropsPanel {
9
9
  };
10
10
  background?: 'transparent' | 'light' | 'grey';
11
11
  open?: boolean;
12
+ ['data-test-id']?: string;
12
13
  }
13
14
  export default class Panel extends React.PureComponent<IPropsPanel> {
14
15
  render(): JSX.Element;
@@ -71,7 +71,7 @@ var Panel = /** @class */ (function (_super) {
71
71
  style.width = this.props.size.custom;
72
72
  }
73
73
  var classes2 = (0, classnames_1.default)('side-panel__container', classes2Obj);
74
- return (React.createElement("div", { className: classes2, style: style, "data-theme": this.props.theme ? "".concat(this.props.theme, "-ui") : null },
74
+ return (React.createElement("div", { className: classes2, style: style, "data-theme": this.props.theme ? "".concat(this.props.theme, "-ui") : null, "data-test-id": this.props['data-test-id'] },
75
75
  React.createElement("div", { className: classes }, this.props.children)));
76
76
  };
77
77
  return Panel;
@@ -46,6 +46,7 @@ interface IMenuBranch {
46
46
  interface IProps {
47
47
  items: Array<IMenuItem>;
48
48
  children: (toggle: (event: SyntheticEvent) => void) => JSX.Element;
49
+ 'data-test-id'?: string;
49
50
  }
50
51
  export declare class Menu extends React.Component<IProps, {}> {
51
52
  private menu;
@@ -108,6 +108,7 @@ var Menu = /** @class */ (function (_super) {
108
108
  };
109
109
  Menu.prototype.render = function () {
110
110
  var _this = this;
111
+ var _a;
111
112
  return (React.createElement(React.Fragment, null,
112
113
  this.props.children(this.toggle),
113
114
  React.createElement("div", { onKeyDown: function (event) {
@@ -125,7 +126,7 @@ var Menu = /** @class */ (function (_super) {
125
126
  if (firstMenuItem instanceof HTMLElement) {
126
127
  firstMenuItem.focus();
127
128
  }
128
- }, "data-test-id": "menu", zIndex: this.zIndex }))));
129
+ }, "data-test-id": (_a = this.props['data-test-id']) !== null && _a !== void 0 ? _a : 'menu', zIndex: this.zIndex }))));
129
130
  };
130
131
  return Menu;
131
132
  }(React.Component));
@@ -5,6 +5,7 @@ interface IProps {
5
5
  items: Array<ISideBarTab | 'divider'>;
6
6
  side?: 'none' | 'left' | 'right';
7
7
  disabled?: boolean;
8
+ ['data-test-id']?: string;
8
9
  }
9
10
  export interface ISideBarTab {
10
11
  id: string;
@@ -70,7 +70,7 @@ var SideBarTabs = /** @class */ (function (_super) {
70
70
  };
71
71
  SideBarTabs.prototype.render = function () {
72
72
  var _this = this;
73
- return (React.createElement("div", { className: 'sd-sidetab-menu sd-sidetab-menu--static' },
73
+ return (React.createElement("div", { className: 'sd-sidetab-menu sd-sidetab-menu--static', "data-test-id": this.props['data-test-id'] },
74
74
  React.createElement("ul", null, this.props.items.map(function (item, index) {
75
75
  if (item === 'divider') {
76
76
  return (React.createElement("li", { key: index, className: 'sd-sidetab-menu__spacer' }));
@@ -78,7 +78,7 @@ var SideBarTabs = /** @class */ (function (_super) {
78
78
  else {
79
79
  return (React.createElement("li", { key: index, "data-sd-tooltip": item.tooltip, "data-flow": 'left' },
80
80
  React.createElement("button", { disabled: _this.props.disabled, role: 'button', "aria-label": item.tooltip, className: (0, classnames_1.default)('sd-sidetab-menu__btn', { 'sd-sidetab-menu__btn--active': item.id === _this.props.activeTab && _this.props.disabled !== true,
81
- }), onClick: function () { return _this.handleClick(item); } },
81
+ }), onClick: function () { return _this.handleClick(item); }, "data-test-id": 'widget-icon', "data-test-value": item.id },
82
82
  item.badgeValue != null && (React.createElement(Badge_1.Badge, { text: item['badgeValue'], type: 'primary' })),
83
83
  React.createElement("span", { className: 'sd-sidetab-menu__main-icon ' },
84
84
  React.createElement(Icon_1.Icon, { size: item['size'], name: item['icon'] })),
@@ -63,7 +63,7 @@ var Select = /** @class */ (function (_super) {
63
63
  }
64
64
  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, readonly: this.props.readonly, info: this.props.info, inlineLabel: this.props.inlineLabel, labelHidden: this.props.labelHidden, fullWidth: this.props.fullWidth, htmlId: this.htmlId, tabindex: this.props.tabindex },
65
65
  React.createElement("span", { className: 'sd-input__select-caret-wrapper' },
66
- React.createElement("select", { className: 'sd-input__select', id: this.htmlId, value: this.props.value, "aria-describedby": this.htmlId, tabIndex: this.props.tabindex, onChange: this.handleChange, disabled: this.props.disabled || this.props.readonly, "data-test-id": this.props['data-test-id'] }, this.props.children))));
66
+ React.createElement("select", { className: 'sd-input__select', id: this.htmlId, value: this.props.value, "aria-describedby": this.htmlId + 'label', tabIndex: this.props.tabindex, onChange: this.handleChange, disabled: this.props.disabled || this.props.readonly, "data-test-id": this.props['data-test-id'] }, this.props.children))));
67
67
  };
68
68
  return Select;
69
69
  }(React.Component));
@@ -3,6 +3,7 @@ interface IProps {
3
3
  color?: 'light' | 'darker' | 'blueGrey' | 'blueGreyDarker';
4
4
  theme?: 'light' | 'dark';
5
5
  className?: string;
6
+ ['data-test-id']?: string;
6
7
  }
7
8
  interface IPropsDivider {
8
9
  width?: 'small' | 'medium' | 'large' | 'x-large';
@@ -75,7 +75,7 @@ var SubNav = /** @class */ (function (_super) {
75
75
  _a["subnav--".concat(this.props.color)] = this.props.color || this.props.color !== undefined,
76
76
  _a), this.props.className);
77
77
  var defaultTheme = darkColors.includes(this.props.color || '') ? 'dark-ui' : null;
78
- return (React.createElement("div", { "data-theme": this.props.theme ? "".concat(this.props.theme, "-ui") : defaultTheme, className: classes }, this.props.children));
78
+ return (React.createElement("div", { "data-theme": this.props.theme ? "".concat(this.props.theme, "-ui") : defaultTheme, className: classes, "data-test-id": this.props['data-test-id'] }, this.props.children));
79
79
  };
80
80
  return SubNav;
81
81
  }(React.PureComponent));