@plusscommunities/pluss-core-web 1.2.13-beta.0 → 1.2.14-beta.0
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/dist/index.cjs.js +24 -8
- package/dist/index.esm.js +24 -8
- package/dist/index.umd.js +24 -8
- package/package.json +1 -1
- package/src/components/HubSidebar.js +20 -1
package/dist/index.cjs.js
CHANGED
|
@@ -5971,18 +5971,31 @@ var HubSidebar = /*#__PURE__*/function (_PureComponent) {
|
|
|
5971
5971
|
|
|
5972
5972
|
var _super = _createSuper$n(HubSidebar);
|
|
5973
5973
|
|
|
5974
|
-
function HubSidebar() {
|
|
5974
|
+
function HubSidebar(props) {
|
|
5975
|
+
var _this;
|
|
5976
|
+
|
|
5975
5977
|
_classCallCheck__default['default'](this, HubSidebar);
|
|
5976
5978
|
|
|
5977
|
-
|
|
5979
|
+
_this = _super.call(this, props);
|
|
5980
|
+
_this.state = {
|
|
5981
|
+
showSidebar: false
|
|
5982
|
+
};
|
|
5983
|
+
return _this;
|
|
5978
5984
|
}
|
|
5979
5985
|
|
|
5980
5986
|
_createClass__default['default'](HubSidebar, [{
|
|
5981
5987
|
key: "componentDidMount",
|
|
5982
5988
|
value: function componentDidMount() {
|
|
5989
|
+
var _this2 = this;
|
|
5990
|
+
|
|
5983
5991
|
this.props.setNavData({
|
|
5984
5992
|
condensedSidebar: true
|
|
5985
5993
|
});
|
|
5994
|
+
setTimeout(function () {
|
|
5995
|
+
_this2.setState({
|
|
5996
|
+
showSidebar: true
|
|
5997
|
+
});
|
|
5998
|
+
}, 50);
|
|
5986
5999
|
}
|
|
5987
6000
|
}, {
|
|
5988
6001
|
key: "componentWillUnmount",
|
|
@@ -5990,6 +6003,9 @@ var HubSidebar = /*#__PURE__*/function (_PureComponent) {
|
|
|
5990
6003
|
this.props.setNavData({
|
|
5991
6004
|
condensedSidebar: false
|
|
5992
6005
|
});
|
|
6006
|
+
this.setState({
|
|
6007
|
+
showSidebar: false
|
|
6008
|
+
});
|
|
5993
6009
|
}
|
|
5994
6010
|
}, {
|
|
5995
6011
|
key: "renderNewButton",
|
|
@@ -6022,7 +6038,7 @@ var HubSidebar = /*#__PURE__*/function (_PureComponent) {
|
|
|
6022
6038
|
}, {
|
|
6023
6039
|
key: "renderSection",
|
|
6024
6040
|
value: function renderSection(section, index) {
|
|
6025
|
-
var
|
|
6041
|
+
var _this3 = this;
|
|
6026
6042
|
|
|
6027
6043
|
return /*#__PURE__*/React__default['default'].createElement("div", {
|
|
6028
6044
|
className: "hubSidebar_section",
|
|
@@ -6033,10 +6049,10 @@ var HubSidebar = /*#__PURE__*/function (_PureComponent) {
|
|
|
6033
6049
|
}, section.title), section.items.map(function (item, itemIndex) {
|
|
6034
6050
|
switch (item.type) {
|
|
6035
6051
|
case 'newButton':
|
|
6036
|
-
return
|
|
6052
|
+
return _this3.renderNewButton(item, itemIndex);
|
|
6037
6053
|
|
|
6038
6054
|
case 'navItem':
|
|
6039
|
-
return
|
|
6055
|
+
return _this3.renderNavItem(item, itemIndex);
|
|
6040
6056
|
|
|
6041
6057
|
default:
|
|
6042
6058
|
return null;
|
|
@@ -6046,15 +6062,15 @@ var HubSidebar = /*#__PURE__*/function (_PureComponent) {
|
|
|
6046
6062
|
}, {
|
|
6047
6063
|
key: "render",
|
|
6048
6064
|
value: function render() {
|
|
6049
|
-
var
|
|
6065
|
+
var _this4 = this;
|
|
6050
6066
|
|
|
6051
6067
|
return /*#__PURE__*/React__default['default'].createElement("div", {
|
|
6052
|
-
className: "hubSidebar ".concat(this.props.className ? this.props.className : ''),
|
|
6068
|
+
className: "hubSidebar".concat(this.state.showSidebar ? ' hubSidebar-show' : '', " ").concat(this.props.className ? this.props.className : ''),
|
|
6053
6069
|
style: this.props.style
|
|
6054
6070
|
}, /*#__PURE__*/React__default['default'].createElement("div", {
|
|
6055
6071
|
className: "hubSidebar_content"
|
|
6056
6072
|
}, this.props.sections.map(function (section, i) {
|
|
6057
|
-
return
|
|
6073
|
+
return _this4.renderSection(section, i);
|
|
6058
6074
|
})));
|
|
6059
6075
|
}
|
|
6060
6076
|
}]);
|
package/dist/index.esm.js
CHANGED
|
@@ -5944,18 +5944,31 @@ var HubSidebar = /*#__PURE__*/function (_PureComponent) {
|
|
|
5944
5944
|
|
|
5945
5945
|
var _super = _createSuper$n(HubSidebar);
|
|
5946
5946
|
|
|
5947
|
-
function HubSidebar() {
|
|
5947
|
+
function HubSidebar(props) {
|
|
5948
|
+
var _this;
|
|
5949
|
+
|
|
5948
5950
|
_classCallCheck(this, HubSidebar);
|
|
5949
5951
|
|
|
5950
|
-
|
|
5952
|
+
_this = _super.call(this, props);
|
|
5953
|
+
_this.state = {
|
|
5954
|
+
showSidebar: false
|
|
5955
|
+
};
|
|
5956
|
+
return _this;
|
|
5951
5957
|
}
|
|
5952
5958
|
|
|
5953
5959
|
_createClass(HubSidebar, [{
|
|
5954
5960
|
key: "componentDidMount",
|
|
5955
5961
|
value: function componentDidMount() {
|
|
5962
|
+
var _this2 = this;
|
|
5963
|
+
|
|
5956
5964
|
this.props.setNavData({
|
|
5957
5965
|
condensedSidebar: true
|
|
5958
5966
|
});
|
|
5967
|
+
setTimeout(function () {
|
|
5968
|
+
_this2.setState({
|
|
5969
|
+
showSidebar: true
|
|
5970
|
+
});
|
|
5971
|
+
}, 50);
|
|
5959
5972
|
}
|
|
5960
5973
|
}, {
|
|
5961
5974
|
key: "componentWillUnmount",
|
|
@@ -5963,6 +5976,9 @@ var HubSidebar = /*#__PURE__*/function (_PureComponent) {
|
|
|
5963
5976
|
this.props.setNavData({
|
|
5964
5977
|
condensedSidebar: false
|
|
5965
5978
|
});
|
|
5979
|
+
this.setState({
|
|
5980
|
+
showSidebar: false
|
|
5981
|
+
});
|
|
5966
5982
|
}
|
|
5967
5983
|
}, {
|
|
5968
5984
|
key: "renderNewButton",
|
|
@@ -5995,7 +6011,7 @@ var HubSidebar = /*#__PURE__*/function (_PureComponent) {
|
|
|
5995
6011
|
}, {
|
|
5996
6012
|
key: "renderSection",
|
|
5997
6013
|
value: function renderSection(section, index) {
|
|
5998
|
-
var
|
|
6014
|
+
var _this3 = this;
|
|
5999
6015
|
|
|
6000
6016
|
return /*#__PURE__*/React.createElement("div", {
|
|
6001
6017
|
className: "hubSidebar_section",
|
|
@@ -6006,10 +6022,10 @@ var HubSidebar = /*#__PURE__*/function (_PureComponent) {
|
|
|
6006
6022
|
}, section.title), section.items.map(function (item, itemIndex) {
|
|
6007
6023
|
switch (item.type) {
|
|
6008
6024
|
case 'newButton':
|
|
6009
|
-
return
|
|
6025
|
+
return _this3.renderNewButton(item, itemIndex);
|
|
6010
6026
|
|
|
6011
6027
|
case 'navItem':
|
|
6012
|
-
return
|
|
6028
|
+
return _this3.renderNavItem(item, itemIndex);
|
|
6013
6029
|
|
|
6014
6030
|
default:
|
|
6015
6031
|
return null;
|
|
@@ -6019,15 +6035,15 @@ var HubSidebar = /*#__PURE__*/function (_PureComponent) {
|
|
|
6019
6035
|
}, {
|
|
6020
6036
|
key: "render",
|
|
6021
6037
|
value: function render() {
|
|
6022
|
-
var
|
|
6038
|
+
var _this4 = this;
|
|
6023
6039
|
|
|
6024
6040
|
return /*#__PURE__*/React.createElement("div", {
|
|
6025
|
-
className: "hubSidebar ".concat(this.props.className ? this.props.className : ''),
|
|
6041
|
+
className: "hubSidebar".concat(this.state.showSidebar ? ' hubSidebar-show' : '', " ").concat(this.props.className ? this.props.className : ''),
|
|
6026
6042
|
style: this.props.style
|
|
6027
6043
|
}, /*#__PURE__*/React.createElement("div", {
|
|
6028
6044
|
className: "hubSidebar_content"
|
|
6029
6045
|
}, this.props.sections.map(function (section, i) {
|
|
6030
|
-
return
|
|
6046
|
+
return _this4.renderSection(section, i);
|
|
6031
6047
|
})));
|
|
6032
6048
|
}
|
|
6033
6049
|
}]);
|
package/dist/index.umd.js
CHANGED
|
@@ -5946,18 +5946,31 @@
|
|
|
5946
5946
|
|
|
5947
5947
|
var _super = _createSuper$n(HubSidebar);
|
|
5948
5948
|
|
|
5949
|
-
function HubSidebar() {
|
|
5949
|
+
function HubSidebar(props) {
|
|
5950
|
+
var _this;
|
|
5951
|
+
|
|
5950
5952
|
_classCallCheck__default['default'](this, HubSidebar);
|
|
5951
5953
|
|
|
5952
|
-
|
|
5954
|
+
_this = _super.call(this, props);
|
|
5955
|
+
_this.state = {
|
|
5956
|
+
showSidebar: false
|
|
5957
|
+
};
|
|
5958
|
+
return _this;
|
|
5953
5959
|
}
|
|
5954
5960
|
|
|
5955
5961
|
_createClass__default['default'](HubSidebar, [{
|
|
5956
5962
|
key: "componentDidMount",
|
|
5957
5963
|
value: function componentDidMount() {
|
|
5964
|
+
var _this2 = this;
|
|
5965
|
+
|
|
5958
5966
|
this.props.setNavData({
|
|
5959
5967
|
condensedSidebar: true
|
|
5960
5968
|
});
|
|
5969
|
+
setTimeout(function () {
|
|
5970
|
+
_this2.setState({
|
|
5971
|
+
showSidebar: true
|
|
5972
|
+
});
|
|
5973
|
+
}, 50);
|
|
5961
5974
|
}
|
|
5962
5975
|
}, {
|
|
5963
5976
|
key: "componentWillUnmount",
|
|
@@ -5965,6 +5978,9 @@
|
|
|
5965
5978
|
this.props.setNavData({
|
|
5966
5979
|
condensedSidebar: false
|
|
5967
5980
|
});
|
|
5981
|
+
this.setState({
|
|
5982
|
+
showSidebar: false
|
|
5983
|
+
});
|
|
5968
5984
|
}
|
|
5969
5985
|
}, {
|
|
5970
5986
|
key: "renderNewButton",
|
|
@@ -5997,7 +6013,7 @@
|
|
|
5997
6013
|
}, {
|
|
5998
6014
|
key: "renderSection",
|
|
5999
6015
|
value: function renderSection(section, index) {
|
|
6000
|
-
var
|
|
6016
|
+
var _this3 = this;
|
|
6001
6017
|
|
|
6002
6018
|
return /*#__PURE__*/React__default['default'].createElement("div", {
|
|
6003
6019
|
className: "hubSidebar_section",
|
|
@@ -6008,10 +6024,10 @@
|
|
|
6008
6024
|
}, section.title), section.items.map(function (item, itemIndex) {
|
|
6009
6025
|
switch (item.type) {
|
|
6010
6026
|
case 'newButton':
|
|
6011
|
-
return
|
|
6027
|
+
return _this3.renderNewButton(item, itemIndex);
|
|
6012
6028
|
|
|
6013
6029
|
case 'navItem':
|
|
6014
|
-
return
|
|
6030
|
+
return _this3.renderNavItem(item, itemIndex);
|
|
6015
6031
|
|
|
6016
6032
|
default:
|
|
6017
6033
|
return null;
|
|
@@ -6021,15 +6037,15 @@
|
|
|
6021
6037
|
}, {
|
|
6022
6038
|
key: "render",
|
|
6023
6039
|
value: function render() {
|
|
6024
|
-
var
|
|
6040
|
+
var _this4 = this;
|
|
6025
6041
|
|
|
6026
6042
|
return /*#__PURE__*/React__default['default'].createElement("div", {
|
|
6027
|
-
className: "hubSidebar ".concat(this.props.className ? this.props.className : ''),
|
|
6043
|
+
className: "hubSidebar".concat(this.state.showSidebar ? ' hubSidebar-show' : '', " ").concat(this.props.className ? this.props.className : ''),
|
|
6028
6044
|
style: this.props.style
|
|
6029
6045
|
}, /*#__PURE__*/React__default['default'].createElement("div", {
|
|
6030
6046
|
className: "hubSidebar_content"
|
|
6031
6047
|
}, this.props.sections.map(function (section, i) {
|
|
6032
|
-
return
|
|
6048
|
+
return _this4.renderSection(section, i);
|
|
6033
6049
|
})));
|
|
6034
6050
|
}
|
|
6035
6051
|
}]);
|
package/package.json
CHANGED
|
@@ -7,16 +7,32 @@ import { Button } from './Button';
|
|
|
7
7
|
import { Text } from './Text';
|
|
8
8
|
|
|
9
9
|
class HubSidebar extends PureComponent {
|
|
10
|
+
constructor(props) {
|
|
11
|
+
super(props);
|
|
12
|
+
|
|
13
|
+
this.state = {
|
|
14
|
+
showSidebar: false,
|
|
15
|
+
};
|
|
16
|
+
}
|
|
17
|
+
|
|
10
18
|
componentDidMount() {
|
|
11
19
|
this.props.setNavData({
|
|
12
20
|
condensedSidebar: true,
|
|
13
21
|
});
|
|
22
|
+
setTimeout(() => {
|
|
23
|
+
this.setState({
|
|
24
|
+
showSidebar: true,
|
|
25
|
+
});
|
|
26
|
+
}, 50);
|
|
14
27
|
}
|
|
15
28
|
|
|
16
29
|
componentWillUnmount() {
|
|
17
30
|
this.props.setNavData({
|
|
18
31
|
condensedSidebar: false,
|
|
19
32
|
});
|
|
33
|
+
this.setState({
|
|
34
|
+
showSidebar: false,
|
|
35
|
+
});
|
|
20
36
|
}
|
|
21
37
|
|
|
22
38
|
renderNewButton(item, index) {
|
|
@@ -66,7 +82,10 @@ class HubSidebar extends PureComponent {
|
|
|
66
82
|
|
|
67
83
|
render() {
|
|
68
84
|
return (
|
|
69
|
-
<div
|
|
85
|
+
<div
|
|
86
|
+
className={`hubSidebar${this.state.showSidebar ? ' hubSidebar-show' : ''} ${this.props.className ? this.props.className : ''}`}
|
|
87
|
+
style={this.props.style}
|
|
88
|
+
>
|
|
70
89
|
{/* Top Add Button */}
|
|
71
90
|
<div className="hubSidebar_content">
|
|
72
91
|
{/* Title */}
|