@synerise/ds-column-manager 0.11.41 → 0.11.43

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/CHANGELOG.md CHANGED
@@ -3,6 +3,22 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ ## [0.11.43](https://github.com/Synerise/synerise-design/compare/@synerise/ds-column-manager@0.11.42...@synerise/ds-column-manager@0.11.43) (2024-04-17)
7
+
8
+ **Note:** Version bump only for package @synerise/ds-column-manager
9
+
10
+
11
+
12
+
13
+
14
+ ## [0.11.42](https://github.com/Synerise/synerise-design/compare/@synerise/ds-column-manager@0.11.41...@synerise/ds-column-manager@0.11.42) (2024-04-17)
15
+
16
+ **Note:** Version bump only for package @synerise/ds-column-manager
17
+
18
+
19
+
20
+
21
+
6
22
  ## [0.11.41](https://github.com/Synerise/synerise-design/compare/@synerise/ds-column-manager@0.11.40...@synerise/ds-column-manager@0.11.41) (2024-04-15)
7
23
 
8
24
  **Note:** Version bump only for package @synerise/ds-column-manager
@@ -8,8 +8,6 @@ function _defineProperties(target, props) { for (var i = 0; i < props.length; i+
8
8
 
9
9
  function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
10
10
 
11
- function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
12
-
13
11
  function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; subClass.__proto__ = superClass; }
14
12
 
15
13
  function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
@@ -40,14 +38,12 @@ var DEFAULT_STATE = {
40
38
  };
41
39
 
42
40
  var ColumnManager = /*#__PURE__*/function (_React$Component) {
43
- _inheritsLoose(ColumnManager, _React$Component);
44
-
45
41
  function ColumnManager(props) {
46
42
  var _this;
47
43
 
48
44
  _this = _React$Component.call(this, props) || this; // eslint-disable-next-line react/state-in-constructor
49
45
 
50
- _defineProperty(_assertThisInitialized(_this), "updateVisibleColumns", function (newVisibleList) {
46
+ _defineProperty(_this, "updateVisibleColumns", function (newVisibleList) {
51
47
  _this.setState({
52
48
  visibleList: newVisibleList.map(function (column) {
53
49
  return _objectSpread({}, column, {
@@ -57,7 +53,7 @@ var ColumnManager = /*#__PURE__*/function (_React$Component) {
57
53
  });
58
54
  });
59
55
 
60
- _defineProperty(_assertThisInitialized(_this), "updateHiddenColumns", function (newHiddenList) {
56
+ _defineProperty(_this, "updateHiddenColumns", function (newHiddenList) {
61
57
  _this.setState({
62
58
  hiddenList: newHiddenList.map(function (column) {
63
59
  return _objectSpread({}, column, {
@@ -67,7 +63,7 @@ var ColumnManager = /*#__PURE__*/function (_React$Component) {
67
63
  });
68
64
  });
69
65
 
70
- _defineProperty(_assertThisInitialized(_this), "hideColumn", function (id) {
66
+ _defineProperty(_this, "hideColumn", function (id) {
71
67
  var _this$state = _this.state,
72
68
  visibleList = _this$state.visibleList,
73
69
  hiddenList = _this$state.hiddenList;
@@ -84,7 +80,7 @@ var ColumnManager = /*#__PURE__*/function (_React$Component) {
84
80
  });
85
81
  });
86
82
 
87
- _defineProperty(_assertThisInitialized(_this), "showColumn", function (id) {
83
+ _defineProperty(_this, "showColumn", function (id) {
88
84
  var _this$state2 = _this.state,
89
85
  visibleList = _this$state2.visibleList,
90
86
  hiddenList = _this$state2.hiddenList;
@@ -101,7 +97,7 @@ var ColumnManager = /*#__PURE__*/function (_React$Component) {
101
97
  });
102
98
  });
103
99
 
104
- _defineProperty(_assertThisInitialized(_this), "toggleColumn", function (id, columnVisible) {
100
+ _defineProperty(_this, "toggleColumn", function (id, columnVisible) {
105
101
  if (columnVisible) {
106
102
  _this.hideColumn(id);
107
103
  } else {
@@ -109,7 +105,7 @@ var ColumnManager = /*#__PURE__*/function (_React$Component) {
109
105
  }
110
106
  });
111
107
 
112
- _defineProperty(_assertThisInitialized(_this), "setFixed", function (id, fixed) {
108
+ _defineProperty(_this, "setFixed", function (id, fixed) {
113
109
  var visibleList = _this.state.visibleList;
114
110
 
115
111
  _this.setState({
@@ -127,13 +123,13 @@ var ColumnManager = /*#__PURE__*/function (_React$Component) {
127
123
  });
128
124
  });
129
125
 
130
- _defineProperty(_assertThisInitialized(_this), "showGroupSettings", function (column) {
126
+ _defineProperty(_this, "showGroupSettings", function (column) {
131
127
  _this.setState({
132
128
  activeColumn: column
133
129
  });
134
130
  });
135
131
 
136
- _defineProperty(_assertThisInitialized(_this), "hideItemFilter", function () {
132
+ _defineProperty(_this, "hideItemFilter", function () {
137
133
  var hideSavedViews = _this.props.hideSavedViews;
138
134
  hideSavedViews && hideSavedViews();
139
135
 
@@ -142,19 +138,19 @@ var ColumnManager = /*#__PURE__*/function (_React$Component) {
142
138
  });
143
139
  });
144
140
 
145
- _defineProperty(_assertThisInitialized(_this), "handleShowItemFilter", function () {
141
+ _defineProperty(_this, "handleShowItemFilter", function () {
146
142
  _this.setState({
147
143
  itemFilterVisible: true
148
144
  });
149
145
  });
150
146
 
151
- _defineProperty(_assertThisInitialized(_this), "handleSearchChange", function (query) {
147
+ _defineProperty(_this, "handleSearchChange", function (query) {
152
148
  _this.setState({
153
149
  searchQuery: query
154
150
  });
155
151
  });
156
152
 
157
- _defineProperty(_assertThisInitialized(_this), "handleSave", function (viewMeta) {
153
+ _defineProperty(_this, "handleSave", function (viewMeta) {
158
154
  var onSave = _this.props.onSave;
159
155
  var _this$state3 = _this.state,
160
156
  visibleList = _this$state3.visibleList,
@@ -167,7 +163,7 @@ var ColumnManager = /*#__PURE__*/function (_React$Component) {
167
163
  });
168
164
  });
169
165
 
170
- _defineProperty(_assertThisInitialized(_this), "handleApply", function () {
166
+ _defineProperty(_this, "handleApply", function () {
171
167
  var onApply = _this.props.onApply;
172
168
  var _this$state4 = _this.state,
173
169
  visibleList = _this$state4.visibleList,
@@ -189,6 +185,8 @@ var ColumnManager = /*#__PURE__*/function (_React$Component) {
189
185
  return _this;
190
186
  }
191
187
 
188
+ _inheritsLoose(ColumnManager, _React$Component);
189
+
192
190
  ColumnManager.getDerivedStateFromProps = function getDerivedStateFromProps(props, state) {
193
191
  if (props.itemFilterConfig && props.itemFilterConfig.selectedItemId !== state.selectedFilterId) {
194
192
  var visible = props.columns.filter(function (column) {
@@ -232,7 +230,7 @@ var ColumnManager = /*#__PURE__*/function (_React$Component) {
232
230
  var visibleListWithGroup = visibleList.map(function (column) {
233
231
  var _groupSettings$column;
234
232
 
235
- if (column.id === (groupSettings == null ? void 0 : (_groupSettings$column = groupSettings.column) == null ? void 0 : _groupSettings$column.id)) {
233
+ if (column.id === (groupSettings == null || (_groupSettings$column = groupSettings.column) == null ? void 0 : _groupSettings$column.id)) {
236
234
  return _objectSpread({}, column, {
237
235
  group: true
238
236
  });
@@ -317,7 +315,7 @@ var ColumnManager = /*#__PURE__*/function (_React$Component) {
317
315
  },
318
316
  visible: activeColumn !== undefined,
319
317
  column: activeColumn,
320
- settings: (activeColumn == null ? void 0 : activeColumn.key) === (groupSettings == null ? void 0 : (_groupSettings$column2 = groupSettings.column) == null ? void 0 : _groupSettings$column2.key) ? groupSettings : undefined,
318
+ settings: (activeColumn == null ? void 0 : activeColumn.key) === (groupSettings == null || (_groupSettings$column2 = groupSettings.column) == null ? void 0 : _groupSettings$column2.key) ? groupSettings : undefined,
321
319
  onOk: function onOk(settings) {
322
320
  _this2.setState({
323
321
  groupSettings: settings,
@@ -327,7 +325,7 @@ var ColumnManager = /*#__PURE__*/function (_React$Component) {
327
325
  }));
328
326
  };
329
327
 
330
- _createClass(ColumnManager, [{
328
+ return _createClass(ColumnManager, [{
331
329
  key: "texts",
332
330
  get: function get() {
333
331
  var _this$props2 = this.props,
@@ -461,8 +459,6 @@ var ColumnManager = /*#__PURE__*/function (_React$Component) {
461
459
  }, texts);
462
460
  }
463
461
  }]);
464
-
465
- return ColumnManager;
466
462
  }(React.Component); // @ts-ignore
467
463
 
468
464
 
@@ -2,8 +2,6 @@ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (O
2
2
 
3
3
  function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
4
4
 
5
- function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
6
-
7
5
  function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; subClass.__proto__ = superClass; }
8
6
 
9
7
  function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
@@ -26,8 +24,6 @@ var DEFAULT_STATE = {
26
24
  };
27
25
 
28
26
  var ColumnManagerActions = /*#__PURE__*/function (_React$Component) {
29
- _inheritsLoose(ColumnManagerActions, _React$Component);
30
-
31
27
  function ColumnManagerActions() {
32
28
  var _this;
33
29
 
@@ -37,19 +33,19 @@ var ColumnManagerActions = /*#__PURE__*/function (_React$Component) {
37
33
 
38
34
  _this = _React$Component.call.apply(_React$Component, [this].concat(args)) || this;
39
35
 
40
- _defineProperty(_assertThisInitialized(_this), "state", DEFAULT_STATE);
36
+ _defineProperty(_this, "state", DEFAULT_STATE);
41
37
 
42
- _defineProperty(_assertThisInitialized(_this), "handleCancel", function () {
38
+ _defineProperty(_this, "handleCancel", function () {
43
39
  _this.setState(DEFAULT_STATE);
44
40
  });
45
41
 
46
- _defineProperty(_assertThisInitialized(_this), "handleShowModal", function () {
42
+ _defineProperty(_this, "handleShowModal", function () {
47
43
  _this.setState({
48
44
  modalVisible: true
49
45
  });
50
46
  });
51
47
 
52
- _defineProperty(_assertThisInitialized(_this), "handleChange", function (event) {
48
+ _defineProperty(_this, "handleChange", function (event) {
53
49
  var _this$setState;
54
50
 
55
51
  var _event$currentTarget = event.currentTarget,
@@ -62,7 +58,7 @@ var ColumnManagerActions = /*#__PURE__*/function (_React$Component) {
62
58
  }, _this$setState));
63
59
  });
64
60
 
65
- _defineProperty(_assertThisInitialized(_this), "handleSubmit", function () {
61
+ _defineProperty(_this, "handleSubmit", function () {
66
62
  var _this$state = _this.state,
67
63
  name = _this$state.name,
68
64
  description = _this$state.description;
@@ -89,6 +85,8 @@ var ColumnManagerActions = /*#__PURE__*/function (_React$Component) {
89
85
  return _this;
90
86
  }
91
87
 
88
+ _inheritsLoose(ColumnManagerActions, _React$Component);
89
+
92
90
  var _proto = ColumnManagerActions.prototype;
93
91
 
94
92
  _proto.render = function render() {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@synerise/ds-column-manager",
3
- "version": "0.11.41",
3
+ "version": "0.11.43",
4
4
  "description": "ColumnManager UI Component for the Synerise Design System",
5
5
  "license": "ISC",
6
6
  "repository": "Synerise/synerise-design",
@@ -37,7 +37,7 @@
37
37
  "@synerise/ds-icon": "^0.60.7",
38
38
  "@synerise/ds-input": "^0.20.6",
39
39
  "@synerise/ds-input-number": "^0.9.12",
40
- "@synerise/ds-item-filter": "^0.8.117",
40
+ "@synerise/ds-item-filter": "^0.8.119",
41
41
  "@synerise/ds-menu": "^0.18.20",
42
42
  "@synerise/ds-modal": "^0.17.25",
43
43
  "@synerise/ds-result": "^0.6.51",
@@ -62,5 +62,5 @@
62
62
  "@testing-library/jest-dom": "5.1.1",
63
63
  "@testing-library/react": "10.0.1"
64
64
  },
65
- "gitHead": "fcc57aef73d1309a366e4c6e80ce4defdd9f20f8"
65
+ "gitHead": "2b3ed7503dacc36c207049a5a3e81bfe190de0be"
66
66
  }