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/app-typescript/components/CheckGroup.tsx +6 -1
- package/app-typescript/components/Label.tsx +31 -12
- package/app-typescript/components/Modal.tsx +2 -2
- package/app-typescript/components/RadioButtonGroup.tsx +1 -0
- package/app-typescript/components/TreeSelect/TreeSelectItem.tsx +1 -1
- package/dist/examples.bundle.js +791 -2612
- package/dist/superdesk-ui.bundle.css +1 -1
- package/dist/superdesk-ui.bundle.js +790 -2611
- package/package.json +2 -2
- package/react/components/CheckGroup.d.ts +1 -0
- package/react/components/CheckGroup.js +1 -1
- package/react/components/Label.d.ts +1 -0
- package/react/components/Label.js +6 -6
- package/react/components/Modal.d.ts +1 -1
- package/react/components/Modal.js +2 -2
- package/react/components/RadioButtonGroup.js +1 -1
- package/react/components/TreeSelect/TreeSelectItem.js +1 -1
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "superdesk-ui-framework",
|
3
|
-
"version": "4.0.
|
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-
|
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",
|
@@ -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));
|
@@ -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
|
};
|
@@ -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'
|
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;
|