superdesk-ui-framework 4.0.33 → 4.0.34

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": "4.0.33",
3
+ "version": "4.0.34",
4
4
  "license": "AGPL-3.0",
5
5
  "repository": {
6
6
  "type": "git",
@@ -97,7 +97,7 @@
97
97
  "dependencies": {
98
98
  "@popperjs/core": "^2.4.0",
99
99
  "@superdesk/common": "0.0.28",
100
- "@superdesk/primereact": "^5.0.2-12",
100
+ "@superdesk/primereact": "^5.0.2-13",
101
101
  "@superdesk/react-resizable-panels": "0.0.39",
102
102
  "chart.js": "^2.9.3",
103
103
  "date-fns": "2.7.0",
@@ -3,6 +3,7 @@ interface IProps {
3
3
  orientation?: 'horizontal' | 'vertical';
4
4
  children: React.ReactNode;
5
5
  groupLabelledBy?: string;
6
+ 'data-test-id'?: string;
6
7
  }
7
8
  export declare class CheckGroup extends React.PureComponent<IProps> {
8
9
  render(): JSX.Element;
@@ -54,7 +54,7 @@ var CheckGroup = /** @class */ (function (_super) {
54
54
  var classes = (0, classnames_1.default)('sd-check__group-new', (_a = {},
55
55
  _a["sd-check__group-new--vertical"] = this.props.orientation === 'vertical',
56
56
  _a));
57
- return (React.createElement("div", { className: classes, "aria-labelledby": this.props.groupLabelledBy }, this.props.children));
57
+ return (React.createElement("div", { className: classes, "aria-labelledby": this.props.groupLabelledBy, "data-test-id": this.props['data-test-id'] }, this.props.children));
58
58
  };
59
59
  return CheckGroup;
60
60
  }(React.PureComponent));
@@ -9,6 +9,7 @@ interface IProps {
9
9
  noTransform?: boolean;
10
10
  hexColor?: string;
11
11
  style?: 'filled' | 'hollow' | 'translucent';
12
+ 'data-test-id'?: string;
12
13
  }
13
14
  export declare class Label extends React.PureComponent<IProps> {
14
15
  render(): JSX.Element;
@@ -62,26 +62,26 @@ var Label = /** @class */ (function (_super) {
62
62
  _a));
63
63
  if (this.props.link || this.props.onClick) {
64
64
  if (this.props.style === 'hollow') {
65
- return (React.createElement("a", { className: classes, href: this.props.link, onClick: this.props.onClick, style: { color: this.props.hexColor, borderColor: this.props.hexColor } }, this.props.text));
65
+ return (React.createElement("a", { className: classes, href: this.props.link, onClick: this.props.onClick, style: { color: this.props.hexColor, borderColor: this.props.hexColor }, "data-test-id": this.props['data-test-id'] }, this.props.text));
66
66
  }
67
67
  else if (this.props.style === 'translucent') {
68
- return (React.createElement("a", { className: classes, href: this.props.link, onClick: this.props.onClick, style: { color: this.props.hexColor, backgroundColor: "".concat(this.props.hexColor, "33") } }, this.props.text));
68
+ return (React.createElement("a", { className: classes, href: this.props.link, onClick: this.props.onClick, style: { color: this.props.hexColor, backgroundColor: "".concat(this.props.hexColor, "33") }, "data-test-id": this.props['data-test-id'] }, this.props.text));
69
69
  }
70
70
  else {
71
- return (React.createElement("a", { className: classes, href: this.props.link, onClick: this.props.onClick, style: { backgroundColor: this.props.hexColor } }, this.props.text));
71
+ return (React.createElement("a", { className: classes, href: this.props.link, onClick: this.props.onClick, style: { backgroundColor: this.props.hexColor }, "data-test-id": this.props['data-test-id'] }, this.props.text));
72
72
  }
73
73
  }
74
74
  else {
75
75
  if (this.props.style === 'hollow') {
76
- return (React.createElement("span", { className: classes, style: { color: this.props.hexColor, borderColor: this.props.hexColor } }, this.props.text));
76
+ return (React.createElement("span", { className: classes, style: { color: this.props.hexColor, borderColor: this.props.hexColor }, "data-test-id": this.props['data-test-id'] }, this.props.text));
77
77
  }
78
78
  else if (this.props.style === 'translucent') {
79
- return (React.createElement("span", { className: classes, style: { color: this.props.hexColor, backgroundColor: "".concat(this.props.hexColor, "33") } }, this.props.text));
79
+ return (React.createElement("span", { className: classes, style: { color: this.props.hexColor, backgroundColor: "".concat(this.props.hexColor, "33") }, "data-test-id": this.props['data-test-id'] }, this.props.text));
80
80
  }
81
81
  else {
82
82
  return (React.createElement("span", { className: classes, style: this.props.hexColor
83
83
  ? { backgroundColor: this.props.hexColor, color: (0, helpers_1.getTextColor)(this.props.hexColor) }
84
- : undefined }, this.props.text));
84
+ : undefined, "data-test-id": this.props['data-test-id'] }, this.props.text));
85
85
  }
86
86
  }
