Skip to content

Commit 64fd0b9

Browse files
Bump WebUI to 2.8.4 (#1851)
* Bump WebUI to 2.8.0 * Use components moved to web-ui * Fix vulnerability * Fix bad import for buildUrl * Add missing copyright * Remove use of NormalizationKey for NumericalComparisonFilterModel * Bring FloatComparison filters in line with integer one --------- Co-authored-by: martinboulais <31805063+martinboulais@users.noreply.github.com>
1 parent 3b3053e commit 64fd0b9

85 files changed

Lines changed: 347 additions & 2354 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

lib/domain/dtos/filters/NumericalComparisonDto.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,4 +20,7 @@ exports.IntegerComparisonDto = Joi.object({
2020
limit: Joi.number().integer().min(0),
2121
});
2222

23-
exports.FloatComparisonDto = Joi.object(Object.fromEntries(NUMERICAL_COMPARISON_OPERATORS.map((operator) => [operator, Joi.number()])));
23+
exports.FloatComparisonDto = Joi.object({
24+
operator: Joi.string().valid(...NUMERICAL_COMPARISON_OPERATORS),
25+
limit: Joi.number().min(0),
26+
});

lib/presentation/Component.js

Lines changed: 0 additions & 16 deletions
This file was deleted.

lib/public/app.css

Lines changed: 4 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ html, body {
22
scroll-behavior: smooth;
33

44
--ui-component-medium: 550px;
5-
--ui-component-large: 850px;
65
}
76

87
.cell-xs { max-width: 2rem; }
@@ -483,29 +482,16 @@ label {
483482

484483
/* Popover system */
485484

486-
.popover {
487-
flex-shrink: 0;
488-
flex-wrap: wrap;
489-
align-items: flex-start;
490-
position: absolute;
491-
top: 0;
492-
left: 0;
493-
z-index: 1002;
494-
max-width: var(--ui-component-large);
495-
}
496-
497485
.no-events {
498486
pointer-events: none;
499487
}
500488

501-
.btn-group-item:not(.last-item) {
502-
border-top-right-radius: 0;
503-
border-bottom-right-radius: 0;
489+
.btn-group .btn:not(.last-item) {
490+
border-radius: .25rem 0 0 .25rem;
504491
}
505492

506-
.btn-group-item:not(.first-item) {
507-
border-top-left-radius: 0;
508-
border-bottom-left-radius: 0;
493+
.btn-group .btn:not(.first-item) {
494+
border-radius: 0 .25rem .25rem 0;
509495
}
510496

511497
/* Modal */

lib/public/components/Filters/common/filters/NumericalComparisonFilterModel.js

Lines changed: 5 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -21,15 +21,12 @@ export class NumericalComparisonFilterModel extends FilterModel {
2121
/**
2222
* Constructor
2323
* @param {object} [options] options of the filter
24-
* @param {boolean} [options.useOperatorAsNormalizationKey] if true, operator value will be used as normalization key, else operator will be
25-
* passed with key `operator` and `operand` will be passed as `limit`
2624
* @param {number} [options.scale] scale applied on the value of the operand in normalization
2725
* @param {boolean} [options.integer=false] if true, value is parsed as integer (else, it will be parsed as float)
2826
*/
2927
constructor(options) {
3028
super();
31-
const { useOperatorAsNormalizationKey, scale = 1, integer = false } = options || {};
32-
this._useOperatorAsNormalizationKey = Boolean(useOperatorAsNormalizationKey);
29+
const { scale = 1, integer = false } = options || {};
3330

3431
this._operatorSelectionModel = new ComparisonSelectionModel();
3532
this._operatorSelectionModel.visualChange$.bubbleTo(this._visualChange$);
@@ -86,16 +83,10 @@ export class NumericalComparisonFilterModel extends FilterModel {
8683
* @inheritDoc
8784
*/
8885
get normalized() {
89-
if (this._useOperatorAsNormalizationKey) {
90-
return {
91-
[this._operatorSelectionModel.current]: this._operandInputModel.value,
92-
};
93-
} else {
94-
return {
95-
operator: this._operatorSelectionModel.current,
96-
limit: this._operandInputModel.value,
97-
};
98-
}
86+
return {
87+
operator: this._operatorSelectionModel.current,
88+
limit: this._operandInputModel.value,
89+
};
9990
}
10091

10192
// eslint-disable-next-line valid-jsdoc

lib/public/components/Filters/common/filters/ProcessedTextInputModel.js

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,15 @@
1+
/**
2+
* @license
3+
* Copyright CERN and copyright holders of ALICE O2. This software is
4+
* distributed under the terms of the GNU General Public License v3 (GPL
5+
* Version 3), copied verbatim in the file "COPYING".
6+
*
7+
* See http://alice-o2.web.cern.ch/license for full licensing information.
8+
*
9+
* In applying this license CERN does not waive the privileges and immunities
10+
* granted to it by virtue of its status as an Intergovernmental Organization
11+
* or submit itself to any jurisdiction.
12+
*/
113
import { Observable } from '/js/src/index.js';
214

315
/**
@@ -60,7 +72,6 @@ export class ProcessedTextInputModel extends Observable {
6072
*/
6173
update(raw, parseValue = false) {
6274
this._raw = raw;
63-
6475
if (parseValue && this._parse) {
6576
try {
6677
const value = this._parse(raw);
@@ -74,7 +85,6 @@ export class ProcessedTextInputModel extends Observable {
7485
// For now, simply ignore the new value if invalid
7586
}
7687
}
77-
7888
this._visualChange$.notify();
7989
}
8090

lib/public/components/Filters/common/filters/timeRangeFilter.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,7 @@
1010
* granted to it by virtue of its status as an Intergovernmental Organization
1111
* or submit itself to any jurisdiction.
1212
*/
13-
import { dropdown } from '../../../common/popover/dropdown.js';
14-
import { h } from '/js/src/index.js';
13+
import { DropdownComponent, h } from '/js/src/index.js';
1514
import {
1615
getLocaleDateAndTime,
1716
getStartOfMonth,
@@ -93,7 +92,7 @@ const monthsOptions = ({ onChange }) => {
9392
* @param {TimeRangeInputModel} timeRangeFilterModel the model of the filter
9493
* @return {Component} the resulting component
9594
*/
96-
export const timeRangeFilter = (timeRangeFilterModel) => dropdown(
95+
export const timeRangeFilter = (timeRangeFilterModel) => DropdownComponent(
9796
h(
9897
`.dropdown-trigger.form-control${timeRangeFilterModel.isValid ? '' : '.invalid'}`,
9998
[

lib/public/components/Filters/common/filtersPanelPopover.js

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,7 @@
1010
* granted to it by virtue of its status as an Intergovernmental Organization
1111
* or submit itself to any jurisdiction.
1212
*/
13-
import { popover } from '../../common/popover/popover.js';
14-
import { PopoverTriggerPreConfiguration } from '../../common/popover/popoverPreConfigurations.js';
15-
import { PopoverAnchors } from '../../common/popover/PopoverEngine.js';
16-
import { h, info } from '/js/src/index.js';
13+
import { h, info, popover, PopoverAnchors, PopoverTriggerPreConfiguration } from '/js/src/index.js';
1714
import { profiles } from '../../common/table/profiles.js';
1815
import { applyProfile } from '../../../utilities/applyProfile.js';
1916
import { tooltip } from '../../common/popover/tooltip.js';

lib/public/components/Log/logLinkButton.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,7 @@
1111
* or submit itself to any jurisdiction.
1212
*/
1313

14-
import { h } from '/js/src/index.js';
15-
import { CopyToClipboardComponent } from '../common/selection/infoLoggerButtonGroup/CopyToClipboardComponent.js';
14+
import { CopyToClipboardComponent, h } from '/js/src/index.js';
1615

1716
/**
1817
* Copies the url of the log to the clipboard

lib/public/components/Pagination/amountSelector.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,8 @@
1111
* or submit itself to any jurisdiction.
1212
*/
1313

14-
import { h } from '/js/src/index.js';
14+
import { documentClickTaggedEventRegistry, h } from '/js/src/index.js';
1515
import { iconCaretTop } from '/js/src/icons.js';
16-
import { documentClickTaggedEventRegistry } from '../../utilities/documentClickTaggedEventRegistry.js';
1716

1817
/**
1918
* Based on controllers limits

lib/public/components/common/StatefulComponent.js

Lines changed: 0 additions & 47 deletions
This file was deleted.

0 commit comments

Comments
 (0)