🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Book a DemoInstallSign in
Socket

primereact

Package Overview
Dependencies
Maintainers
1
Versions
177
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

primereact - npm Package Compare versions

Comparing version

to
1.6.0-rc.1

8

components/autocomplete/AutoComplete.js

@@ -74,6 +74,2 @@ 'use strict';

value: function shouldComponentUpdate(nextProps, nextState) {
if (!this.props.multiple) {
this.updateInputField(nextProps.value);
}
if (this.manualModelChange) {

@@ -591,2 +587,6 @@ this.manualModelChange = false;

if (this.input && !this.props.multiple) {
this.updateInputField(this.props.value);
}
var input = void 0,

@@ -593,0 +593,0 @@ dropdown = void 0;

@@ -178,3 +178,8 @@ 'use strict';

value: function updateColorSelector() {
this.colorSelector.style.backgroundColor = '#' + this.HSBtoHEX(this.hsbValue);
var hsbValue = this.validateHSB({
h: this.hsbValue.h,
s: 100,
b: 100
});
this.colorSelector.style.backgroundColor = '#' + this.HSBtoHEX(hsbValue);
}

@@ -484,8 +489,12 @@ }, {

value: function shouldComponentUpdate(nextProps) {
this.updateHSBValue(nextProps.value);
var newValue = this.toHSB(nextProps.value);
var oldValue = this.hsbValue;
var equals = newValue.h === oldValue.h && newValue.s === oldValue.s && newValue.b === oldValue.b;
if (this.colorDragging) {
return false;
} else {
var oldValue = this.hsbValue;
this.updateHSBValue(nextProps.value);
var newValue = this.toHSB(nextProps.value);
var equals = newValue.h === oldValue.h && newValue.s === oldValue.s && newValue.b === oldValue.b;
return !equals;
return !equals;
}
}

@@ -495,6 +504,6 @@ }, {

value: function updateUI() {
this.updateHue();
this.updateColorHandle();
this.updateInput();
this.updateColorSelector();
this.updateHue();
this.updateInput();
}

@@ -501,0 +510,0 @@ }, {

@@ -17,4 +17,5 @@ import React = require("react");

footer?: string;
lazy?: boolean;
}
export class DataScroller extends React.Component<DataScrollerProps,any> {}
export class DataScroller extends React.Component<DataScrollerProps,any> {}

@@ -176,2 +176,9 @@ 'use strict';

var newValue = this.props.value;
if (newValue && this.value !== newValue) {
this.value = newValue;
this.handleDataChange();
}
if (this.props.loader && !this.isLoaded) {

@@ -189,12 +196,2 @@ this.unbindScrollListener();

}, {
key: 'componentWillReceiveProps',
value: function componentWillReceiveProps(nextProps) {
var newValue = nextProps.value;
if (newValue && this.value !== newValue) {
this.value = newValue;
this.handleDataChange();
}
}
}, {
key: 'componentWillUnmount',

@@ -273,3 +270,4 @@ value: function componentWillUnmount() {

header: null,
footer: null
footer: null,
lazy: null
};

@@ -289,3 +287,4 @@ DataScroller.propsTypes = {

header: _propTypes2.default.string,
footer: _propTypes2.default.string
footer: _propTypes2.default.string,
lazy: _propTypes2.default.bool
};

@@ -67,4 +67,5 @@ import React = require("react");

rowClassName?(rowData: any): object;
rowGroupHeaderTemplate?(): void;
rowGroupFooterTemplate?(): void;
rowGroupHeaderTemplate?(data: any, index: number): void;
rowGroupFooterTemplate?(data: any, index: number): void;
groupField?: string;
loading?:boolean;

@@ -71,0 +72,0 @@ loadingIcon?:string;

@@ -8,2 +8,4 @@ 'use strict';

var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();

@@ -187,3 +189,3 @@

if (value1 == null && value2 != null) result = -1;else if (value1 != null && value2 == null) result = 1;else if (value1 == null && value2 == null) result = 0;else if (typeof value1 === 'string' && typeof value2 === 'string') result = value1.localeCompare(value2);else result = value1 < value2 ? -1 : value1 > value2 ? 1 : 0;
if (value1 == null && value2 != null) result = -1;else if (value1 != null && value2 == null) result = 1;else if (value1 == null && value2 == null) result = 0;else if (typeof value1 === 'string' && typeof value2 === 'string') result = value1.localeCompare(value2, undefined, { numeric: true });else result = value1 < value2 ? -1 : value1 > value2 ? 1 : 0;

@@ -217,3 +219,3 @@ return _this2.state.sortOrder * result;

if (value1.localeCompare && value1 !== value2) {
return this.state.multiSortMeta[index].order * value1.localeCompare(value2);
return this.state.multiSortMeta[index].order * value1.localeCompare(value2, undefined, { numeric: true });
}

@@ -292,28 +294,2 @@ } else {

}, {
key: 'componentWillReceiveProps',
value: function componentWillReceiveProps(nextProps) {
if (nextProps.first !== null && nextProps.first !== this.props.first) {
this.setState({ first: nextProps.first });
}
if (nextProps.rows !== null && nextProps.rows !== this.props.rows) {
this.setState({ rows: nextProps.rows });
}
if (nextProps.sortField && nextProps.sortField !== this.props.sortField) {
this.setState({ sortField: nextProps.sortField });
}
if (nextProps.sortOrder && nextProps.sortOrder !== this.props.sortOrder) {
this.setState({ sortOrder: nextProps.sortOrder });
}
if (nextProps.multiSortMeta && nextProps.multiSortMeta !== this.props.multiSortMeta) {
this.setState({ multiSortMeta: nextProps.multiSortMeta });
}
if (nextProps.filters && nextProps.filters !== this.props.filters) {
this.setState({ filters: nextProps.filters });
}
if (nextProps.globalFilter !== this.props.globalFilter) {
this.setState({ first: 0 });
}
}
}, {
key: 'hasFooter',

@@ -641,3 +617,3 @@ value: function hasFooter() {

if (window.navigator.msSaveOrOpenBlob) {
navigator.msSaveOrOpenBlob(blob, this.exportFilename + '.csv');
navigator.msSaveOrOpenBlob(blob, this.props.exportFilename + '.csv');
} else {

@@ -1069,2 +1045,34 @@ var link = document.createElement("a");

}
}], [{
key: 'getDerivedStateProps',
value: function getDerivedStateProps(nextProps, prevState) {
var state = {};
if (nextProps.first !== null && nextProps.first !== prevState.first) {
state = _extends({}, state, { first: nextProps.first });
}
if (nextProps.rows !== null && nextProps.rows !== prevState.rows) {
state = _extends({}, state, { rows: nextProps.rows });
}
if (nextProps.sortField && nextProps.sortField !== prevState.sortField) {
state = _extends({}, state, { sortField: nextProps.sortField });
}
if (nextProps.sortOrder && nextProps.sortOrder !== prevState.sortOrder) {
state = _extends({}, state, { sortOrder: nextProps.sortOrder });
}
if (nextProps.multiSortMeta && nextProps.multiSortMeta !== prevState.multiSortMeta) {
state = _extends({}, state, { multiSortMeta: nextProps.multiSortMeta });
}
if (nextProps.filters && nextProps.filters !== prevState.filters) {
state = _extends({}, state, { filters: nextProps.filters });
}
if (nextProps.globalFilter !== null) {
state = _extends({}, state, { first: 0 });
}
if (Object.keys(state).length > 0) return state;
return null;
}
}]);