87
87
  };
@@ -13,7 +13,7 @@ interface IProps {
13
13
  maximizable?: boolean;
14
14
  headerTemplate?: JSX.Element | string;
15
15
  footerTemplate?: JSX.Element | string;
16
- ['data-test-id']?: string;
16
+ 'data-test-id'?: string;
17
17
  onShow?(): void;
18
18
  onHide?(): void;
19
19
  }
@@ -64,8 +64,8 @@ var Modal = /** @class */ (function (_super) {
64
64
  _a['p-dialog-content--padding-small'] = this.props.contentPadding === undefined,
65
65
  _a["p-dialog-content--padding-".concat(this.props.contentPadding)] = this.props.contentPadding,
66
66
  _a), this.props.className);
67
- return (React.createElement("div", { style: { display: 'content' }, "data-theme": this.props.theme !== 'dark' ? null : 'dark-ui', "data-test-id": this.props['data-test-id'] },
68
- React.createElement(dialog_1.Dialog, { id: this.props.id, visible: this.props.visible, header: this.props.headerTemplate, footer: this.props.footerTemplate, closeOnEscape: this.props.closeOnEscape, maximized: this.props.maximized, maximizable: this.props.maximizable, contentClassName: classes, onShow: this.props.onShow, onHide: (_b = this.props.onHide) !== null && _b !== void 0 ? _b : lodash_1.noop, zIndex: this.zIndex, position: this.props.position, closable: this.props.onHide != null ? true : false }, this.props.children)));
67
+ return (React.createElement("div", { style: { display: 'content' }, "data-theme": this.props.theme !== 'dark' ? null : 'dark-ui' },
68
+ React.createElement(dialog_1.Dialog, { id: this.props.id, visible: this.props.visible, header: this.props.headerTemplate, footer: this.props.footerTemplate, closeOnEscape: this.props.closeOnEscape, maximized: this.props.maximized, maximizable: this.props.maximizable, contentClassName: classes, onShow: this.props.onShow, onHide: (_b = this.props.onHide) !== null && _b !== void 0 ? _b : lodash_1.noop, zIndex: this.zIndex, position: this.props.position, closable: this.props.onHide != null ? true : false, "data-test-id": this.props['data-test-id'] }, this.props.children)));
69
69
  };
70
70
  return Modal;
71
71
  }(React.Component));
@@ -80,7 +80,7 @@ var RadioButtonGroup = /** @class */ (function (_super) {
80
80
  !((_j = this.props.group) === null || _j === void 0 ? void 0 : _j.groupLabel) ?
81
81
  React.createElement("div", { role: "radiogroup", className: classes, "aria-labelledby": (_k = this.props.group) === null || _k === void 0 ? void 0 : _k.groupLabelledBy, "data-test-id": this.props['data-test-id'], "data-test-value": selectedOption == null ? undefined : selectedOption.label }, this.props.options.map(function (item, index) { return (React.createElement("span", { className: "sd-check-button sd-check-button--native", key: index, tabIndex: _this.props.tabindex === undefined ? undefined : -1 },
82
82
  React.createElement("input", { type: "radio", className: "sd-check-button__input", id: _this.htmlId + index, tabIndex: _this.props.tabindex, name: _this.htmlId, onChange: function () { return _this.handleChange(item); }, disabled: _this.props.disabled || item.disabled, required: _this.props.required, checked: item.value === _this.props.value }),
83
- React.createElement("label", { className: "sd-check-button__text-label", htmlFor: _this.htmlId + index, "aria-label": item.labelHidden ? item.label : undefined, "data-test-id": "item" },
83
+ React.createElement("label", { className: "sd-check-button__text-label", htmlFor: _this.htmlId + index, "aria-label": item.labelHidden ? item.label : undefined, "data-test-id": "item", "data-test-value": item.label },
84
84
  item.icon ? React.createElement("i", { className: "icon-".concat(item.icon), "aria-hidden": "true" }) : null,
85
85
  !item.labelHidden || !item.icon ?
86
86
  React.createElement("span", { className: "sd-check-button__text-label-inner" }, item.label) : null))); }))
@@ -88,7 +88,7 @@ var TreeSelectItem = /** @class */ (function (_super) {
88
88
  ? this.props.optionTemplate(this.props.option.value)
89
89
  : this.props.getLabel(this.props.option.value)),
90
90
  this.props.option.children
91
- && React.createElement("span", { className: "suggestion-item__icon", "aria-hidden": "true" },
91
+ && React.createElement("span", { className: "suggestion-item__icon", "aria-hidden": "true", "data-test-id": "children-indicator" },
92
92
  React.createElement(Icon_1.Icon, { name: "chevron-right-thin" })))));
93
93
  };
94
94
  return TreeSelectItem;