superdesk-ui-framework 3.1.16 → 3.1.17
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/Layouts/Panel.tsx +7 -5
- package/app-typescript/components/Navigation/SideBarTabs.tsx +7 -3
- package/dist/examples.bundle.js +4 -3
- package/dist/superdesk-ui.bundle.js +3 -2
- package/package.json +1 -1
- package/react/components/Layouts/Panel.js +1 -1
- package/react/components/Navigation/SideBarTabs.d.ts +1 -0
- package/react/components/Navigation/SideBarTabs.js +2 -1
@@ -111,11 +111,13 @@ class PanelHeader extends React.PureComponent<IPropsPanelHeader> {
|
|
111
111
|
&& this.props.iconButtons
|
112
112
|
}
|
113
113
|
{this.props.onClose != null
|
114
|
-
&&
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
114
|
+
&& (
|
115
|
+
<IconButton
|
116
|
+
icon='close-small'
|
117
|
+
ariaValue='Close'
|
118
|
+
onClick={this.props.onClose}
|
119
|
+
/>
|
120
|
+
)
|
119
121
|
}
|
120
122
|
</ButtonGroup>
|
121
123
|
)
|
@@ -8,6 +8,7 @@ interface IProps {
|
|
8
8
|
onActiveTabChange(val: string | null): void;
|
9
9
|
items: Array<ISideBarTab | 'divider'>;
|
10
10
|
side?: 'none' | 'left' | 'right';
|
11
|
+
disabled?: boolean;
|
11
12
|
}
|
12
13
|
|
13
14
|
export interface ISideBarTab {
|
@@ -53,12 +54,15 @@ export class SideBarTabs extends React.PureComponent<IProps> {
|
|
53
54
|
} else {
|
54
55
|
return (
|
55
56
|
<li key={index} data-sd-tooltip={item.tooltip} data-flow='left'>
|
56
|
-
<
|
57
|
+
<button
|
58
|
+
disabled={this.props.disabled}
|
57
59
|
role='button'
|
58
60
|
aria-label={item.tooltip}
|
59
61
|
className={classNames(
|
60
62
|
'sd-sidetab-menu__btn',
|
61
|
-
{'sd-sidetab-menu__btn--active':
|
63
|
+
{'sd-sidetab-menu__btn--active':
|
64
|
+
item.id === this.props.activeTab && this.props.disabled !== true,
|
65
|
+
},
|
62
66
|
)}
|
63
67
|
onClick={() => this.handleClick(item)}
|
64
68
|
>
|
@@ -71,7 +75,7 @@ export class SideBarTabs extends React.PureComponent<IProps> {
|
|
71
75
|
</span>
|
72
76
|
|
73
77
|
<i className='sd-sidetab-menu__helper-icon icon-close-small'></i>
|
74
|
-
</
|
78
|
+
</button>
|
75
79
|
</li>
|
76
80
|
);
|
77
81
|
}
|
package/dist/examples.bundle.js
CHANGED
@@ -65105,7 +65105,7 @@ var PanelHeader = /** @class */ (function (_super) {
|
|
65105
65105
|
this.props.iconButtons != null
|
65106
65106
|
&& this.props.iconButtons,
|
65107
65107
|
this.props.onClose != null
|
65108
|
-
&& React.createElement(IconButton_1.IconButton, { icon: 'close-small', ariaValue: 'Close', onClick: this.props.onClose })))),
|
65108
|
+
&& (React.createElement(IconButton_1.IconButton, { icon: 'close-small', ariaValue: 'Close', onClick: this.props.onClose }))))),
|
65109
65109
|
this.props.children));
|
65110
65110
|
};
|
65111
65111
|
return PanelHeader;
|
@@ -151591,7 +151591,8 @@ var SideBarTabs = /** @class */ (function (_super) {
|
|
151591
151591
|
}
|
151592
151592
|
else {
|
151593
151593
|
return (React.createElement("li", { key: index, "data-sd-tooltip": item.tooltip, "data-flow": 'left' },
|
151594
|
-
React.createElement("
|
151594
|
+
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,
|
151595
|
+
}), onClick: function () { return _this.handleClick(item); } },
|
151595
151596
|
item.badgeValue != null && (React.createElement(Badge_1.Badge, { text: item['badgeValue'], type: 'primary' })),
|
151596
151597
|
React.createElement("span", { className: 'sd-sidetab-menu__main-icon ' },
|
151597
151598
|
React.createElement(Icon_1.Icon, { size: item['size'], name: item['icon'] })),
|
@@ -185270,7 +185271,7 @@ exports.ThreePaneLayoutPattern = ThreePaneLayoutPattern;
|
|
185270
185271
|
/* 935 */
|
185271
185272
|
/***/ (function(module, exports) {
|
185272
185273
|
|
185273
|
-
module.exports = {"name":"superdesk-ui-framework","version":"3.1.
|
185274
|
+
module.exports = {"name":"superdesk-ui-framework","version":"3.1.17","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/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","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","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","@types/enzyme-adapter-react-16":"^1.0.6","@types/node":"^14.10.2","chart.js":"^2.9.3","date-fns":"2.7.0","enzyme":"^3.11.0","enzyme-adapter-react-16":"^1.15.7","moment":"^2.29.3","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"}}
|
185274
185275
|
|
185275
185276
|
/***/ }),
|
185276
185277
|
/* 936 */
|
@@ -64609,7 +64609,7 @@ var PanelHeader = /** @class */ (function (_super) {
|
|
64609
64609
|
this.props.iconButtons != null
|
64610
64610
|
&& this.props.iconButtons,
|
64611
64611
|
this.props.onClose != null
|
64612
|
-
&& React.createElement(IconButton_1.IconButton, { icon: 'close-small', ariaValue: 'Close', onClick: this.props.onClose })))),
|
64612
|
+
&& (React.createElement(IconButton_1.IconButton, { icon: 'close-small', ariaValue: 'Close', onClick: this.props.onClose }))))),
|
64613
64613
|
this.props.children));
|
64614
64614
|
};
|
64615
64615
|
return PanelHeader;
|
@@ -150712,7 +150712,8 @@ var SideBarTabs = /** @class */ (function (_super) {
|
|
150712
150712
|
}
|
150713
150713
|
else {
|
150714
150714
|
return (React.createElement("li", { key: index, "data-sd-tooltip": item.tooltip, "data-flow": 'left' },
|
150715
|
-
React.createElement("
|
150715
|
+
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,
|
150716
|
+
}), onClick: function () { return _this.handleClick(item); } },
|
150716
150717
|
item.badgeValue != null && (React.createElement(Badge_1.Badge, { text: item['badgeValue'], type: 'primary' })),
|
150717
150718
|
React.createElement("span", { className: 'sd-sidetab-menu__main-icon ' },
|
150718
150719
|
React.createElement(Icon_1.Icon, { size: item['size'], name: item['icon'] })),
|
package/package.json
CHANGED
@@ -103,7 +103,7 @@ var PanelHeader = /** @class */ (function (_super) {
|
|
103
103
|
this.props.iconButtons != null
|
104
104
|
&& this.props.iconButtons,
|
105
105
|
this.props.onClose != null
|
106
|
-
&& React.createElement(IconButton_1.IconButton, { icon: 'close-small', ariaValue: 'Close', onClick: this.props.onClose })))),
|
106
|
+
&& (React.createElement(IconButton_1.IconButton, { icon: 'close-small', ariaValue: 'Close', onClick: this.props.onClose }))))),
|
107
107
|
this.props.children));
|
108
108
|
};
|
109
109
|
return PanelHeader;
|
@@ -77,7 +77,8 @@ var SideBarTabs = /** @class */ (function (_super) {
|
|
77
77
|
}
|
78
78
|
else {
|
79
79
|
return (React.createElement("li", { key: index, "data-sd-tooltip": item.tooltip, "data-flow": 'left' },
|
80
|
-
React.createElement("
|
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
82
|
item.badgeValue != null && (React.createElement(Badge_1.Badge, { text: item['badgeValue'], type: 'primary' })),
|
82
83
|
React.createElement("span", { className: 'sd-sidetab-menu__main-icon ' },
|
83
84
|
React.createElement(Icon_1.Icon, { size: item['size'], name: item['icon'] })),
|