superdesk-ui-framework 3.0.5 → 3.0.6

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.
@@ -16,7 +16,6 @@ export interface ISideBarTab {
16
16
  size: 'small' | 'big'; // defaults to 'small'
17
17
  tooltip?: string;
18
18
  badgeValue?: string;
19
- onClick(event: React.MouseEvent<HTMLAnchorElement, MouseEvent>): void;
20
19
  }
21
20
 
22
21
  export class SideBarTabs extends React.PureComponent<IProps> {
@@ -34,12 +33,11 @@ export class SideBarTabs extends React.PureComponent<IProps> {
34
33
  }
35
34
  }
36
35
 
37
- handleClick(item: ISideBarTab, event: React.MouseEvent<HTMLAnchorElement, MouseEvent>) {
36
+ handleClick(item: ISideBarTab) {
38
37
  if (this.props.activeTab === item.id) {
39
38
  this.props.onActiveTabChange(null);
40
39
  } else {
41
40
  this.props.onActiveTabChange(item.id);
42
- item.onClick(event);
43
41
  }
44
42
  }
45
43
 
@@ -62,7 +60,7 @@ export class SideBarTabs extends React.PureComponent<IProps> {
62
60
  'sd-sidetab-menu__btn',
63
61
  {'sd-sidetab-menu__btn--active': item.id === this.props.activeTab},
64
62
  )}
65
- onClick={(event) => this.handleClick(item, event)}
63
+ onClick={() => this.handleClick(item)}
66
64
  >
