versacall-core-library-react 2.0.62 → 2.0.63

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.
@@ -124,27 +124,27 @@ var CoreTagFilter = /*#__PURE__*/function (_Component) {
124
124
  } else {
125
125
  newBasicFilter = "(".concat(moduleFilters.join(' OR '), ")");
126
126
  }
127
- } // if mpType has elements, add an AND and then joing those elemets with an ' OR '
127
+ } // if mpTag has elements add an AND and then joing those elemets with an ' OR '
128
128
 
129
129
 
130
- var typeFilters = _toConsumableArray(newFilter.monitoringPointTypeFilters);
130
+ var tagFilters = _toConsumableArray(newFilter.monitoringPointTagFilters);
131
131
 
132
- if (typeFilters.length > 0) {
132
+ if (tagFilters.length > 0) {
133
133
  if (newBasicFilter.length > 0) {
134
- newBasicFilter = "".concat(newBasicFilter, " AND (").concat(typeFilters.join(' OR '), ")");
134
+ newBasicFilter = "".concat(newBasicFilter, " AND (").concat(tagFilters.join(' OR '), ")");
135
135
  } else {
136
- newBasicFilter = "(".concat(typeFilters.join(' OR '), ")");
136
+ newBasicFilter = "(".concat(tagFilters.join(' OR '), ")");
137
137
  }
138
- } // if mpTag has elements add an AND and then joing those elemets with an ' OR '
138
+ } // if mpType has elements, add an AND and then joing those elemets with an ' OR '
139
139
 
140
140
 
141
- var tagFilters = _toConsumableArray(newFilter.monitoringPointTagFilters);
141
+ var typeFilters = _toConsumableArray(newFilter.monitoringPointTypeFilters);
142
142
 
143
- if (tagFilters.length > 0) {
143
+ if (typeFilters.length > 0) {
144
144
  if (newBasicFilter.length > 0) {
145
- newBasicFilter = "".concat(newBasicFilter, " AND (").concat(tagFilters.join(' OR '), ")");
145
+ newBasicFilter = "".concat(newBasicFilter, " AND (").concat(typeFilters.join(' OR '), ")");
146
146
  } else {
147
- newBasicFilter = "(".concat(tagFilters.join(' OR '), ")");
147
+ newBasicFilter = "(".concat(typeFilters.join(' OR '), ")");
148
148
  }
149
149
  } // merge new basicFilter with newFilter properties and re-call function
150
150
 
@@ -182,22 +182,23 @@ var CoreTagFilter = /*#__PURE__*/function (_Component) {
182
182
  moduleLocationFilters = filter.moduleLocationFilters,
183
183
  monitoringPointTagFilters = filter.monitoringPointTagFilters,
184
184
  monitoringPointTypeFilters = filter.monitoringPointTypeFilters;
185
- var showBaseAnd = baseFilter && baseFilter.length > 0;
185
+ var haveBaseFilter = baseFilter && baseFilter.length > 0;
186
+ var showModuleAnd = (moduleTagFilters.length > 0 || moduleLocationFilters.length > 0) && haveBaseFilter;
186
187
  var showLocOr = moduleTagFilters.length > 0 && moduleLocationFilters.length > 0;
187
- var showMpTagAnd = (moduleTagFilters.length > 0 || moduleLocationFilters.length > 0) && monitoringPointTagFilters.length > 0;
188
- var showTypeAnd = (moduleTagFilters.length > 0 || moduleLocationFilters.length > 0 || monitoringPointTagFilters.length > 0) && monitoringPointTypeFilters.length > 0;
188
+ var showMpTagAnd = (haveBaseFilter || moduleTagFilters.length > 0 || moduleLocationFilters.length > 0) && monitoringPointTagFilters.length > 0;
189
+ var showTypeAnd = (haveBaseFilter || moduleTagFilters.length > 0 || moduleLocationFilters.length > 0 || monitoringPointTagFilters.length > 0) && monitoringPointTypeFilters.length > 0;
189
190
  var baseError = false;
190
191
 
191
- if (showBaseAnd) {
192
+ if (baseFilter && baseFilter.length > 0) {
192
193
  if (baseFilters === null || !baseFilters.includes(baseFilter)) {
193
194
  baseError = true;
194
195
  }
195
196
  }
196
197
 
197
- return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, showBaseAnd && /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, "(", /*#__PURE__*/_react.default.createElement(_Chip.default, {
198
+ return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, haveBaseFilter && /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, "(", /*#__PURE__*/_react.default.createElement(_Chip.default, {
198
199
  label: baseFilter,
199
200
  color: baseError ? 'secondary' : 'default'
200
- }), ")"), showBaseAnd && /*#__PURE__*/_react.default.createElement("span", null, "\xA0AND\xA0"), (moduleTagFilters.length > 0 || moduleLocationFilters.length > 0) && /*#__PURE__*/_react.default.createElement("span", null, "(", moduleTagFilters.map(function (tag, index) {
201
+ }), ")"), showModuleAnd && /*#__PURE__*/_react.default.createElement("span", null, "\xA0AND\xA0"), (moduleTagFilters.length > 0 || moduleLocationFilters.length > 0) && /*#__PURE__*/_react.default.createElement("span", null, "(", moduleTagFilters.map(function (tag, index) {
201
202
  return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, {
202
203
  key: "mtag_".concat(tag)
203
204
  }, index !== 0 && /*#__PURE__*/_react.default.createElement("span", null, "\xA0OR\xA0"), /*#__PURE__*/_react.default.createElement(_Chip.default, {
package/package.json CHANGED
@@ -2,10 +2,10 @@
2
2
  "versacall": {
3
3
  "title": "Versacall Core Library React",
4
4
  "applicationType": "react-library",
5
- "build": 62
5
+ "build": 63
6
6
  },
7
7
  "name": "versacall-core-library-react",
8
- "version": "2.0.62",
8
+ "version": "2.0.63",
9
9
  "description": "Versacall Core Library",
10
10
  "main": "dist/index.js",
11
11
  "module": "dist/index.js",