superdesk-ui-framework 3.0.59 → 3.0.60
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.
@@ -11,7 +11,7 @@ interface IPropsPanel {
|
|
11
11
|
side?: 'left' | 'right';
|
12
12
|
theme?: 'light' | 'dark';
|
13
13
|
className?: string;
|
14
|
-
size?: 'xx-small' | 'x-small' | 'small' | 'medium' | 'large' | 'x-large' | 'xx-large' | 'xxx-large' | 'full' | 'auto';
|
14
|
+
size?: 'xx-small' | 'x-small' | 'small' | 'medium' | 'large' | 'x-large' | 'xx-large' | 'xxx-large' | 'full' | 'auto' | {custom: React.CSSProperties['width']};
|
15
15
|
background?: 'transparent' | 'light' | 'grey'; // defaults to light (white)
|
16
16
|
open?: boolean;
|
17
17
|
}
|
@@ -24,14 +24,23 @@ export default class Panel extends React.PureComponent<IPropsPanel> {
|
|
24
24
|
this.props.background !== 'light' && this.props.background !== undefined,
|
25
25
|
}, this.props.className);
|
26
26
|
|
27
|
-
|
28
|
-
[`side-panel__container--${this.props.side}`]: this.props.side,
|
29
|
-
[`
|
30
|
-
|
31
|
-
|
27
|
+
const classes2Obj: {[className: string]: boolean} = {
|
28
|
+
[`side-panel__container--${this.props.side}`]: this.props.side !== null,
|
29
|
+
[`panel-open`]: this.props.open === true,
|
30
|
+
};
|
31
|
+
|
32
|
+
const style: React.CSSProperties = {};
|
33
|
+
|
34
|
+
if (typeof this.props.size === 'string') {
|
35
|
+
classes2Obj[`side-panel__container--${this.props.size}`] = true;
|
36
|
+
} else if (this.props.size != null) {
|
37
|
+
style.width = this.props.size.custom;
|
38
|
+
}
|
39
|
+
|
40
|
+
let classes2 = classNames('side-panel__container', classes2Obj);
|
32
41
|
|
33
42
|
return (
|
34
|
-
<div className={classes2} data-theme={this.props.theme ? `${this.props.theme}-ui` : null}>
|
43
|
+
<div className={classes2} style={style} data-theme={this.props.theme ? `${this.props.theme}-ui` : null}>
|
35
44
|
<div className={classes}>
|
36
45
|
{this.props.children}
|
37
46
|
</div>
|
package/dist/examples.bundle.js
CHANGED
@@ -60119,12 +60119,19 @@ var Panel = /** @class */ (function (_super) {
|
|
60119
60119
|
_a["side-panel--".concat(this.props.side)] = this.props.side,
|
60120
60120
|
_a["side-panel--".concat(this.props.background)] = this.props.background !== 'light' && this.props.background !== undefined,
|
60121
60121
|
_a), this.props.className);
|
60122
|
-
var
|
60123
|
-
_b["side-panel__container--".concat(this.props.side)] = this.props.side,
|
60124
|
-
_b["
|
60125
|
-
_b
|
60126
|
-
|
60127
|
-
|
60122
|
+
var classes2Obj = (_b = {},
|
60123
|
+
_b["side-panel__container--".concat(this.props.side)] = this.props.side !== null,
|
60124
|
+
_b["panel-open"] = this.props.open === true,
|
60125
|
+
_b);
|
60126
|
+
var style = {};
|
60127
|
+
if (typeof this.props.size === 'string') {
|
60128
|
+
classes2Obj["side-panel__container--".concat(this.props.size)] = true;
|
60129
|
+
}
|
60130
|
+
else if (this.props.size != null) {
|
60131
|
+
style.width = this.props.size.custom;
|
60132
|
+
}
|
60133
|
+
var classes2 = (0, classnames_1.default)('side-panel__container', classes2Obj);
|
60134
|
+
return (React.createElement("div", { className: classes2, style: style, "data-theme": this.props.theme ? "".concat(this.props.theme, "-ui") : null },
|
60128
60135
|
React.createElement("div", { className: classes }, this.props.children)));
|
60129
60136
|
};
|
60130
60137
|
return Panel;
|
@@ -144095,7 +144102,7 @@ exports.ResizablePanelsDoc = ResizablePanelsDoc;
|
|
144095
144102
|
/* 692 */
|
144096
144103
|
/***/ (function(module, exports) {
|
144097
144104
|
|
144098
|
-
module.exports = {"name":"superdesk-ui-framework","version":"3.0.
|
144105
|
+
module.exports = {"name":"superdesk-ui-framework","version":"3.0.60","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","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-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","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":{"@material-ui/lab":"^4.0.0-alpha.56","@popperjs/core":"^2.4.0","@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-popper":"^2.2.3","react-scrollspy":"^3.4.3"}}
|
144099
144106
|
|
144100
144107
|
/***/ }),
|
144101
144108
|
/* 693 */
|
@@ -59763,12 +59763,19 @@ var Panel = /** @class */ (function (_super) {
|
|
59763
59763
|
_a["side-panel--".concat(this.props.side)] = this.props.side,
|
59764
59764
|
_a["side-panel--".concat(this.props.background)] = this.props.background !== 'light' && this.props.background !== undefined,
|
59765
59765
|
_a), this.props.className);
|
59766
|
-
var
|
59767
|
-
_b["side-panel__container--".concat(this.props.side)] = this.props.side,
|
59768
|
-
_b["
|
59769
|
-
_b
|
59770
|
-
|
59771
|
-
|
59766
|
+
var classes2Obj = (_b = {},
|
59767
|
+
_b["side-panel__container--".concat(this.props.side)] = this.props.side !== null,
|
59768
|
+
_b["panel-open"] = this.props.open === true,
|
59769
|
+
_b);
|
59770
|
+
var style = {};
|
59771
|
+
if (typeof this.props.size === 'string') {
|
59772
|
+
classes2Obj["side-panel__container--".concat(this.props.size)] = true;
|
59773
|
+
}
|
59774
|
+
else if (this.props.size != null) {
|
59775
|
+
style.width = this.props.size.custom;
|
59776
|
+
}
|
59777
|
+
var classes2 = (0, classnames_1.default)('side-panel__container', classes2Obj);
|
59778
|
+
return (React.createElement("div", { className: classes2, style: style, "data-theme": this.props.theme ? "".concat(this.props.theme, "-ui") : null },
|
59772
59779
|
React.createElement("div", { className: classes }, this.props.children)));
|
59773
59780
|
};
|
59774
59781
|
return Panel;
|
package/package.json
CHANGED
@@ -4,7 +4,9 @@ interface IPropsPanel {
|
|
4
4
|
side?: 'left' | 'right';
|
5
5
|
theme?: 'light' | 'dark';
|
6
6
|
className?: string;
|
7
|
-
size?: 'xx-small' | 'x-small' | 'small' | 'medium' | 'large' | 'x-large' | 'xx-large' | 'xxx-large' | 'full' | 'auto'
|
7
|
+
size?: 'xx-small' | 'x-small' | 'small' | 'medium' | 'large' | 'x-large' | 'xx-large' | 'xxx-large' | 'full' | 'auto' | {
|
8
|
+
custom: React.CSSProperties['width'];
|
9
|
+
};
|
8
10
|
background?: 'transparent' | 'light' | 'grey';
|
9
11
|
open?: boolean;
|
10
12
|
}
|
@@ -58,12 +58,19 @@ var Panel = /** @class */ (function (_super) {
|
|
58
58
|
_a["side-panel--".concat(this.props.side)] = this.props.side,
|
59
59
|
_a["side-panel--".concat(this.props.background)] = this.props.background !== 'light' && this.props.background !== undefined,
|
60
60
|
_a), this.props.className);
|
61
|
-
var
|
62
|
-
_b["side-panel__container--".concat(this.props.side)] = this.props.side,
|
63
|
-
_b["
|
64
|
-
_b
|
65
|
-
|
66
|
-
|
61
|
+
var classes2Obj = (_b = {},
|
62
|
+
_b["side-panel__container--".concat(this.props.side)] = this.props.side !== null,
|
63
|
+
_b["panel-open"] = this.props.open === true,
|
64
|
+
_b);
|
65
|
+
var style = {};
|
66
|
+
if (typeof this.props.size === 'string') {
|
67
|
+
classes2Obj["side-panel__container--".concat(this.props.size)] = true;
|
68
|
+
}
|
69
|
+
else if (this.props.size != null) {
|
70
|
+
style.width = this.props.size.custom;
|
71
|
+
}
|
72
|
+
var classes2 = (0, classnames_1.default)('side-panel__container', classes2Obj);
|
73
|
+
return (React.createElement("div", { className: classes2, style: style, "data-theme": this.props.theme ? "".concat(this.props.theme, "-ui") : null },
|
67
74
|
React.createElement("div", { className: classes }, this.props.children)));
|
68
75
|
};
|
69
76
|
return Panel;
|