67
65
  {item.badgeValue != null && (
68
66
  <Badge text={item['badgeValue']} type='primary' />
@@ -103124,13 +103124,12 @@ var SideBarTabs = /** @class */ (function (_super) {
103124
103124
  this.props.onActiveTabChange(activeItem.id);
103125
103125
  }
103126
103126
  };
103127
- SideBarTabs.prototype.handleClick = function (item, event) {
103127
+ SideBarTabs.prototype.handleClick = function (item) {
103128
103128
  if (this.props.activeTab === item.id) {
103129
103129
  this.props.onActiveTabChange(null);
103130
103130
  }
103131
103131
  else {
103132
103132
  this.props.onActiveTabChange(item.id);
103133
- item.onClick(event);
103134
103133
  }
103135
103134
  };
103136
103135
  SideBarTabs.prototype.render = function () {
@@ -103142,7 +103141,7 @@ var SideBarTabs = /** @class */ (function (_super) {
103142
103141
  }
103143
103142
  else {
103144
103143
  return (React.createElement("li", { key: index, "data-sd-tooltip": item.tooltip, "data-flow": 'left' },
103145
- React.createElement("a", { 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 }), onClick: function (event) { return _this.handleClick(item, event); } },
103144
+ React.createElement("a", { 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 }), onClick: function () { return _this.handleClick(item); } },
103146
103145
  item.badgeValue != null && (React.createElement(Badge_1.Badge, { text: item['badgeValue'], type: 'primary' })),
103147
103146
  React.createElement("span", { className: 'sd-sidetab-menu__main-icon ' },
103148
103147
  React.createElement(Icon_1.Icon, { size: item['size'], name: item['icon'] })),
@@ -139035,7 +139034,7 @@ exports.WithSizeObserverDocs = WithSizeObserverDocs;
139035
139034
  /* 652 */
139036
139035
  /***/ (function(module, exports) {
139037
139036
 
139038
- module.exports = {"name":"superdesk-ui-framework","version":"3.0.5","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","lint":"eslint --parser=@typescript-eslint/parser app && tslint -c tslint.json 'app-typescript/**/*.{ts,tsx}'","lint-fix":"tsc -p tsconfig.json --noEmit && tslint --fix -c tslint.json 'app-typescript/**/*.{ts,tsx}'","prepublishOnly":"npm run build"},"devDependencies":{"@types/chart.js":"^2.9.24","@types/classnames":"^2.2.9","@types/lodash":"^4.14.161","@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.14.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","lodash":"4.17.21","node-sass":"6.0","prismjs":"^1.28.0","prop-types":"^15.6.0","react":"16.8.6","react-bootstrap":"^0.31.2","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","tslint":"^5.18.0","typescript":"4.5.2","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":{"@material-ui/lab":"^4.0.0-alpha.56","@popperjs/core":"^2.4.0","@superdesk/primereact":"^5.0.2-8","@types/node":"^14.10.2","chart.js":"^2.9.3","date-fns":"2.7.0","moment":"^2.29.3","popper.js":"1.14.4","primeicons":"2.0.0","react-beautiful-dnd":"^13.0.0","react-id-generator":"^3.0.0","react-popper":"^2.2.3","react-scrollspy":"^3.4.3"}}
139037
+ module.exports = {"name":"superdesk-ui-framework","version":"3.0.6","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","lint":"eslint --parser=@typescript-eslint/parser app && tslint -c tslint.json 'app-typescript/**/*.{ts,tsx}'","lint-fix":"tsc -p tsconfig.json --noEmit && tslint --fix -c tslint.json 'app-typescript/**/*.{ts,tsx}'","prepublishOnly":"npm run build"},"devDependencies":{"@types/chart.js":"^2.9.24","@types/classnames":"^2.2.9","@types/lodash":"^4.14.161","@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.14.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","lodash":"4.17.21","node-sass":"6.0","prismjs":"^1.28.0","prop-types":"^15.6.0","react":"16.8.6","react-bootstrap":"^0.31.2","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","tslint":"^5.18.0","typescript":"4.5.2","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":{"@material-ui/lab":"^4.0.0-alpha.56","@popperjs/core":"^2.4.0","@superdesk/primereact":"^5.0.2-8","@types/node":"^14.10.2","chart.js":"^2.9.3","date-fns":"2.7.0","moment":"^2.29.3","popper.js":"1.14.4","primeicons":"2.0.0","react-beautiful-dnd":"^13.0.0","react-id-generator":"^3.0.0","react-popper":"^2.2.3","react-scrollspy":"^3.4.3"}}
139039
139038
 
139040
139039
  /***/ }),
139041
139040
  /* 653 */
@@ -102385,13 +102385,12 @@ var SideBarTabs = /** @class */ (function (_super) {
102385
102385
  this.props.onActiveTabChange(activeItem.id);
102386
102386
  }
102387
102387
  };
102388
- SideBarTabs.prototype.handleClick = function (item, event) {
102388
+ SideBarTabs.prototype.handleClick = function (item) {
102389
102389
  if (this.props.activeTab === item.id) {
102390
102390
  this.props.onActiveTabChange(null);
102391
102391
  }
102392
102392
  else {
102393
102393
  this.props.onActiveTabChange(item.id);
102394
- item.onClick(event);
102395
102394
  }
102396
102395
  };
102397
102396
  SideBarTabs.prototype.render = function () {
@@ -102403,7 +102402,7 @@ var SideBarTabs = /** @class */ (function (_super) {
102403
102402
  }
102404
102403
  else {
102405
102404
  return (React.createElement("li", { key: index, "data-sd-tooltip": item.tooltip, "data-flow": 'left' },
102406
- React.createElement("a", { 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 }), onClick: function (event) { return _this.handleClick(item, event); } },
102405
+ React.createElement("a", { 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 }), onClick: function () { return _this.handleClick(item); } },
102407
102406
  item.badgeValue != null && (React.createElement(Badge_1.Badge, { text: item['badgeValue'], type: 'primary' })),
102408
102407
  React.createElement("span", { className: 'sd-sidetab-menu__main-icon ' },
102409
102408
  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": "3.0.5",
3
+ "version": "3.0.6",
4
4
  "license": "AGPL-3.0",
5
5
  "repository": {
6
6
  "type": "git",
@@ -11,12 +11,11 @@ export interface ISideBarTab {
11
11
  size: 'small' | 'big';
12
12
  tooltip?: string;
13
13
  badgeValue?: string;
14
- onClick(event: React.MouseEvent<HTMLAnchorElement, MouseEvent>): void;
15
14
  }
16
15
  export declare class SideBarTabs extends React.PureComponent<IProps> {
17
16
  constructor(props: IProps);
18
17
  componentDidMount(): void;
19
- handleClick(item: ISideBarTab, event: React.MouseEvent<HTMLAnchorElement, MouseEvent>): void;
18
+ handleClick(item: ISideBarTab): void;
20
19
  render(): JSX.Element;
21
20
  }
22
21
  export {};
@@ -56,13 +56,12 @@ var SideBarTabs = /** @class */ (function (_super) {
56
56
  this.props.onActiveTabChange(activeItem.id);
57
57
  }
58
58
  };
59
- SideBarTabs.prototype.handleClick = function (item, event) {
59
+ SideBarTabs.prototype.handleClick = function (item) {
60
60
  if (this.props.activeTab === item.id) {
61
61
  this.props.onActiveTabChange(null);
62
62
  }
63
63
  else {
64
64
  this.props.onActiveTabChange(item.id);
65
- item.onClick(event);
66
65
  }
67
66
  };
68
67
  SideBarTabs.prototype.render = function () {
@@ -74,7 +73,7 @@ var SideBarTabs = /** @class */ (function (_super) {
74
73
  }
75
74
  else {
76
75
  return (React.createElement("li", { key: index, "data-sd-tooltip": item.tooltip, "data-flow": 'left' },
77
- React.createElement("a", { 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 }), onClick: function (event) { return _this.handleClick(item, event); } },
76
+ React.createElement("a", { 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 }), onClick: function () { return _this.handleClick(item); } },
78
77
  item.badgeValue != null && (React.createElement(Badge_1.Badge, { text: item['badgeValue'], type: 'primary' })),
79
78
  React.createElement("span", { className: 'sd-sidetab-menu__main-icon ' },
80
79
  React.createElement(Icon_1.Icon, { size: item['size'], name: item['icon'] })),