@@ -1071,0 +1079,0 @@

@@ -114,3 +114,3 @@ 'use strict';

if (value1 == null && value2 != null) result = -1;else if (value1 != null && value2 == null) result = 1;else if (value1 == null && value2 == null) result = 0;else if (typeof value1 === 'string' && typeof value2 === 'string') result = value1.localeCompare(value2);else result = value1 < value2 ? -1 : value1 > value2 ? 1 : 0;
if (value1 == null && value2 != null) result = -1;else if (value1 != null && value2 == null) result = 1;else if (value1 == null && value2 == null) result = 0;else if (typeof value1 === 'string' && typeof value2 === 'string') result = value1.localeCompare(value2, undefined, { numeric: true });else result = value1 < value2 ? -1 : value1 > value2 ? 1 : 0;
return _this2.state.sortOrder * result;

@@ -153,17 +153,2 @@ });

}, {
key: 'componentWillUpdate',
value: function componentWillUpdate(nextProps) {
if (this.state.sortField !== nextProps.sortField || this.state.sortOrder !== nextProps.sortOrder) {
this.setState({ sortField: nextProps.sortField, sortOrder: nextProps.sortOrder });
this.sortChange = false;
}
}
}, {
key: 'componentDidUpdate',
value: function componentDidUpdate() {
if (this.state.sortField && !this.sortChange) {
this.sort();
}
}
}, {
key: 'renderTopPaginator',

@@ -257,2 +242,6 @@ value: function renderTopPaginator() {

value: function shouldComponentUpdate(nextProps, nextState) {
if (this.state.sortField !== nextProps.sortField || this.state.sortOrder !== nextProps.sortOrder) {
this.sortChange = false;
}
if (this.props.lazy && nextProps.value === this.props.value) return false;else return true;

@@ -263,2 +252,5 @@ }

value: function render() {
if (this.state.sortField && !this.sortChange) {
this.sort();
}

@@ -284,2 +276,13 @@ var className = (0, _classnames2.default)('ui-dataview ui-widget', { 'ui-dataview-list': this.state.layout === 'list',

}
}], [{
key: 'getDerivedStateFromProps',
value: function getDerivedStateFromProps(nextProps, prevState) {
if (prevState.sortField !== nextProps.sortField || prevState.sortOrder !== nextProps.sortOrder) {
return {
sortField: nextProps.sortField,
sortOrder: nextProps.sortOrder
};
}
return null;
}
}]);

@@ -286,0 +289,0 @@

@@ -426,13 +426,2 @@ 'use strict';

}, {
key: 'shouldComponentUpdate',
value: function shouldComponentUpdate(nextProps, nextState) {
if (this.state.visible !== nextProps.visible) {
if (nextProps.visible) this.show();else {
this.hide();
}
}
return true;
}
}, {
key: 'componentDidMount',

@@ -446,4 +435,4 @@ value: function componentDidMount() {

}, {
key: 'componentDidUpdate',
value: function componentDidUpdate() {
key: 'getSnapshotBeforeUpdate',
value: function getSnapshotBeforeUpdate(prevProps, prevState) {
if (this.props.autoAlign && this.state.visible) {

@@ -456,4 +445,15 @@ var height = _DomHandler2.default.getOuterHeight(this.container);

}
return null;
}
}, {
key: 'componentDidUpdate',
value: function componentDidUpdate(prevProps, prevState, snapshot) {
if (prevState.visible !== this.props.visible) {
if (this.props.visible) this.show();else {
this.hide();
}
}
}
}, {
key: 'componentWillUnmount',

@@ -460,0 +460,0 @@ value: function componentWillUnmount() {

@@ -564,2 +564,7 @@ 'use strict';

if (this.props.editable && this.editableInput) {
var value = label || this.props.value || '';
this.editableInput.value = value;
}
return _react2.default.createElement(

@@ -566,0 +571,0 @@ 'div',

@@ -100,6 +100,6 @@ 'use strict';

}, {
key: 'componentWillReceiveProps',
value: function componentWillReceiveProps(nextProps) {
if (nextProps.value !== this.value) {
this.value = nextProps.value;
key: 'componentDidUpdate',
value: function componentDidUpdate(prevProps, prevState, snapshot) {
if (this.props.value !== this.value) {
this.value = this.props.value;
var sel = this.quill.getSelection();

@@ -106,0 +106,0 @@ if (sel) {

@@ -30,9 +30,6 @@ 'use strict';

function GMap(props) {
function GMap() {
_classCallCheck(this, GMap);
var _this = _possibleConstructorReturn(this, (GMap.__proto__ || Object.getPrototypeOf(GMap)).call(this, props));
_this.state = {};
return _this;
return _possibleConstructorReturn(this, (GMap.__proto__ || Object.getPrototypeOf(GMap)).apply(this, arguments));
}

@@ -144,6 +141,6 @@

}, {
key: 'componentWillReceiveProps',
value: function componentWillReceiveProps(nextProps, nextState) {
if (this.props.overlays !== nextProps.overlays) {
if (this.props.overlays) {
key: 'componentDidUpdate',
value: function componentDidUpdate(prevProps, prevState, snapshot) {
if (prevProps.overlays !== this.props.overlays) {
if (prevProps.overlays) {
var _iteratorNormalCompletion2 = true;

@@ -154,5 +151,6 @@ var _didIteratorError2 = false;

try {
for (var _iterator2 = this.props.overlays[Symbol.iterator](), _step2; !(_iteratorNormalCompletion2 = (_step2 = _iterator2.next()).done); _iteratorNormalCompletion2 = true) {
for (var _iterator2 = prevProps.overlays[Symbol.iterator](), _step2; !(_iteratorNormalCompletion2 = (_step2 = _iterator2.next()).done); _iteratorNormalCompletion2 = true) {
var overlay = _step2.value;
google.maps.event.clearInstanceListeners(overlay);
overlay.setMap(null);

@@ -176,3 +174,3 @@ }

this.initOverlays(nextProps.overlays);
this.initOverlays(this.props.overlays);
}

@@ -179,0 +177,0 @@ }

@@ -5,4 +5,4 @@ import React = require("react");

severity: 'success' | 'info' | 'warn' | 'error',
summary: React.ReactElement | string;
detail: React.ReactElement | string;
summary: Element | string;
detail: Element | string;
closable: boolean;

@@ -9,0 +9,0 @@ sticky: boolean;

@@ -39,6 +39,14 @@ 'use strict';

function InputMask() {
function InputMask(props) {
_classCallCheck(this, InputMask);
return _possibleConstructorReturn(this, (InputMask.__proto__ || Object.getPrototypeOf(InputMask)).apply(this, arguments));
var _this = _possibleConstructorReturn(this, (InputMask.__proto__ || Object.getPrototypeOf(InputMask)).call(this, props));
_this.onFocus = _this.onFocus.bind(_this);
_this.onBlur = _this.onBlur.bind(_this);
_this.onKeyDown = _this.onKeyDown.bind(_this);
_this.onKeyPress = _this.onKeyPress.bind(_this);
_this.onInput = _this.onInput.bind(_this);
_this.handleInputChange = _this.handleInputChange.bind(_this);
return _this;
}

@@ -321,2 +329,3 @@

value: function checkVal(allow) {
this.isValueChecked = true;
//try to place characters where they belong

@@ -458,2 +467,29 @@ var test = this.input.value,

}, {
key: 'updateValue',
value: function updateValue() {
var _this4 = this;
this.value = this.props.value;
if (this.input) {
if (this.value === undefined || this.value === null) {
this.input.value = '';
} else {
this.input.value = this.value;
this.checkVal();
}
setTimeout(function () {
if (_this4.input) {
_this4.writeBuffer();
_this4.checkVal();
}
}, 10);
this.focusText = this.input.value;
}
this.updateFilledState();
}
}, {
key: 'init',

@@ -505,27 +541,4 @@ value: function init() {

value: function componentDidMount() {
var _this4 = this;
this.init();
this.value = this.props.value;
if (this.input) {
if (this.value === undefined || this.value === null) {
this.input.value = '';
} else {
this.input.value = this.value;
this.checkVal();
}
setTimeout(function () {
if (_this4.input) {
_this4.writeBuffer();
_this4.checkVal();
}
}, 10);
this.focusText = this.input.value;
}
this.updateFilledState();
this.updateValue();
}

@@ -537,2 +550,6 @@ }, {

if (this.input && this.input.value !== this.props.value) {
this.updateValue();
}
return _react2.default.createElement(_InputText.InputText, { id: this.props.id, ref: function ref(el) {

@@ -542,4 +559,4 @@ return _this5.input = _reactDom2.default.findDOMNode(el);

size: this.props.size, maxLength: this.props.maxlength, tabIndex: this.props.tabindex, disabled: this.props.disabled, readOnly: this.props.readonly,
onFocus: this.onFocus.bind(this), onBlur: this.onBlur.bind(this), onKeyDown: this.onKeyDown.bind(this), onKeyPress: this.onKeyPress.bind(this),
onInput: this.onInput.bind(this), onPaste: this.handleInputChange.bind(this), required: this.props.required });
onFocus: this.onFocus, onBlur: this.onBlur, onKeyDown: this.onKeyDown, onKeyPress: this.onKeyPress,
onInput: this.onInput, onPaste: this.handleInputChange, required: this.props.required });
}

@@ -546,0 +563,0 @@ }]);

@@ -87,6 +87,6 @@ 'use strict';

}, {
key: 'componentWillUpdate',
value: function componentWillUpdate(nextProps) {
if (nextProps.value !== this.props.value) {
this.updateFilledState(nextProps.value);
key: 'componentDidUpdate',
value: function componentDidUpdate(prevProps, prevState, snapshot) {
if (prevProps.value !== this.props.value) {
this.updateFilledState(this.props.value);
}

@@ -93,0 +93,0 @@ }

@@ -128,9 +128,2 @@ 'use strict';

}, {
key: 'componentWillReceiveProps',
value: function componentWillReceiveProps(nextProps) {
if (nextProps.hasOwnProperty('value')) {
this.textareaProps.value = nextProps.value;
}
}
}, {
key: 'render',

@@ -140,2 +133,6 @@ value: function render() {

if (this.props.hasOwnProperty('value')) {
this.textareaProps.value = this.props.value;
}
var className = (0, _classnames2.default)('ui-inputtext ui-inputtextarea ui-corner-all ui-state-default ui-widget', this.props.className, {

@@ -142,0 +139,0 @@ 'ui-state-disabled': this.props.disabled,

@@ -7,2 +7,3 @@ import React = require("react");

options?: Array<any>,
optionLabel?: string,
itemTemplate?(): void,

@@ -19,2 +20,2 @@ style?: object,

export class ListBox extends React.Component<ListBoxProps,any> {}
export class ListBox extends React.Component<ListBoxProps,any> {}

@@ -73,8 +73,2 @@ 'use strict';

}, {
key: 'componentWillReceiveProps',
value: function componentWillReceiveProps(nextProps) {
this.node = nextProps.node;
this.setState({ expanded: this.node.expanded });
}
}, {
key: 'render',

@@ -84,2 +78,4 @@ value: function render() {

this.node = this.props.node;
var colspan = this.getColspan();

@@ -178,2 +174,12 @@ var nodeStyleClass = (0, _classnames2.default)('ui-organizationchart-node-content ui-widget-content ui-corner-all', this.node.className, {

}
}], [{
key: 'getDerivedStateFromProps',
value: function getDerivedStateFromProps(nextProps, prevState) {
if (nextProps.node.expanded !== prevState.expanded) {
return {
expanded: nextProps.node.expanded
};
}
return null;
}
}]);

@@ -293,9 +299,6 @@

}, {
key: 'componentWillReceiveProps',
value: function componentWillReceiveProps(nextProps) {
this.root = nextProps.value && nextProps.value.length ? nextProps.value[0] : null;
}
}, {
key: 'render',
value: function render() {
this.root = this.props.value && this.props.value.length ? this.props.value[0] : null;
var className = (0, _classnames2.default)('ui-organizationchart ui-widget', this.props.className);

@@ -302,0 +305,0 @@ return _react2.default.createElement(

@@ -78,7 +78,2 @@ 'use strict';

}, {
key: 'componentWillUpdate',
value: function componentWillUpdate(nextProps) {
this.input.checked = nextProps.checked;
}
}, {
key: 'render',

@@ -88,2 +83,6 @@ value: function render() {

if (this.input) {
this.input.checked = this.props.checked;
}
var containerClass = (0, _classnames2.default)('ui-radiobutton ui-widget', this.props.className);

@@ -90,0 +89,0 @@ var boxClass = (0, _classnames2.default)('ui-radiobutton-box ui-widget ui-corner-all ui-state-default', { 'ui-state-active': this.props.checked, 'ui-state-disabled': this.props.disabled });

@@ -46,3 +46,3 @@ 'use strict';

value: function rate(event, i) {
if (!this.props.readonly && !this.props.disabled) {
if (!this.props.readonly && !this.props.disabled && this.props.onChange) {
this.props.onChange({

@@ -59,3 +59,3 @@ originalEvent: event,

value: function clear(event) {
if (!this.props.readonly && !this.props.disabled) {
if (!this.props.readonly && !this.props.disabled && this.props.onChange) {
this.props.onChange({

@@ -70,14 +70,5 @@ originalEvent: event,

}, {
key: 'componentWillReceiveProps',
value: function componentWillReceiveProps(nextProps) {
var newValue = nextProps.value;
if (newValue !== this.state.value) {
this.setState({ value: newValue });
}
}
}, {
key: 'shouldComponentUpdate',
value: function shouldComponentUpdate(nextProps, nextState) {
if (nextState.value === this.state.value) {
if (nextState.value === this.state.value && nextProps.disabled === this.props.disabled) {
return false;

@@ -110,4 +101,4 @@ }

var iconClass = (0, _classnames2.default)('fa', {
'fa-star-o': !_this2.props.value || value > _this2.props.value,
'fa-star': value <= _this2.props.value
'fa-star-o': !_this2.state.value || value > _this2.state.value,
'fa-star': value <= _this2.state.value
});

@@ -131,2 +122,12 @@

}
}], [{
key: 'getDerivedStateFromProps',
value: function getDerivedStateFromProps(nextProps, prevState) {
if (nextProps.value !== prevState.value) {
return {
value: nextProps.value
};
}
return null;
}
}]);

@@ -133,0 +134,0 @@

@@ -270,6 +270,11 @@ 'use strict';

}, {
key: 'componentWillReceiveProps',
value: function componentWillReceiveProps(nextProps) {
if (!_ObjectUtils2.default.equals(nextProps.events, this.events)) {
this.events = [].concat(_toConsumableArray(nextProps.events));
key: 'componentWillUnmount',
value: function componentWillUnmount() {
(0, _jquery2.default)(this.scheduleEl).fullCalendar('destroy');
}
}, {
key: 'componentDidUpdate',
value: function componentDidUpdate(prevProps, prevState, snaphot) {
if (!_ObjectUtils2.default.equals(this.props.events, this.events)) {
this.events = [].concat(_toConsumableArray(this.props.events));
this.schedule.fullCalendar('removeEventSources');

@@ -280,7 +285,2 @@ this.schedule.fullCalendar('addEventSource', this.events);

}, {
key: 'componentWillUnmount',
value: function componentWillUnmount() {
(0, _jquery2.default)(this.scheduleEl).fullCalendar('destroy');
}
}, {
key: 'render',

@@ -287,0 +287,0 @@ value: function render() {

@@ -57,10 +57,10 @@ 'use strict';

value: function componentWillUnmount() {
this.unbindMaskClickListener();
this.disableModality();
this.unbindMaskClickListener();
}
}, {
key: 'componentWillReceiveProps',
value: function componentWillReceiveProps(nextProps) {
if (this.state.visible !== nextProps.visible) {
if (nextProps.visible) this.show();else {
key: 'componentDidUpdate',
value: function componentDidUpdate(prevProps, prevState, snapshot) {
if (prevState.visible !== this.props.visible) {
if (this.props.visible) this.show();else {
if (this.preventVisibleChangePropagation) this.preventVisibleChangePropagation = false;else this.hide();

@@ -67,0 +67,0 @@ }

@@ -257,9 +257,2 @@ 'use strict';

}, {
key: 'componentWillReceiveProps',
value: function componentWillReceiveProps(nextProps) {
if (this.state.expanded !== nextProps.node.expanded) {
this.setState({ expanded: nextProps.node.expanded });
}
}
}, {
key: 'render',

@@ -273,2 +266,13 @@ value: function render() {

}
}], [{
key: 'getDerivedStateFromProps',
value: function getDerivedStateFromProps(nextProps, prevState) {
var nextNode = nextProps.node;
if (nextNode.hasOwnProperty("expanded") && prevState.expanded !== nextNode.expanded) {
return {
expanded: nextNode.expanded
};
}
return null;
}
}]);

@@ -632,2 +636,6 @@

if (this.props.selection && this.selection !== this.props.selection) {
this.selection = this.props.selection;
}
var treeClass = (0, _classnames2.default)('ui-tree ui-widget ui-widget-content ui-corner-all', this.props.className, {

@@ -634,0 +642,0 @@ 'ui-tree-selectable': this.props.selectionMode,

@@ -8,2 +8,4 @@ 'use strict';

var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();

@@ -518,18 +520,2 @@

}, {
key: 'componentWillReceiveProps',
value: function componentWillReceiveProps(nextProps) {
if (nextProps.sortField !== this.props.sortField) {
this.setState({ sortField: nextProps.sortField });
}
if (nextProps.sortOrder !== this.props.sortOrder) {
this.setState({ sortOrder: nextProps.sortOrder });
}
if (nextProps.multiSortMeta !== this.props.multiSortMeta) {
this.setState({ multiSortMeta: nextProps.multiSortMeta });
}
if (nextProps.value && !_ObjectUtils2.default.equalsByValue(nextProps.value, this.value)) {
this.value = [].concat(_toConsumableArray(nextProps.value));
}
}
}, {
key: 'render',

@@ -539,2 +525,6 @@ value: function render() {

if (this.props.value && !_ObjectUtils2.default.equalsByValue(this.props.value, this.value)) {
this.value = [].concat(_toConsumableArray(this.props.value));
}
var value = this.processData();

@@ -582,2 +572,21 @@ this.columns = _react2.default.Children.map(this.props.children, function (element, i) {

}
}], [{
key: 'getDerivedStateFromProps',
value: function getDerivedStateFromProps(nextProps, prevState) {
var state = {};
if (nextProps.sortField !== prevState.sortField) {
state = _extends({}, state, { sortField: nextProps.sortField });
}
if (nextProps.sortOrder !== prevState.sortOrder) {
state = _extends({}, state, { sortOrder: nextProps.sortOrder });
}
if (nextProps.multiSortMeta !== prevState.multiSortMeta) {
state = _extends({}, state, { multiSortMeta: nextProps.multiSortMeta });
}
if (Object.keys(state).length > 0) return state;
return null;
}
}]);

@@ -584,0 +593,0 @@

@@ -98,9 +98,2 @@ 'use strict';

}, {
key: 'componentWillReceiveProps',
value: function componentWillReceiveProps(nextProps) {
this.node = nextProps.node;
this.node.parent = nextProps.parentNode;
this.setState({ expanded: this.node.expanded });
}
}, {
key: 'render',

@@ -110,2 +103,7 @@ value: function render() {

if (this.node !== this.props.node) {
this.node = this.props.node;
this.node.parent = this.props.node.parentNode;
}
var tableRowClass = (0, _classnames2.default)('ui-treetable-row', {

@@ -191,2 +189,13 @@ 'ui-state-highlight': this.isSelected(),

}
}], [{
key: 'getDerivedStateFromProps',
value: function getDerivedStateFromProps(nextProps, prevState) {
var expanded = nextProps.node.expanded;
if (prevState.expanded !== expanded) {
return {
expanded: expanded
};
}
return null;
}
}]);

@@ -193,0 +202,0 @@

{
"name": "primereact",
"version": "1.5.3",
"version": "1.6.0-rc.1",
"homepage": "https://www.primefaces.org/primereact",

@@ -5,0 +5,0 @@ "repository": {

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet