mirror of
https://github.com/Unleash/unleash.git
synced 2025-02-23 00:22:19 +01:00
Merge branch 'main' into feat/make-DATE_AFTER-the-default-time-operator
This commit is contained in:
commit
d9d1dbbebd
@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"name": "unleash-frontend",
|
"name": "unleash-frontend",
|
||||||
"description": "unleash your features",
|
"description": "unleash your features",
|
||||||
"version": "4.9.0-beta.2",
|
"version": "4.9.0-beta.3",
|
||||||
"keywords": [
|
"keywords": [
|
||||||
"unleash",
|
"unleash",
|
||||||
"feature toggle",
|
"feature toggle",
|
||||||
|
@ -5,6 +5,10 @@ import { CANCEL } from '../ConstraintAccordionEdit';
|
|||||||
import { ConstraintFormHeader } from './ConstraintFormHeader/ConstraintFormHeader';
|
import { ConstraintFormHeader } from './ConstraintFormHeader/ConstraintFormHeader';
|
||||||
import { useStyles } from './ConstraintAccordionEditBody.styles';
|
import { useStyles } from './ConstraintAccordionEditBody.styles';
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
|
import { Alert } from '@material-ui/lab';
|
||||||
|
import { newOperators } from 'constants/operators';
|
||||||
|
import ConditionallyRender from 'component/common/ConditionallyRender/ConditionallyRender';
|
||||||
|
import { oneOf } from 'utils/one-of';
|
||||||
|
|
||||||
interface IConstraintAccordionBody {
|
interface IConstraintAccordionBody {
|
||||||
localConstraint: IConstraint;
|
localConstraint: IConstraint;
|
||||||
@ -31,6 +35,16 @@ export const ConstraintAccordionEditBody: React.FC<
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
|
<ConditionallyRender
|
||||||
|
condition={oneOf(newOperators, localConstraint.operator)}
|
||||||
|
show={
|
||||||
|
<Alert severity="warning">
|
||||||
|
In order to use this constraint operator, you need to
|
||||||
|
update your SDK to the latest version.
|
||||||
|
</Alert>
|
||||||
|
}
|
||||||
|
/>
|
||||||
|
|
||||||
<div className={styles.inputContainer}>
|
<div className={styles.inputContainer}>
|
||||||
<InvertedOperator
|
<InvertedOperator
|
||||||
inverted={Boolean(localConstraint.inverted)}
|
inverted={Boolean(localConstraint.inverted)}
|
||||||
|
@ -75,3 +75,9 @@ export const multipleValueOperators: Operator[] = [
|
|||||||
...stringOperators,
|
...stringOperators,
|
||||||
...inOperators,
|
...inOperators,
|
||||||
];
|
];
|
||||||
|
|
||||||
|
export const newOperators: Operator[] = [
|
||||||
|
...stringOperators,
|
||||||
|
...dateOperators,
|
||||||
|
...singleValueOperators,
|
||||||
|
];
|
||||||
|
@ -109,9 +109,10 @@ const filterFeatureByRegExp = (
|
|||||||
}
|
}
|
||||||
|
|
||||||
return feature.strategies.some(
|
return feature.strategies.some(
|
||||||
s =>
|
strategy =>
|
||||||
regExp.test(s.name) ||
|
regExp.test(strategy.name) ||
|
||||||
// @ts-expect-error
|
strategy.constraints.some(constraint =>
|
||||||
s.constraints.some(c => c.values.some(v => regExp.test(v)))
|
constraint.values?.some(value => regExp.test(value))
|
||||||
|
)
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user