@truedat/dd 4.56.6 → 4.56.8
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 +7 -0
- package/package.json +22 -21
- package/src/api/queries.js +1 -1
- package/src/components/GrantApprovalRule.js +60 -55
- package/src/components/GrantApprovalRuleConditions.js +14 -6
- package/src/components/GrantApprovalRuleForm.js +5 -5
- package/src/components/__tests__/GrantApprovalRule.spec.js +2 -2
- package/src/components/__tests__/GrantApprovalRuleConditions.spec.js +7 -5
- package/src/components/__tests__/GrantApprovalRuleEdit.spec.js +1 -1
- package/src/components/__tests__/GrantApprovalRuleForm.spec.js +7 -6
- package/src/components/__tests__/__snapshots__/GrantApprovalRule.spec.js.snap +1 -1
- package/src/components/__tests__/__snapshots__/GrantApprovalRuleConditions.spec.js.snap +186 -18
- package/src/components/__tests__/__snapshots__/GrantApprovalRuleEdit.spec.js.snap +53 -5
- package/src/components/__tests__/__snapshots__/GrantApprovalRuleForm.spec.js.snap +145 -17
- package/src/components/__tests__/__snapshots__/GrantApprovalRuleNew.spec.js.snap +41 -5
- package/src/messages/en.js +2 -1
- package/src/messages/es.js +2 -1
package/CHANGELOG.md
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@truedat/dd",
|
|
3
|
-
"version": "4.56.
|
|
3
|
+
"version": "4.56.8",
|
|
4
4
|
"description": "Truedat Web Data Dictionary",
|
|
5
5
|
"sideEffects": false,
|
|
6
6
|
"jsnext:main": "src/index.js",
|
|
@@ -22,26 +22,25 @@
|
|
|
22
22
|
"eslint:fix": "eslint --fix src/**"
|
|
23
23
|
},
|
|
24
24
|
"devDependencies": {
|
|
25
|
-
"@babel/cli": "^7.
|
|
26
|
-
"@babel/core": "^7.
|
|
27
|
-
"@babel/plugin-proposal-class-properties": "^7.
|
|
28
|
-
"@babel/plugin-proposal-object-rest-spread": "^7.
|
|
29
|
-
"@babel/plugin-proposal-optional-chaining": "^7.
|
|
25
|
+
"@babel/cli": "^7.19.3",
|
|
26
|
+
"@babel/core": "^7.20.5",
|
|
27
|
+
"@babel/plugin-proposal-class-properties": "^7.18.6",
|
|
28
|
+
"@babel/plugin-proposal-object-rest-spread": "^7.20.2",
|
|
29
|
+
"@babel/plugin-proposal-optional-chaining": "^7.18.9",
|
|
30
30
|
"@babel/plugin-syntax-dynamic-import": "^7.8.3",
|
|
31
|
-
"@babel/plugin-transform-modules-commonjs": "^7.
|
|
32
|
-
"@babel/preset-env": "^7.
|
|
33
|
-
"@babel/preset-react": "^7.
|
|
34
|
-
"@testing-library/jest-dom": "^5.16.
|
|
31
|
+
"@babel/plugin-transform-modules-commonjs": "^7.19.6",
|
|
32
|
+
"@babel/preset-env": "^7.20.2",
|
|
33
|
+
"@babel/preset-react": "^7.18.6",
|
|
34
|
+
"@testing-library/jest-dom": "^5.16.5",
|
|
35
35
|
"@testing-library/react": "^12.0.0",
|
|
36
36
|
"@testing-library/user-event": "^13.2.1",
|
|
37
|
-
"@truedat/test": "4.56.
|
|
37
|
+
"@truedat/test": "4.56.8",
|
|
38
38
|
"babel-jest": "^28.1.0",
|
|
39
39
|
"babel-plugin-dynamic-import-node": "^2.3.3",
|
|
40
40
|
"babel-plugin-lodash": "^3.3.4",
|
|
41
41
|
"babel-plugin-react-intl": "^5.1.18",
|
|
42
42
|
"babel-plugin-transform-semantic-ui-react-imports": "^1.4.1",
|
|
43
43
|
"enzyme": "^3.11.0",
|
|
44
|
-
"enzyme-adapter-react-16": "^1.15.6",
|
|
45
44
|
"enzyme-to-json": "^3.6.2",
|
|
46
45
|
"identity-obj-proxy": "^3.0.0",
|
|
47
46
|
"jest": "^28.1.0",
|
|
@@ -50,7 +49,7 @@
|
|
|
50
49
|
"react-dom": "^16.14.0",
|
|
51
50
|
"redux-saga-test-plan": "^4.0.4",
|
|
52
51
|
"rimraf": "^3.0.2",
|
|
53
|
-
"semantic-ui-react": "^2.
|
|
52
|
+
"semantic-ui-react": "^2.1.4"
|
|
54
53
|
},
|
|
55
54
|
"jest": {
|
|
56
55
|
"maxWorkers": "50%",
|
|
@@ -87,11 +86,12 @@
|
|
|
87
86
|
]
|
|
88
87
|
},
|
|
89
88
|
"dependencies": {
|
|
90
|
-
"@apollo/client": "^3.7.
|
|
91
|
-
"@truedat/auth": "4.56.
|
|
92
|
-
"@truedat/core": "4.56.
|
|
93
|
-
"@truedat/df": "4.56.
|
|
89
|
+
"@apollo/client": "^3.7.1",
|
|
90
|
+
"@truedat/auth": "4.56.8",
|
|
91
|
+
"@truedat/core": "4.56.8",
|
|
92
|
+
"@truedat/df": "4.56.8",
|
|
94
93
|
"lodash": "^4.17.21",
|
|
94
|
+
"moment": "^2.29.4",
|
|
95
95
|
"path-to-regexp": "^1.7.0",
|
|
96
96
|
"prop-types": "^15.8.1",
|
|
97
97
|
"react-hook-form": "^7.30.0",
|
|
@@ -100,9 +100,10 @@
|
|
|
100
100
|
"react-redux": "^7.2.4",
|
|
101
101
|
"react-router-dom": "^5.2.0",
|
|
102
102
|
"redux": "^4.1.1",
|
|
103
|
-
"redux-saga": "^1.1
|
|
103
|
+
"redux-saga": "^1.2.1",
|
|
104
104
|
"redux-saga-routines": "^3.2.3",
|
|
105
|
-
"reselect": "^4.
|
|
105
|
+
"reselect": "^4.1.7",
|
|
106
|
+
"semantic-ui-react": "^2.1.4",
|
|
106
107
|
"svg-pan-zoom": "^3.6.1",
|
|
107
108
|
"uuid": "^8.3.2"
|
|
108
109
|
},
|
|
@@ -110,7 +111,7 @@
|
|
|
110
111
|
"@truedat/profile": ">= 4.45.0",
|
|
111
112
|
"react": ">= 16.8.6 < 17",
|
|
112
113
|
"react-dom": ">= 16.8.6 < 17",
|
|
113
|
-
"semantic-ui-react": ">= 0.
|
|
114
|
+
"semantic-ui-react": ">= 2.0.3 < 2.2"
|
|
114
115
|
},
|
|
115
|
-
"gitHead": "
|
|
116
|
+
"gitHead": "9bf266eb26e4af0b774560d5a88b0f22325495e0"
|
|
116
117
|
}
|
package/src/api/queries.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import _ from "lodash/fp";
|
|
2
2
|
import React from "react";
|
|
3
|
-
import {
|
|
3
|
+
import { FormattedMessage } from "react-intl";
|
|
4
4
|
import { useParams } from "react-router-dom";
|
|
5
5
|
import { useQuery } from "@apollo/client";
|
|
6
6
|
import {
|
|
@@ -19,28 +19,13 @@ import { GRANT_APPROVAL_RULE_QUERY } from "../api/queries";
|
|
|
19
19
|
import GrantApprovalRuleDeleteButton from "./GrantApprovalRuleDeleteButton";
|
|
20
20
|
|
|
21
21
|
export const GrantApprovalRule = () => {
|
|
22
|
-
const { formatMessage } = useIntl();
|
|
23
22
|
const { id } = useParams();
|
|
24
23
|
|
|
25
|
-
const {
|
|
24
|
+
const { data } = useQuery(GRANT_APPROVAL_RULE_QUERY, {
|
|
26
25
|
variables: { id },
|
|
27
26
|
fetchPolicy: "cache-and-network",
|
|
28
27
|
});
|
|
29
|
-
const approvalRule =
|
|
30
|
-
|
|
31
|
-
const fields = [
|
|
32
|
-
{ name: "name" },
|
|
33
|
-
{ name: "domain", path: "domains[0].name" },
|
|
34
|
-
{ name: "role" },
|
|
35
|
-
{
|
|
36
|
-
name: "action",
|
|
37
|
-
render: (action) =>
|
|
38
|
-
formatMessage({
|
|
39
|
-
id: `grantApprovalRule.action.${action}`,
|
|
40
|
-
}),
|
|
41
|
-
},
|
|
42
|
-
{ name: "comment" },
|
|
43
|
-
];
|
|
28
|
+
const approvalRule = data?.grantApprovalRule;
|
|
44
29
|
|
|
45
30
|
return approvalRule ? (
|
|
46
31
|
<>
|
|
@@ -48,13 +33,13 @@ export const GrantApprovalRule = () => {
|
|
|
48
33
|
header="grantApprovalRules.header"
|
|
49
34
|
title={approvalRule?.name}
|
|
50
35
|
/>
|
|
51
|
-
<Segment
|
|
36
|
+
<Segment>
|
|
52
37
|
<Grid>
|
|
53
38
|
<Grid.Column width={8}>
|
|
54
39
|
<Header as="h2">
|
|
55
40
|
<Icon circular name="key" />
|
|
56
41
|
<Header.Content>
|
|
57
|
-
|
|
42
|
+
<FormattedMessage id="grantApprovalRule.subheader" />
|
|
58
43
|
</Header.Content>
|
|
59
44
|
</Header>
|
|
60
45
|
</Grid.Column>
|
|
@@ -63,51 +48,69 @@ export const GrantApprovalRule = () => {
|
|
|
63
48
|
primary
|
|
64
49
|
as={Link}
|
|
65
50
|
to={linkTo.GRANT_APPROVAL_RULE_EDIT({ id: approvalRule?.id })}
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
/>
|
|
51
|
+
>
|
|
52
|
+
<FormattedMessage id="grantApprovalRules.edit" />
|
|
53
|
+
</Button>
|
|
70
54
|
<GrantApprovalRuleDeleteButton approvalRule={approvalRule} />
|
|
71
55
|
</Grid.Column>
|
|
72
56
|
</Grid>
|
|
73
57
|
<List size="big" relaxed>
|
|
74
|
-
{fields.map(({ name, path, render = _.identity }, key) => (
|
|
75
|
-
<List.Item key={key}>
|
|
76
|
-
<List.Header>
|
|
77
|
-
{formatMessage({ id: `grantApprovalRule.${name}` })}
|
|
78
|
-
</List.Header>
|
|
79
|
-
<List.Content>
|
|
80
|
-
{render(_.prop(path || name)(approvalRule))}
|
|
81
|
-
</List.Content>
|
|
82
|
-
</List.Item>
|
|
83
|
-
))}
|
|
84
58
|
<List.Item>
|
|
85
59
|
<List.Header>
|
|
86
|
-
|
|
60
|
+
<FormattedMessage id="grantApprovalRule.name" />
|
|
61
|
+
</List.Header>
|
|
62
|
+
<List.Content>{approvalRule?.name}</List.Content>
|
|
63
|
+
</List.Item>
|
|
64
|
+
<List.Item>
|
|
65
|
+
<List.Header>
|
|
66
|
+
<FormattedMessage id="grantApprovalRule.domain" />
|
|
67
|
+
</List.Header>
|
|
68
|
+
<List.Content>
|
|
69
|
+
{_.flow(_.map("name"), _.join(", "))(approvalRule?.domains)}
|
|
70
|
+
</List.Content>
|
|
71
|
+
</List.Item>
|
|
72
|
+
<List.Item>
|
|
73
|
+
<List.Header>
|
|
74
|
+
<FormattedMessage id="grantApprovalRule.role" />
|
|
75
|
+
</List.Header>
|
|
76
|
+
<List.Content>{approvalRule?.role}</List.Content>
|
|
77
|
+
</List.Item>
|
|
78
|
+
<List.Item>
|
|
79
|
+
<List.Header>
|
|
80
|
+
<FormattedMessage id="grantApprovalRule.action" />
|
|
81
|
+
</List.Header>
|
|
82
|
+
<List.Content>
|
|
83
|
+
<FormattedMessage
|
|
84
|
+
id={`grantApprovalRule.action.${approvalRule.action}`}
|
|
85
|
+
defaultMessage={approvalRule?.action}
|
|
86
|
+
/>
|
|
87
|
+
</List.Content>
|
|
88
|
+
</List.Item>
|
|
89
|
+
<List.Item>
|
|
90
|
+
<List.Header>
|
|
91
|
+
<FormattedMessage id="grantApprovalRule.comment" />
|
|
92
|
+
</List.Header>
|
|
93
|
+
<List.Content>{approvalRule?.comment}</List.Content>
|
|
94
|
+
</List.Item>
|
|
95
|
+
<List.Item>
|
|
96
|
+
<List.Header>
|
|
97
|
+
<FormattedMessage id="grantApprovalRule.conditions" />
|
|
87
98
|
</List.Header>
|
|
88
99
|
|
|
89
100
|
<Table compact collapsing celled>
|
|
90
101
|
<Table.Header>
|
|
91
102
|
<Table.Row textAlign="center">
|
|
92
103
|
<Table.HeaderCell>
|
|
93
|
-
|
|
94
|
-
id: "grantApprovalRule.conditions.field_prefix",
|
|
95
|
-
})}
|
|
104
|
+
<FormattedMessage id="grantApprovalRule.conditions.field_prefix" />
|
|
96
105
|
</Table.HeaderCell>
|
|
97
106
|
<Table.HeaderCell>
|
|
98
|
-
|
|
99
|
-
id: "grantApprovalRule.conditions.field_name",
|
|
100
|
-
})}
|
|
107
|
+
<FormattedMessage id="grantApprovalRule.conditions.field_name" />
|
|
101
108
|
</Table.HeaderCell>
|
|
102
109
|
<Table.HeaderCell>
|
|
103
|
-
|
|
104
|
-
id: "grantApprovalRule.conditions.operator",
|
|
105
|
-
})}
|
|
110
|
+
<FormattedMessage id="grantApprovalRule.conditions.operator" />
|
|
106
111
|
</Table.HeaderCell>
|
|
107
112
|
<Table.HeaderCell>
|
|
108
|
-
|
|
109
|
-
id: "grantApprovalRule.conditions.value",
|
|
110
|
-
})}
|
|
113
|
+
<FormattedMessage id="grantApprovalRule.conditions.values" />
|
|
111
114
|
</Table.HeaderCell>
|
|
112
115
|
</Table.Row>
|
|
113
116
|
</Table.Header>
|
|
@@ -116,24 +119,26 @@ export const GrantApprovalRule = () => {
|
|
|
116
119
|
{_.getOr(
|
|
117
120
|
[],
|
|
118
121
|
"conditions"
|
|
119
|
-
)(approvalRule).map(({ field, operator,
|
|
122
|
+
)(approvalRule).map(({ field, operator, values }, key) => {
|
|
120
123
|
const fields = field.match(/(\w+)\.(.*)/);
|
|
121
124
|
const fieldPrefix = fields ? fields[1] : null;
|
|
122
125
|
const fieldName = fields ? fields[2] : field;
|
|
123
126
|
return (
|
|
124
127
|
<Table.Row key={key} textAlign="center">
|
|
125
128
|
<Table.Cell>
|
|
126
|
-
|
|
127
|
-
id
|
|
128
|
-
|
|
129
|
+
<FormattedMessage
|
|
130
|
+
id={`grantApprovalRule.conditions.field_prefix.${fieldPrefix}`}
|
|
131
|
+
defaultMessage={fieldPrefix}
|
|
132
|
+
/>
|
|
129
133
|
</Table.Cell>
|
|
130
134
|
<Table.Cell>{fieldName}</Table.Cell>
|
|
131
135
|
<Table.Cell>
|
|
132
|
-
|
|
133
|
-
id
|
|
134
|
-
|
|
136
|
+
<FormattedMessage
|
|
137
|
+
id={`grantApprovalRule.conditions.operator.${operator}`}
|
|
138
|
+
defaultMessage={operator}
|
|
139
|
+
/>
|
|
135
140
|
</Table.Cell>
|
|
136
|
-
<Table.Cell>{
|
|
141
|
+
<Table.Cell>{_.join(", ")(values)}</Table.Cell>
|
|
137
142
|
</Table.Row>
|
|
138
143
|
);
|
|
139
144
|
})}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import _ from "lodash/fp";
|
|
2
|
-
import React from "react";
|
|
2
|
+
import React, { useState } from "react";
|
|
3
3
|
import PropTypes from "prop-types";
|
|
4
4
|
import { Button, Form, Icon, Grid } from "semantic-ui-react";
|
|
5
5
|
import { useIntl } from "react-intl";
|
|
@@ -67,11 +67,12 @@ export default function GrantApprovalRuleConditions({
|
|
|
67
67
|
id: "grantApprovalRule.conditions.operator",
|
|
68
68
|
})}
|
|
69
69
|
selection
|
|
70
|
-
options={["eq", "neq"].map((o) => ({
|
|
70
|
+
options={["eq", "neq", "subset"].map((o) => ({
|
|
71
71
|
key: o,
|
|
72
72
|
value: o,
|
|
73
73
|
text: formatMessage({
|
|
74
74
|
id: `grantApprovalRule.conditions.operator.${o}`,
|
|
75
|
+
defaultMessage: o,
|
|
75
76
|
}),
|
|
76
77
|
}))}
|
|
77
78
|
onChange={(_e, { value, name }) =>
|
|
@@ -82,15 +83,22 @@ export default function GrantApprovalRuleConditions({
|
|
|
82
83
|
})}
|
|
83
84
|
value={condition.operator}
|
|
84
85
|
/>
|
|
85
|
-
<Form.
|
|
86
|
+
<Form.Dropdown
|
|
86
87
|
id={`value-${key}`}
|
|
87
88
|
width={4}
|
|
88
89
|
disabled={disabled}
|
|
89
|
-
name="
|
|
90
|
+
name="values"
|
|
90
91
|
label={formatMessage({
|
|
91
|
-
id: "grantApprovalRule.conditions.
|
|
92
|
+
id: "grantApprovalRule.conditions.values",
|
|
92
93
|
})}
|
|
93
|
-
|
|
94
|
+
search
|
|
95
|
+
selection
|
|
96
|
+
multiple
|
|
97
|
+
allowAdditions
|
|
98
|
+
value={condition.values || []}
|
|
99
|
+
options={_.map((value) => ({ text: value, value }))(
|
|
100
|
+
condition.values || []
|
|
101
|
+
)}
|
|
94
102
|
onChange={(_e, { value, name }) =>
|
|
95
103
|
handleChange(key, name, value)
|
|
96
104
|
}
|
|
@@ -26,11 +26,11 @@ export default function GrantApprovalRuleForm({ onSubmit, approvalRule }) {
|
|
|
26
26
|
..._.pick(["id", "name", "action", "role", "comment"])(approvalRule),
|
|
27
27
|
conditions: _.flow(
|
|
28
28
|
_.get("conditions"),
|
|
29
|
-
_.map(({ field, operator,
|
|
29
|
+
_.map(({ field, operator, values }) => {
|
|
30
30
|
const fields = field.match(/(\w+)\.(.*)/);
|
|
31
31
|
const fieldPrefix = fields ? fields[1] : null;
|
|
32
32
|
const fieldName = fields ? fields[2] : field;
|
|
33
|
-
return { fieldPrefix, fieldName, operator,
|
|
33
|
+
return { fieldPrefix, fieldName, operator, values };
|
|
34
34
|
})
|
|
35
35
|
)(approvalRule),
|
|
36
36
|
domainId: _.path("domainIds[0]")(approvalRule),
|
|
@@ -63,10 +63,10 @@ export default function GrantApprovalRuleForm({ onSubmit, approvalRule }) {
|
|
|
63
63
|
const { domainId } = data;
|
|
64
64
|
const conditions = _.flow(
|
|
65
65
|
_.get("conditions"),
|
|
66
|
-
_.map(({ fieldPrefix, fieldName, operator,
|
|
66
|
+
_.map(({ fieldPrefix, fieldName, operator, values }) => ({
|
|
67
67
|
field: [fieldPrefix, fieldName].join("."),
|
|
68
68
|
operator,
|
|
69
|
-
|
|
69
|
+
values,
|
|
70
70
|
}))
|
|
71
71
|
)(data);
|
|
72
72
|
const approvalRule = _.flow(
|
|
@@ -88,7 +88,7 @@ export default function GrantApprovalRuleForm({ onSubmit, approvalRule }) {
|
|
|
88
88
|
(field) =>
|
|
89
89
|
!_.isNil(_.get(field)(condition)) &&
|
|
90
90
|
!_.isEmpty(_.get(field)(condition))
|
|
91
|
-
)(["fieldPrefix", "fieldName", "operator", "
|
|
91
|
+
)(["fieldPrefix", "fieldName", "operator", "values"])
|
|
92
92
|
)(value);
|
|
93
93
|
|
|
94
94
|
return (
|
|
@@ -30,13 +30,13 @@ const grantApprovalRule = {
|
|
|
30
30
|
__typename: "Condition",
|
|
31
31
|
field: "request.foo",
|
|
32
32
|
operator: "neq",
|
|
33
|
-
|
|
33
|
+
values: ["bar"],
|
|
34
34
|
},
|
|
35
35
|
{
|
|
36
36
|
__typename: "Condition",
|
|
37
37
|
field: "invalid_field",
|
|
38
38
|
operator: "eq",
|
|
39
|
-
|
|
39
|
+
values: ["baz"],
|
|
40
40
|
},
|
|
41
41
|
],
|
|
42
42
|
comment: "comment invalid",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import { render } from "@truedat/test/render";
|
|
3
|
-
import { waitFor } from "@testing-library/react";
|
|
3
|
+
import { waitFor, within } from "@testing-library/react";
|
|
4
4
|
import userEvent from "@testing-library/user-event";
|
|
5
5
|
import GrantApprovalRuleConditions from "../GrantApprovalRuleConditions";
|
|
6
6
|
import en from "../../messages/en";
|
|
@@ -18,13 +18,13 @@ describe("<GrantApprovalRuleConditions />", () => {
|
|
|
18
18
|
fieldPrefix: "request",
|
|
19
19
|
fieldName: "foo",
|
|
20
20
|
operator: "eq",
|
|
21
|
-
|
|
21
|
+
values: ["bar"],
|
|
22
22
|
},
|
|
23
23
|
{
|
|
24
24
|
fieldPrefix: null,
|
|
25
25
|
fieldname: "invalid_field",
|
|
26
26
|
operator: "eq",
|
|
27
|
-
|
|
27
|
+
values: ["bar"],
|
|
28
28
|
},
|
|
29
29
|
],
|
|
30
30
|
};
|
|
@@ -85,16 +85,18 @@ describe("<GrantApprovalRuleConditions />", () => {
|
|
|
85
85
|
userEvent.click(await findByText(/request metadata/i));
|
|
86
86
|
userEvent.type(getByRole("textbox", { name: /field/i }), "F");
|
|
87
87
|
userEvent.click(await findByText(/is equal/i));
|
|
88
|
-
userEvent.type(getByRole("
|
|
88
|
+
userEvent.type(getByRole("combobox"), "V");
|
|
89
|
+
userEvent.click(within(getByRole("combobox")).getByText("Add"));
|
|
89
90
|
|
|
90
91
|
await waitFor(() => {
|
|
92
|
+
console.log(onChange.mock.calls.length);
|
|
91
93
|
expect(onChange.mock.calls.length).toBe(4);
|
|
92
94
|
});
|
|
93
95
|
expect(onChange.mock.calls).toMatchObject([
|
|
94
96
|
[[{ fieldPrefix: "request" }]],
|
|
95
97
|
[[{ fieldName: "F" }]],
|
|
96
98
|
[[{ operator: "eq" }]],
|
|
97
|
-
[[{
|
|
99
|
+
[[{ values: ["V"] }]],
|
|
98
100
|
]);
|
|
99
101
|
});
|
|
100
102
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import { render } from "@truedat/test/render";
|
|
3
|
-
import { waitFor } from "@testing-library/react";
|
|
3
|
+
import { waitFor, within } from "@testing-library/react";
|
|
4
4
|
import userEvent from "@testing-library/user-event";
|
|
5
5
|
import { domainsMock, rolesMock } from "@truedat/test/mocks";
|
|
6
6
|
import GrantApprovalRuleForm from "../GrantApprovalRuleForm";
|
|
@@ -41,13 +41,13 @@ const approvalRule = {
|
|
|
41
41
|
__typename: "Condition",
|
|
42
42
|
field: "request.foo",
|
|
43
43
|
operator: "neq",
|
|
44
|
-
|
|
44
|
+
values: ["bar"],
|
|
45
45
|
},
|
|
46
46
|
{
|
|
47
47
|
__typename: "Condition",
|
|
48
48
|
field: "invalid_condition",
|
|
49
49
|
operator: "neq",
|
|
50
|
-
|
|
50
|
+
values: ["bar"],
|
|
51
51
|
},
|
|
52
52
|
],
|
|
53
53
|
comment: "comment",
|
|
@@ -80,7 +80,7 @@ describe("<GrantApprovalRuleForm />", () => {
|
|
|
80
80
|
it("call onSubmit with data", async () => {
|
|
81
81
|
const onSubmit = jest.fn();
|
|
82
82
|
const props = { onSubmit };
|
|
83
|
-
const { getByRole, findByText
|
|
83
|
+
const { getByRole, findByText } = render(
|
|
84
84
|
<GrantApprovalRuleForm {...props} />,
|
|
85
85
|
renderOpts
|
|
86
86
|
);
|
|
@@ -104,7 +104,8 @@ describe("<GrantApprovalRuleForm />", () => {
|
|
|
104
104
|
userEvent.click(await findByText(/request metadata/i));
|
|
105
105
|
userEvent.type(getByRole("textbox", { name: /field/i }), "field");
|
|
106
106
|
userEvent.click(await findByText(/is equal/i));
|
|
107
|
-
userEvent.type(getByRole("
|
|
107
|
+
userEvent.type(getByRole("combobox"), "value");
|
|
108
|
+
userEvent.click(within(getByRole("combobox")).getByText("Add"));
|
|
108
109
|
|
|
109
110
|
await waitFor(() =>
|
|
110
111
|
expect(getByRole("button", { name: /save/i })).not.toBeDisabled()
|
|
@@ -123,7 +124,7 @@ describe("<GrantApprovalRuleForm />", () => {
|
|
|
123
124
|
{
|
|
124
125
|
field: "request.field",
|
|
125
126
|
operator: "eq",
|
|
126
|
-
|
|
127
|
+
values: ["value"],
|
|
127
128
|
},
|
|
128
129
|
],
|
|
129
130
|
domainIds: ["1"],
|
|
@@ -157,6 +157,19 @@ exports[`<GrantApprovalRuleConditions /> matches the last snapshot disable 1`] =
|
|
|
157
157
|
Is not equal
|
|
158
158
|
</span>
|
|
159
159
|
</div>
|
|
160
|
+
<div
|
|
161
|
+
aria-checked="false"
|
|
162
|
+
aria-selected="false"
|
|
163
|
+
class="item"
|
|
164
|
+
role="option"
|
|
165
|
+
style="pointer-events: all;"
|
|
166
|
+
>
|
|
167
|
+
<span
|
|
168
|
+
class="text"
|
|
169
|
+
>
|
|
170
|
+
Subset of
|
|
171
|
+
</span>
|
|
172
|
+
</div>
|
|
160
173
|
</div>
|
|
161
174
|
</div>
|
|
162
175
|
</div>
|
|
@@ -166,17 +179,41 @@ exports[`<GrantApprovalRuleConditions /> matches the last snapshot disable 1`] =
|
|
|
166
179
|
<label
|
|
167
180
|
for="value-0"
|
|
168
181
|
>
|
|
169
|
-
|
|
182
|
+
Values
|
|
170
183
|
</label>
|
|
171
184
|
<div
|
|
172
|
-
|
|
185
|
+
aria-expanded="false"
|
|
186
|
+
class="ui multiple search selection dropdown"
|
|
187
|
+
id="value-0"
|
|
188
|
+
name="values"
|
|
189
|
+
role="combobox"
|
|
173
190
|
>
|
|
174
191
|
<input
|
|
175
|
-
|
|
176
|
-
|
|
192
|
+
aria-autocomplete="list"
|
|
193
|
+
autocomplete="off"
|
|
194
|
+
class="search"
|
|
195
|
+
tabindex="0"
|
|
177
196
|
type="text"
|
|
178
197
|
value=""
|
|
179
198
|
/>
|
|
199
|
+
<span
|
|
200
|
+
class="sizer"
|
|
201
|
+
/>
|
|
202
|
+
<i
|
|
203
|
+
aria-hidden="true"
|
|
204
|
+
class="dropdown icon"
|
|
205
|
+
/>
|
|
206
|
+
<div
|
|
207
|
+
aria-multiselectable="true"
|
|
208
|
+
class="menu transition"
|
|
209
|
+
role="listbox"
|
|
210
|
+
>
|
|
211
|
+
<div
|
|
212
|
+
class="message"
|
|
213
|
+
>
|
|
214
|
+
No results found.
|
|
215
|
+
</div>
|
|
216
|
+
</div>
|
|
180
217
|
</div>
|
|
181
218
|
</div>
|
|
182
219
|
</div>
|
|
@@ -359,6 +396,19 @@ exports[`<GrantApprovalRuleConditions /> matches the last snapshot with empty va
|
|
|
359
396
|
Is not equal
|
|
360
397
|
</span>
|
|
361
398
|
</div>
|
|
399
|
+
<div
|
|
400
|
+
aria-checked="false"
|
|
401
|
+
aria-selected="false"
|
|
402
|
+
class="item"
|
|
403
|
+
role="option"
|
|
404
|
+
style="pointer-events: all;"
|
|
405
|
+
>
|
|
406
|
+
<span
|
|
407
|
+
class="text"
|
|
408
|
+
>
|
|
409
|
+
Subset of
|
|
410
|
+
</span>
|
|
411
|
+
</div>
|
|
362
412
|
</div>
|
|
363
413
|
</div>
|
|
364
414
|
</div>
|
|
@@ -368,17 +418,41 @@ exports[`<GrantApprovalRuleConditions /> matches the last snapshot with empty va
|
|
|
368
418
|
<label
|
|
369
419
|
for="value-0"
|
|
370
420
|
>
|
|
371
|
-
|
|
421
|
+
Values
|
|
372
422
|
</label>
|
|
373
423
|
<div
|
|
374
|
-
|
|
424
|
+
aria-expanded="false"
|
|
425
|
+
class="ui multiple search selection dropdown"
|
|
426
|
+
id="value-0"
|
|
427
|
+
name="values"
|
|
428
|
+
role="combobox"
|
|
375
429
|
>
|
|
376
430
|
<input
|
|
377
|
-
|
|
378
|
-
|
|
431
|
+
aria-autocomplete="list"
|
|
432
|
+
autocomplete="off"
|
|
433
|
+
class="search"
|
|
434
|
+
tabindex="0"
|
|
379
435
|
type="text"
|
|
380
436
|
value=""
|
|
381
437
|
/>
|
|
438
|
+
<span
|
|
439
|
+
class="sizer"
|
|
440
|
+
/>
|
|
441
|
+
<i
|
|
442
|
+
aria-hidden="true"
|
|
443
|
+
class="dropdown icon"
|
|
444
|
+
/>
|
|
445
|
+
<div
|
|
446
|
+
aria-multiselectable="true"
|
|
447
|
+
class="menu transition"
|
|
448
|
+
role="listbox"
|
|
449
|
+
>
|
|
450
|
+
<div
|
|
451
|
+
class="message"
|
|
452
|
+
>
|
|
453
|
+
No results found.
|
|
454
|
+
</div>
|
|
455
|
+
</div>
|
|
382
456
|
</div>
|
|
383
457
|
</div>
|
|
384
458
|
</div>
|
|
@@ -583,6 +657,19 @@ exports[`<GrantApprovalRuleConditions /> matches the last snapshot with values 1
|
|
|
583
657
|
Is not equal
|
|
584
658
|
</span>
|
|
585
659
|
</div>
|
|
660
|
+
<div
|
|
661
|
+
aria-checked="false"
|
|
662
|
+
aria-selected="false"
|
|
663
|
+
class="item"
|
|
664
|
+
role="option"
|
|
665
|
+
style="pointer-events: all;"
|
|
666
|
+
>
|
|
667
|
+
<span
|
|
668
|
+
class="text"
|
|
669
|
+
>
|
|
670
|
+
Subset of
|
|
671
|
+
</span>
|
|
672
|
+
</div>
|
|
586
673
|
</div>
|
|
587
674
|
</div>
|
|
588
675
|
</div>
|
|
@@ -592,17 +679,51 @@ exports[`<GrantApprovalRuleConditions /> matches the last snapshot with values 1
|
|
|
592
679
|
<label
|
|
593
680
|
for="value-0"
|
|
594
681
|
>
|
|
595
|
-
|
|
682
|
+
Values
|
|
596
683
|
</label>
|
|
597
684
|
<div
|
|
598
|
-
|
|
685
|
+
aria-expanded="false"
|
|
686
|
+
class="ui multiple search selection dropdown"
|
|
687
|
+
id="value-0"
|
|
688
|
+
name="values"
|
|
689
|
+
role="combobox"
|
|
599
690
|
>
|
|
691
|
+
<a
|
|
692
|
+
class="ui label"
|
|
693
|
+
value="bar"
|
|
694
|
+
>
|
|
695
|
+
bar
|
|
696
|
+
<i
|
|
697
|
+
aria-hidden="true"
|
|
698
|
+
class="delete icon"
|
|
699
|
+
/>
|
|
700
|
+
</a>
|
|
600
701
|
<input
|
|
601
|
-
|
|
602
|
-
|
|
702
|
+
aria-autocomplete="list"
|
|
703
|
+
autocomplete="off"
|
|
704
|
+
class="search"
|
|
705
|
+
tabindex="0"
|
|
603
706
|
type="text"
|
|
604
|
-
value="
|
|
707
|
+
value=""
|
|
605
708
|
/>
|
|
709
|
+
<span
|
|
710
|
+
class="sizer"
|
|
711
|
+
/>
|
|
712
|
+
<i
|
|
713
|
+
aria-hidden="true"
|
|
714
|
+
class="dropdown icon"
|
|
715
|
+
/>
|
|
716
|
+
<div
|
|
717
|
+
aria-multiselectable="true"
|
|
718
|
+
class="menu transition"
|
|
719
|
+
role="listbox"
|
|
720
|
+
>
|
|
721
|
+
<div
|
|
722
|
+
class="message"
|
|
723
|
+
>
|
|
724
|
+
No results found.
|
|
725
|
+
</div>
|
|
726
|
+
</div>
|
|
606
727
|
</div>
|
|
607
728
|
</div>
|
|
608
729
|
</div>
|
|
@@ -768,6 +889,19 @@ exports[`<GrantApprovalRuleConditions /> matches the last snapshot with values 1
|
|
|
768
889
|
Is not equal
|
|
769
890
|
</span>
|
|
770
891
|
</div>
|
|
892
|
+
<div
|
|
893
|
+
aria-checked="false"
|
|
894
|
+
aria-selected="false"
|
|
895
|
+
class="item"
|
|
896
|
+
role="option"
|
|
897
|
+
style="pointer-events: all;"
|
|
898
|
+
>
|
|
899
|
+
<span
|
|
900
|
+
class="text"
|
|
901
|
+
>
|
|
902
|
+
Subset of
|
|
903
|
+
</span>
|
|
904
|
+
</div>
|
|
771
905
|
</div>
|
|
772
906
|
</div>
|
|
773
907
|
</div>
|
|
@@ -777,17 +911,51 @@ exports[`<GrantApprovalRuleConditions /> matches the last snapshot with values 1
|
|
|
777
911
|
<label
|
|
778
912
|
for="value-1"
|
|
779
913
|
>
|
|
780
|
-
|
|
914
|
+
Values
|
|
781
915
|
</label>
|
|
782
916
|
<div
|
|
783
|
-
|
|
917
|
+
aria-expanded="false"
|
|
918
|
+
class="ui multiple search selection dropdown"
|
|
919
|
+
id="value-1"
|
|
920
|
+
name="values"
|
|
921
|
+
role="combobox"
|
|
784
922
|
>
|
|
923
|
+
<a
|
|
924
|
+
class="ui label"
|
|
925
|
+
value="bar"
|
|
926
|
+
>
|
|
927
|
+
bar
|
|
928
|
+
<i
|
|
929
|
+
aria-hidden="true"
|
|
930
|
+
class="delete icon"
|
|
931
|
+
/>
|
|
932
|
+
</a>
|
|
785
933
|
<input
|
|
786
|
-
|
|
787
|
-
|
|
934
|
+
aria-autocomplete="list"
|
|
935
|
+
autocomplete="off"
|
|
936
|
+
class="search"
|
|
937
|
+
tabindex="0"
|
|
788
938
|
type="text"
|
|
789
|
-
value="
|
|
939
|
+
value=""
|
|
940
|
+
/>
|
|
941
|
+
<span
|
|
942
|
+
class="sizer"
|
|
943
|
+
/>
|
|
944
|
+
<i
|
|
945
|
+
aria-hidden="true"
|
|
946
|
+
class="dropdown icon"
|
|
790
947
|
/>
|
|
948
|
+
<div
|
|
949
|
+
aria-multiselectable="true"
|
|
950
|
+
class="menu transition"
|
|
951
|
+
role="listbox"
|
|
952
|
+
>
|
|
953
|
+
<div
|
|
954
|
+
class="message"
|
|
955
|
+
>
|
|
956
|
+
No results found.
|
|
957
|
+
</div>
|
|
958
|
+
</div>
|
|
791
959
|
</div>
|
|
792
960
|
</div>
|
|
793
961
|
</div>
|
|
@@ -422,6 +422,19 @@ exports[`<GrantApprovalRuleEdit /> matches the last snapshot 1`] = `
|
|
|
422
422
|
Is not equal
|
|
423
423
|
</span>
|
|
424
424
|
</div>
|
|
425
|
+
<div
|
|
426
|
+
aria-checked="false"
|
|
427
|
+
aria-selected="false"
|
|
428
|
+
class="item"
|
|
429
|
+
role="option"
|
|
430
|
+
style="pointer-events: all;"
|
|
431
|
+
>
|
|
432
|
+
<span
|
|
433
|
+
class="text"
|
|
434
|
+
>
|
|
435
|
+
Subset of
|
|
436
|
+
</span>
|
|
437
|
+
</div>
|
|
425
438
|
</div>
|
|
426
439
|
</div>
|
|
427
440
|
</div>
|
|
@@ -431,17 +444,52 @@ exports[`<GrantApprovalRuleEdit /> matches the last snapshot 1`] = `
|
|
|
431
444
|
<label
|
|
432
445
|
for="value-0"
|
|
433
446
|
>
|
|
434
|
-
|
|
447
|
+
Values
|
|
435
448
|
</label>
|
|
436
449
|
<div
|
|
437
|
-
|
|
450
|
+
aria-disabled="false"
|
|
451
|
+
aria-expanded="false"
|
|
452
|
+
class="ui multiple search selection dropdown"
|
|
453
|
+
id="value-0"
|
|
454
|
+
name="values"
|
|
455
|
+
role="combobox"
|
|
438
456
|
>
|
|
457
|
+
<a
|
|
458
|
+
class="ui label"
|
|
459
|
+
value="bar"
|
|
460
|
+
>
|
|
461
|
+
bar
|
|
462
|
+
<i
|
|
463
|
+
aria-hidden="true"
|
|
464
|
+
class="delete icon"
|
|
465
|
+
/>
|
|
466
|
+
</a>
|
|
439
467
|
<input
|
|
440
|
-
|
|
441
|
-
|
|
468
|
+
aria-autocomplete="list"
|
|
469
|
+
autocomplete="off"
|
|
470
|
+
class="search"
|
|
471
|
+
tabindex="0"
|
|
442
472
|
type="text"
|
|
443
|
-
value="
|
|
473
|
+
value=""
|
|
474
|
+
/>
|
|
475
|
+
<span
|
|
476
|
+
class="sizer"
|
|
477
|
+
/>
|
|
478
|
+
<i
|
|
479
|
+
aria-hidden="true"
|
|
480
|
+
class="dropdown icon"
|
|
444
481
|
/>
|
|
482
|
+
<div
|
|
483
|
+
aria-multiselectable="true"
|
|
484
|
+
class="menu transition"
|
|
485
|
+
role="listbox"
|
|
486
|
+
>
|
|
487
|
+
<div
|
|
488
|
+
class="message"
|
|
489
|
+
>
|
|
490
|
+
No results found.
|
|
491
|
+
</div>
|
|
492
|
+
</div>
|
|
445
493
|
</div>
|
|
446
494
|
</div>
|
|
447
495
|
</div>
|
|
@@ -306,6 +306,19 @@ exports[`<GrantApprovalRuleForm /> matches the last snapshot 1`] = `
|
|
|
306
306
|
Is not equal
|
|
307
307
|
</span>
|
|
308
308
|
</div>
|
|
309
|
+
<div
|
|
310
|
+
aria-checked="false"
|
|
311
|
+
aria-selected="false"
|
|
312
|
+
class="item"
|
|
313
|
+
role="option"
|
|
314
|
+
style="pointer-events: all;"
|
|
315
|
+
>
|
|
316
|
+
<span
|
|
317
|
+
class="text"
|
|
318
|
+
>
|
|
319
|
+
Subset of
|
|
320
|
+
</span>
|
|
321
|
+
</div>
|
|
309
322
|
</div>
|
|
310
323
|
</div>
|
|
311
324
|
</div>
|
|
@@ -315,19 +328,52 @@ exports[`<GrantApprovalRuleForm /> matches the last snapshot 1`] = `
|
|
|
315
328
|
<label
|
|
316
329
|
for="value-0"
|
|
317
330
|
>
|
|
318
|
-
|
|
331
|
+
Values
|
|
319
332
|
</label>
|
|
320
333
|
<div
|
|
321
|
-
|
|
334
|
+
aria-disabled="true"
|
|
335
|
+
aria-expanded="false"
|
|
336
|
+
class="ui disabled multiple search selection dropdown"
|
|
337
|
+
id="value-0"
|
|
338
|
+
name="values"
|
|
339
|
+
role="combobox"
|
|
322
340
|
>
|
|
341
|
+
<a
|
|
342
|
+
class="ui label"
|
|
343
|
+
value="bar"
|
|
344
|
+
>
|
|
345
|
+
bar
|
|
346
|
+
<i
|
|
347
|
+
aria-hidden="true"
|
|
348
|
+
class="delete icon"
|
|
349
|
+
/>
|
|
350
|
+
</a>
|
|
323
351
|
<input
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
352
|
+
aria-autocomplete="list"
|
|
353
|
+
autocomplete="off"
|
|
354
|
+
class="search"
|
|
327
355
|
tabindex="-1"
|
|
328
356
|
type="text"
|
|
329
|
-
value="
|
|
357
|
+
value=""
|
|
358
|
+
/>
|
|
359
|
+
<span
|
|
360
|
+
class="sizer"
|
|
361
|
+
/>
|
|
362
|
+
<i
|
|
363
|
+
aria-hidden="true"
|
|
364
|
+
class="dropdown icon"
|
|
330
365
|
/>
|
|
366
|
+
<div
|
|
367
|
+
aria-multiselectable="true"
|
|
368
|
+
class="menu transition"
|
|
369
|
+
role="listbox"
|
|
370
|
+
>
|
|
371
|
+
<div
|
|
372
|
+
class="message"
|
|
373
|
+
>
|
|
374
|
+
No results found.
|
|
375
|
+
</div>
|
|
376
|
+
</div>
|
|
331
377
|
</div>
|
|
332
378
|
</div>
|
|
333
379
|
</div>
|
|
@@ -497,6 +543,19 @@ exports[`<GrantApprovalRuleForm /> matches the last snapshot 1`] = `
|
|
|
497
543
|
Is not equal
|
|
498
544
|
</span>
|
|
499
545
|
</div>
|
|
546
|
+
<div
|
|
547
|
+
aria-checked="false"
|
|
548
|
+
aria-selected="false"
|
|
549
|
+
class="item"
|
|
550
|
+
role="option"
|
|
551
|
+
style="pointer-events: all;"
|
|
552
|
+
>
|
|
553
|
+
<span
|
|
554
|
+
class="text"
|
|
555
|
+
>
|
|
556
|
+
Subset of
|
|
557
|
+
</span>
|
|
558
|
+
</div>
|
|
500
559
|
</div>
|
|
501
560
|
</div>
|
|
502
561
|
</div>
|
|
@@ -506,19 +565,52 @@ exports[`<GrantApprovalRuleForm /> matches the last snapshot 1`] = `
|
|
|
506
565
|
<label
|
|
507
566
|
for="value-1"
|
|
508
567
|
>
|
|
509
|
-
|
|
568
|
+
Values
|
|
510
569
|
</label>
|
|
511
570
|
<div
|
|
512
|
-
|
|
571
|
+
aria-disabled="true"
|
|
572
|
+
aria-expanded="false"
|
|
573
|
+
class="ui disabled multiple search selection dropdown"
|
|
574
|
+
id="value-1"
|
|
575
|
+
name="values"
|
|
576
|
+
role="combobox"
|
|
513
577
|
>
|
|
578
|
+
<a
|
|
579
|
+
class="ui label"
|
|
580
|
+
value="bar"
|
|
581
|
+
>
|
|
582
|
+
bar
|
|
583
|
+
<i
|
|
584
|
+
aria-hidden="true"
|
|
585
|
+
class="delete icon"
|
|
586
|
+
/>
|
|
587
|
+
</a>
|
|
514
588
|
<input
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
589
|
+
aria-autocomplete="list"
|
|
590
|
+
autocomplete="off"
|
|
591
|
+
class="search"
|
|
518
592
|
tabindex="-1"
|
|
519
593
|
type="text"
|
|
520
|
-
value="
|
|
594
|
+
value=""
|
|
521
595
|
/>
|
|
596
|
+
<span
|
|
597
|
+
class="sizer"
|
|
598
|
+
/>
|
|
599
|
+
<i
|
|
600
|
+
aria-hidden="true"
|
|
601
|
+
class="dropdown icon"
|
|
602
|
+
/>
|
|
603
|
+
<div
|
|
604
|
+
aria-multiselectable="true"
|
|
605
|
+
class="menu transition"
|
|
606
|
+
role="listbox"
|
|
607
|
+
>
|
|
608
|
+
<div
|
|
609
|
+
class="message"
|
|
610
|
+
>
|
|
611
|
+
No results found.
|
|
612
|
+
</div>
|
|
613
|
+
</div>
|
|
522
614
|
</div>
|
|
523
615
|
</div>
|
|
524
616
|
</div>
|
|
@@ -965,6 +1057,19 @@ exports[`<GrantApprovalRuleForm /> matches the last snapshot for new rule 1`] =
|
|
|
965
1057
|
Is not equal
|
|
966
1058
|
</span>
|
|
967
1059
|
</div>
|
|
1060
|
+
<div
|
|
1061
|
+
aria-checked="false"
|
|
1062
|
+
aria-selected="false"
|
|
1063
|
+
class="item"
|
|
1064
|
+
role="option"
|
|
1065
|
+
style="pointer-events: all;"
|
|
1066
|
+
>
|
|
1067
|
+
<span
|
|
1068
|
+
class="text"
|
|
1069
|
+
>
|
|
1070
|
+
Subset of
|
|
1071
|
+
</span>
|
|
1072
|
+
</div>
|
|
968
1073
|
</div>
|
|
969
1074
|
</div>
|
|
970
1075
|
</div>
|
|
@@ -974,19 +1079,42 @@ exports[`<GrantApprovalRuleForm /> matches the last snapshot for new rule 1`] =
|
|
|
974
1079
|
<label
|
|
975
1080
|
for="value-0"
|
|
976
1081
|
>
|
|
977
|
-
|
|
1082
|
+
Values
|
|
978
1083
|
</label>
|
|
979
1084
|
<div
|
|
980
|
-
|
|
1085
|
+
aria-disabled="true"
|
|
1086
|
+
aria-expanded="false"
|
|
1087
|
+
class="ui disabled multiple search selection dropdown"
|
|
1088
|
+
id="value-0"
|
|
1089
|
+
name="values"
|
|
1090
|
+
role="combobox"
|
|
981
1091
|
>
|
|
982
1092
|
<input
|
|
983
|
-
|
|
984
|
-
|
|
985
|
-
|
|
1093
|
+
aria-autocomplete="list"
|
|
1094
|
+
autocomplete="off"
|
|
1095
|
+
class="search"
|
|
986
1096
|
tabindex="-1"
|
|
987
1097
|
type="text"
|
|
988
1098
|
value=""
|
|
989
1099
|
/>
|
|
1100
|
+
<span
|
|
1101
|
+
class="sizer"
|
|
1102
|
+
/>
|
|
1103
|
+
<i
|
|
1104
|
+
aria-hidden="true"
|
|
1105
|
+
class="dropdown icon"
|
|
1106
|
+
/>
|
|
1107
|
+
<div
|
|
1108
|
+
aria-multiselectable="true"
|
|
1109
|
+
class="menu transition"
|
|
1110
|
+
role="listbox"
|
|
1111
|
+
>
|
|
1112
|
+
<div
|
|
1113
|
+
class="message"
|
|
1114
|
+
>
|
|
1115
|
+
No results found.
|
|
1116
|
+
</div>
|
|
1117
|
+
</div>
|
|
990
1118
|
</div>
|
|
991
1119
|
</div>
|
|
992
1120
|
</div>
|
|
@@ -393,6 +393,19 @@ exports[`<GrantApprovalRuleNew /> matches the last snapshot 1`] = `
|
|
|
393
393
|
Is not equal
|
|
394
394
|
</span>
|
|
395
395
|
</div>
|
|
396
|
+
<div
|
|
397
|
+
aria-checked="false"
|
|
398
|
+
aria-selected="false"
|
|
399
|
+
class="item"
|
|
400
|
+
role="option"
|
|
401
|
+
style="pointer-events: all;"
|
|
402
|
+
>
|
|
403
|
+
<span
|
|
404
|
+
class="text"
|
|
405
|
+
>
|
|
406
|
+
Subset of
|
|
407
|
+
</span>
|
|
408
|
+
</div>
|
|
396
409
|
</div>
|
|
397
410
|
</div>
|
|
398
411
|
</div>
|
|
@@ -402,19 +415,42 @@ exports[`<GrantApprovalRuleNew /> matches the last snapshot 1`] = `
|
|
|
402
415
|
<label
|
|
403
416
|
for="value-0"
|
|
404
417
|
>
|
|
405
|
-
|
|
418
|
+
Values
|
|
406
419
|
</label>
|
|
407
420
|
<div
|
|
408
|
-
|
|
421
|
+
aria-disabled="true"
|
|
422
|
+
aria-expanded="false"
|
|
423
|
+
class="ui disabled multiple search selection dropdown"
|
|
424
|
+
id="value-0"
|
|
425
|
+
name="values"
|
|
426
|
+
role="combobox"
|
|
409
427
|
>
|
|
410
428
|
<input
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
429
|
+
aria-autocomplete="list"
|
|
430
|
+
autocomplete="off"
|
|
431
|
+
class="search"
|
|
414
432
|
tabindex="-1"
|
|
415
433
|
type="text"
|
|
416
434
|
value=""
|
|
417
435
|
/>
|
|
436
|
+
<span
|
|
437
|
+
class="sizer"
|
|
438
|
+
/>
|
|
439
|
+
<i
|
|
440
|
+
aria-hidden="true"
|
|
441
|
+
class="dropdown icon"
|
|
442
|
+
/>
|
|
443
|
+
<div
|
|
444
|
+
aria-multiselectable="true"
|
|
445
|
+
class="menu transition"
|
|
446
|
+
role="listbox"
|
|
447
|
+
>
|
|
448
|
+
<div
|
|
449
|
+
class="message"
|
|
450
|
+
>
|
|
451
|
+
No results found.
|
|
452
|
+
</div>
|
|
453
|
+
</div>
|
|
418
454
|
</div>
|
|
419
455
|
</div>
|
|
420
456
|
</div>
|
package/src/messages/en.js
CHANGED
|
@@ -73,8 +73,9 @@ export default {
|
|
|
73
73
|
"grantApprovalRule.conditions.operator": "Operator",
|
|
74
74
|
"grantApprovalRule.conditions.operator.eq": "Is equal",
|
|
75
75
|
"grantApprovalRule.conditions.operator.neq": "Is not equal",
|
|
76
|
+
"grantApprovalRule.conditions.operator.subset": "Subset of",
|
|
76
77
|
"grantApprovalRule.conditions.operator.placeholder": "Operator",
|
|
77
|
-
"grantApprovalRule.conditions.
|
|
78
|
+
"grantApprovalRule.conditions.values": "Values",
|
|
78
79
|
"grantApprovalRule.conditions.field_prefix": "Context",
|
|
79
80
|
"grantApprovalRule.conditions.field_prefix.request": "Request metadata",
|
|
80
81
|
"grantApprovalRule.conditions.field_prefix.note": "Structure note",
|
package/src/messages/es.js
CHANGED
|
@@ -81,8 +81,9 @@ export default {
|
|
|
81
81
|
"grantApprovalRule.conditions.operator": "Operador",
|
|
82
82
|
"grantApprovalRule.conditions.operator.eq": "Es igual",
|
|
83
83
|
"grantApprovalRule.conditions.operator.neq": "No es igual",
|
|
84
|
+
"grantApprovalRule.conditions.operator.subset": "Subconjunto de",
|
|
84
85
|
"grantApprovalRule.conditions.operator.placeholder": "Operador",
|
|
85
|
-
"grantApprovalRule.conditions.
|
|
86
|
+
"grantApprovalRule.conditions.values": "Valores",
|
|
86
87
|
"grantApprovalRule.conditions.field_prefix": "Contexto",
|
|
87
88
|
"grantApprovalRule.conditions.field_prefix.request":
|
|
88
89
|
"Metadata de la petición",
|