@truedat/qx 5.14.1 → 5.15.0
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/package.json +3 -3
- package/src/api.js +3 -2
- package/src/components/QxRoutes.js +4 -4
- package/src/components/common/ResourceSelector.js +80 -0
- package/src/components/common/TestFormWrapper.js +9 -6
- package/src/components/common/TypeSelector.js +3 -1
- package/src/components/common/__tests__/DescriptionInput.spec.js +48 -0
- package/src/components/common/__tests__/ResourceSelector.spec.js +124 -0
- package/src/components/common/__tests__/TypeSelector.spec.js +29 -0
- package/src/components/common/__tests__/__snapshots__/DescriptionInput.spec.js.snap +19 -0
- package/src/components/common/__tests__/__snapshots__/ResourceSelector.spec.js.snap +484 -0
- package/src/components/common/__tests__/__snapshots__/TypeSelector.spec.js.snap +230 -0
- package/src/components/common/expressions/Clauses.js +100 -0
- package/src/components/common/expressions/Condition.js +178 -0
- package/src/components/common/expressions/Expression.js +54 -0
- package/src/components/common/expressions/FieldSelector.js +66 -0
- package/src/components/{functions → common}/expressions/FunctionArgs.js +1 -0
- package/src/components/{functions → common}/expressions/FunctionSelector.js +24 -4
- package/src/components/{functions → common}/expressions/ParamSelector.js +3 -3
- package/src/components/{functions → common}/expressions/ShapeSelector.js +22 -6
- package/src/components/common/expressions/__tests__/Clauses.spec.js +53 -0
- package/src/components/common/expressions/__tests__/Condition.spec.js +33 -0
- package/src/components/{functions → common}/expressions/__tests__/ConstantSelector.spec.js +6 -1
- package/src/components/{functions → common}/expressions/__tests__/Expression.spec.js +7 -5
- package/src/components/common/expressions/__tests__/FieldSelector.spec.js +24 -0
- package/src/components/{functions → common}/expressions/__tests__/FunctionArgs.spec.js +20 -6
- package/src/components/{functions → common}/expressions/__tests__/FunctionSelector.spec.js +1 -1
- package/src/components/{functions → common}/expressions/__tests__/ParamSelector.spec.js +22 -10
- package/src/components/{functions → common}/expressions/__tests__/ShapeSelector.spec.js +3 -3
- package/src/components/common/expressions/__tests__/__snapshots__/Clauses.spec.js.snap +64 -0
- package/src/components/common/expressions/__tests__/__snapshots__/Condition.spec.js.snap +316 -0
- package/src/components/{functions → common}/expressions/__tests__/__snapshots__/ConstantSelector.spec.js.snap +1 -1
- package/src/components/common/expressions/__tests__/__snapshots__/Expression.spec.js.snap +939 -0
- package/src/components/common/expressions/__tests__/__snapshots__/FieldSelector.spec.js.snap +5 -0
- package/src/components/common/expressions/__tests__/__snapshots__/FunctionArgs.spec.js.snap +344 -0
- package/src/components/{functions → common}/expressions/__tests__/__snapshots__/ParamSelector.spec.js.snap +4 -4
- package/src/components/{functions → common}/expressions/__tests__/__snapshots__/ShapeSelector.spec.js.snap +17 -24
- package/src/components/common/expressions/constantInputs/AnySelector.js +44 -0
- package/src/components/{functions → common}/expressions/constantInputs/__tests__/AnySelector.spec.js +21 -14
- package/src/components/{functions → common}/expressions/constantInputs/__tests__/DefaultSelector.spec.js +5 -2
- package/src/components/{functions → common}/expressions/constantInputs/__tests__/__snapshots__/AnySelector.spec.js.snap +2 -2
- package/src/components/common/expressions/index.js +4 -0
- package/src/components/common/resourceSelectors/DataStructureSelector.js +63 -0
- package/src/components/common/resourceSelectors/DataViewSelector.js +65 -0
- package/src/components/common/resourceSelectors/ReferenceDatasetSelector.js +61 -0
- package/src/components/common/resourceSelectors/__tests__/DataStructureSelector.spec.js +31 -0
- package/src/components/common/resourceSelectors/__tests__/DataViewSelector.spec.js +133 -0
- package/src/components/common/resourceSelectors/__tests__/ReferenceDatasetSelector.spec.js +97 -0
- package/src/components/common/resourceSelectors/__tests__/__snapshots__/DataStructureSelector.spec.js.snap +105 -0
- package/src/components/common/resourceSelectors/__tests__/__snapshots__/DataViewSelector.spec.js.snap +50 -0
- package/src/components/common/resourceSelectors/__tests__/__snapshots__/ReferenceDatasetSelector.spec.js.snap +50 -0
- package/src/components/common/resourceSelectors/index.js +5 -0
- package/src/components/dataViews/DataViewEditor.js +170 -0
- package/src/components/dataViews/DataViewSelect.js +47 -0
- package/src/components/dataViews/DataViews.js +169 -0
- package/src/components/dataViews/Queryable.js +138 -0
- package/src/components/dataViews/Queryables.js +53 -0
- package/src/components/dataViews/__tests__/DataViewEditor.spec.js +293 -0
- package/src/components/dataViews/__tests__/DataViewSelect.spec.js +28 -0
- package/src/components/dataViews/__tests__/DataViews.spec.js +57 -0
- package/src/components/dataViews/__tests__/Queryable.spec.js +201 -0
- package/src/components/dataViews/__tests__/Queryables.spec.js +183 -0
- package/src/components/dataViews/__tests__/__snapshots__/DataViewEditor.spec.js.snap +1000 -0
- package/src/components/dataViews/__tests__/__snapshots__/DataViewSelect.spec.js.snap +55 -0
- package/src/components/dataViews/__tests__/__snapshots__/DataViews.spec.js.snap +77 -0
- package/src/components/dataViews/__tests__/__snapshots__/Queryable.spec.js.snap +874 -0
- package/src/components/dataViews/__tests__/__snapshots__/Queryables.spec.js.snap +911 -0
- package/src/components/dataViews/__tests__/queryableFunctions.spec.js +193 -0
- package/src/components/dataViews/queryableFunctions.js +80 -0
- package/src/components/dataViews/queryableProperties/From.js +15 -0
- package/src/components/dataViews/queryableProperties/GroupBy.js +124 -0
- package/src/components/dataViews/queryableProperties/Join.js +62 -0
- package/src/components/dataViews/queryableProperties/JoinTypeIcon.js +49 -0
- package/src/components/dataViews/queryableProperties/Select.js +76 -0
- package/src/components/dataViews/queryableProperties/SelectField.js +116 -0
- package/src/components/dataViews/queryableProperties/Where.js +15 -0
- package/src/components/dataViews/queryableProperties/__tests__/From.spec.js +30 -0
- package/src/components/dataViews/queryableProperties/__tests__/GroupBy.spec.js +75 -0
- package/src/components/dataViews/queryableProperties/__tests__/Join.spec.js +38 -0
- package/src/components/dataViews/queryableProperties/__tests__/JoinTypeIcon.spec.js +36 -0
- package/src/components/dataViews/queryableProperties/__tests__/Select.spec.js +144 -0
- package/src/components/dataViews/queryableProperties/__tests__/SelectField.spec.js +107 -0
- package/src/components/dataViews/queryableProperties/__tests__/Where.spec.js +27 -0
- package/src/components/dataViews/queryableProperties/__tests__/__snapshots__/From.spec.js.snap +75 -0
- package/src/components/dataViews/queryableProperties/__tests__/__snapshots__/GroupBy.spec.js.snap +276 -0
- package/src/components/dataViews/queryableProperties/__tests__/__snapshots__/Join.spec.js.snap +252 -0
- package/src/components/dataViews/queryableProperties/__tests__/__snapshots__/JoinTypeIcon.spec.js.snap +77 -0
- package/src/components/dataViews/queryableProperties/__tests__/__snapshots__/Select.spec.js.snap +411 -0
- package/src/components/dataViews/queryableProperties/__tests__/__snapshots__/SelectField.spec.js.snap +343 -0
- package/src/components/dataViews/queryableProperties/__tests__/__snapshots__/Where.spec.js.snap +22 -0
- package/src/components/dataViews/queryableProperties/index.js +7 -0
- package/src/components/functions/FunctionEditor.js +30 -29
- package/src/components/functions/Functions.js +3 -11
- package/src/components/functions/__tests__/FunctionEditor.spec.js +6 -0
- package/src/components/functions/__tests__/FunctionParams.spec.js +6 -0
- package/src/components/functions/__tests__/__snapshots__/FunctionEditor.spec.js.snap +490 -466
- package/src/components/functions/__tests__/__snapshots__/FunctionParams.spec.js.snap +1 -1
- package/src/hooks/__tests__/{useDataSets.spec.js → useDataViews.spec.js} +5 -5
- package/src/hooks/useDataViews.js +33 -0
- package/src/styles/Expression.less +150 -0
- package/src/types.js +11 -3
- package/src/components/DataSets.js +0 -64
- package/src/components/__tests__/DataSets.spec.js +0 -46
- package/src/components/__tests__/__snapshots__/DataSets.spec.js.snap +0 -82
- package/src/components/functions/expressions/Expression.js +0 -40
- package/src/components/functions/expressions/FieldSelector.js +0 -56
- package/src/components/functions/expressions/__tests__/__snapshots__/Expression.spec.js.snap +0 -904
- package/src/components/functions/expressions/__tests__/__snapshots__/FunctionArgs.spec.js.snap +0 -392
- package/src/components/functions/expressions/constantInputs/AnySelector.js +0 -29
- package/src/hooks/useDataSets.js +0 -8
- /package/src/components/{functions → common}/expressions/ConstantSelector.js +0 -0
- /package/src/components/{functions → common}/expressions/__tests__/__snapshots__/FunctionSelector.spec.js.snap +0 -0
- /package/src/components/{functions → common/expressions}/__tests__/useWatchParams.spec.js +0 -0
- /package/src/components/{functions → common}/expressions/constantInputs/BooleanSelector.js +0 -0
- /package/src/components/{functions → common}/expressions/constantInputs/DefaultSelector.js +0 -0
- /package/src/components/{functions → common}/expressions/constantInputs/__tests__/BooleanSelector.spec.js +0 -0
- /package/src/components/{functions → common}/expressions/constantInputs/__tests__/__snapshots__/BooleanSelector.spec.js.snap +0 -0
- /package/src/components/{functions → common}/expressions/constantInputs/__tests__/__snapshots__/DefaultSelector.spec.js.snap +0 -0
- /package/src/components/{functions → common}/expressions/constantInputs/index.js +0 -0
- /package/src/components/{functions → common/expressions}/useWatchParams.js +0 -0
|
@@ -46,7 +46,10 @@ describe("<Expression />", () => {
|
|
|
46
46
|
];
|
|
47
47
|
|
|
48
48
|
const { container, getByRole, getAllByRole, queryByText } = render(
|
|
49
|
-
<TestFormWrapper
|
|
49
|
+
<TestFormWrapper
|
|
50
|
+
watcher={watcher}
|
|
51
|
+
context={{ type: "boolean", functions }}
|
|
52
|
+
>
|
|
50
53
|
<Expression />
|
|
51
54
|
</TestFormWrapper>,
|
|
52
55
|
renderOpts
|
|
@@ -72,7 +75,7 @@ describe("<Expression />", () => {
|
|
|
72
75
|
const watcher = jest.fn();
|
|
73
76
|
|
|
74
77
|
const { container, getByRole, getAllByRole, queryByText } = render(
|
|
75
|
-
<TestFormWrapper watcher={watcher} type
|
|
78
|
+
<TestFormWrapper watcher={watcher} context={{ type: "boolean" }}>
|
|
76
79
|
<Expression />
|
|
77
80
|
</TestFormWrapper>,
|
|
78
81
|
renderOpts
|
|
@@ -106,9 +109,8 @@ describe("<Expression />", () => {
|
|
|
106
109
|
const { container, getByRole, getAllByRole, queryByText } = render(
|
|
107
110
|
<TestFormWrapper
|
|
108
111
|
watcher={watcher}
|
|
109
|
-
type
|
|
112
|
+
context={{ type: "boolean" }}
|
|
110
113
|
defaultValues={defaultValues}
|
|
111
|
-
s
|
|
112
114
|
>
|
|
113
115
|
<Expression />
|
|
114
116
|
</TestFormWrapper>,
|
|
@@ -119,7 +121,7 @@ describe("<Expression />", () => {
|
|
|
119
121
|
|
|
120
122
|
expect(watcher).lastCalledWith({
|
|
121
123
|
params: [{ name: "param1", type: "boolean", id: 1 }],
|
|
122
|
-
test: { shape: "param" },
|
|
124
|
+
test: { shape: "param", value: { id: undefined } },
|
|
123
125
|
});
|
|
124
126
|
|
|
125
127
|
await waitFor(() => expect(queryByText(/lazy/i)).not.toBeInTheDocument(), {
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { render } from "@truedat/test/render";
|
|
3
|
+
import TestFormWrapper from "@truedat/qx/components/common/TestFormWrapper";
|
|
4
|
+
import FieldSelector from "../FieldSelector";
|
|
5
|
+
|
|
6
|
+
describe("<FieldSelector />", () => {
|
|
7
|
+
it("matches the latest snapshot", () => {
|
|
8
|
+
const fields = [{ id: 1, parent_id: 2, name: "name" }];
|
|
9
|
+
const { container } = render(
|
|
10
|
+
<TestFormWrapper context={{ fields }}>
|
|
11
|
+
<FieldSelector />
|
|
12
|
+
</TestFormWrapper>
|
|
13
|
+
);
|
|
14
|
+
expect(container).toMatchSnapshot();
|
|
15
|
+
});
|
|
16
|
+
it("matches the latest snapshot empty", () => {
|
|
17
|
+
const { container } = render(
|
|
18
|
+
<TestFormWrapper>
|
|
19
|
+
<FieldSelector />
|
|
20
|
+
</TestFormWrapper>
|
|
21
|
+
);
|
|
22
|
+
expect(container).toMatchSnapshot();
|
|
23
|
+
});
|
|
24
|
+
});
|
|
@@ -11,6 +11,15 @@ const renderOpts = {
|
|
|
11
11
|
"functions.expression.shape.function": "function",
|
|
12
12
|
"functions.expression.shape.constant": "constant",
|
|
13
13
|
"functions.form.expression.function.placeholder": "function.placeholder",
|
|
14
|
+
"functions.form.required": "required",
|
|
15
|
+
"expressions.data_type.timestamp": "timestamp",
|
|
16
|
+
"expressions.data_type.date": "date",
|
|
17
|
+
"expressions.data_type.number": "number",
|
|
18
|
+
"expressions.data_type.string": "string",
|
|
19
|
+
"expressions.data_type.boolean": "boolean",
|
|
20
|
+
"expressions.data_type.any": "any",
|
|
21
|
+
"functions.expression.constant.false": "false",
|
|
22
|
+
"functions.expression.constant.true": "true",
|
|
14
23
|
},
|
|
15
24
|
},
|
|
16
25
|
fallback: "lazy",
|
|
@@ -35,8 +44,8 @@ describe("<FunctionArgs />", () => {
|
|
|
35
44
|
name: "eq",
|
|
36
45
|
type: "boolean",
|
|
37
46
|
params: [
|
|
38
|
-
{ name: "arg1", type: "
|
|
39
|
-
{ name: "arg2", type: "
|
|
47
|
+
{ name: "arg1", type: "boolean" },
|
|
48
|
+
{ name: "arg2", type: "boolean" },
|
|
40
49
|
],
|
|
41
50
|
},
|
|
42
51
|
];
|
|
@@ -54,8 +63,7 @@ describe("<FunctionArgs />", () => {
|
|
|
54
63
|
const { container, getAllByRole, queryByText } = render(
|
|
55
64
|
<TestFormWrapper
|
|
56
65
|
watcher={watcher}
|
|
57
|
-
type
|
|
58
|
-
functions={functions}
|
|
66
|
+
context={{ type: "boolean", functions }}
|
|
59
67
|
defaultValues={defaultValues}
|
|
60
68
|
>
|
|
61
69
|
<FunctionArgs />
|
|
@@ -72,8 +80,14 @@ describe("<FunctionArgs />", () => {
|
|
|
72
80
|
shape: "function",
|
|
73
81
|
value: {
|
|
74
82
|
args: {
|
|
75
|
-
arg1: {
|
|
76
|
-
|
|
83
|
+
arg1: {
|
|
84
|
+
shape: "constant",
|
|
85
|
+
value: { type: "boolean", value: undefined },
|
|
86
|
+
},
|
|
87
|
+
arg2: {
|
|
88
|
+
shape: "function",
|
|
89
|
+
value: undefined,
|
|
90
|
+
},
|
|
77
91
|
},
|
|
78
92
|
name: "eq",
|
|
79
93
|
type: "boolean",
|
|
@@ -42,7 +42,7 @@ describe("<FunctionSelector />", () => {
|
|
|
42
42
|
];
|
|
43
43
|
|
|
44
44
|
const { container, getByRole, queryByText } = render(
|
|
45
|
-
<TestFormWrapper watcher={watcher} type
|
|
45
|
+
<TestFormWrapper watcher={watcher} context={{ type: "any", functions }}>
|
|
46
46
|
<FunctionSelector />
|
|
47
47
|
</TestFormWrapper>,
|
|
48
48
|
renderOpts
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import { waitFor } from "@testing-library/react";
|
|
3
|
+
import { act } from "react-dom/test-utils";
|
|
3
4
|
import { render } from "@truedat/test/render";
|
|
4
5
|
import userEvent from "@testing-library/user-event";
|
|
5
6
|
import TestFormWrapper from "@truedat/qx/components/common/TestFormWrapper";
|
|
7
|
+
import FunctionParams from "@truedat/qx/components/functions/FunctionParams";
|
|
6
8
|
import ParamSelector from "../ParamSelector";
|
|
7
|
-
import FunctionParams from "../../FunctionParams";
|
|
8
9
|
|
|
9
10
|
const renderOpts = {
|
|
10
11
|
messages: {
|
|
@@ -13,6 +14,12 @@ const renderOpts = {
|
|
|
13
14
|
"functions.form.add_description": "add_description",
|
|
14
15
|
"functions.form.name": "name",
|
|
15
16
|
"functions.form.add_param": "add_param",
|
|
17
|
+
"expressions.data_type.timestamp": "timestamp",
|
|
18
|
+
"expressions.data_type.date": "date",
|
|
19
|
+
"expressions.data_type.number": "number",
|
|
20
|
+
"expressions.data_type.string": "string",
|
|
21
|
+
"expressions.data_type.boolean": "boolean",
|
|
22
|
+
"expressions.data_type.any": "any",
|
|
16
23
|
},
|
|
17
24
|
},
|
|
18
25
|
fallback: "lazy",
|
|
@@ -42,7 +49,7 @@ describe("<ParamSelector />", () => {
|
|
|
42
49
|
const { container, queryByText, getByRole } = render(
|
|
43
50
|
<TestFormWrapper
|
|
44
51
|
watcher={watcher}
|
|
45
|
-
type
|
|
52
|
+
context={{ type: "boolean" }}
|
|
46
53
|
defaultValues={defaultValues}
|
|
47
54
|
>
|
|
48
55
|
<ParamSelector />
|
|
@@ -51,7 +58,9 @@ describe("<ParamSelector />", () => {
|
|
|
51
58
|
);
|
|
52
59
|
await waitFor(() => expect(queryByText(/lazy/i)).not.toBeInTheDocument());
|
|
53
60
|
|
|
54
|
-
|
|
61
|
+
await act(async () => {
|
|
62
|
+
userEvent.click(getByRole("option", { name: /param1/i }));
|
|
63
|
+
});
|
|
55
64
|
|
|
56
65
|
expect(watcher).lastCalledWith({
|
|
57
66
|
params: [
|
|
@@ -61,7 +70,7 @@ describe("<ParamSelector />", () => {
|
|
|
61
70
|
type: "boolean",
|
|
62
71
|
},
|
|
63
72
|
],
|
|
64
|
-
test: { value: 1 },
|
|
73
|
+
test: { value: { id: 1 } },
|
|
65
74
|
});
|
|
66
75
|
|
|
67
76
|
expect(container).toMatchSnapshot();
|
|
@@ -78,7 +87,7 @@ describe("<ParamSelector />", () => {
|
|
|
78
87
|
render(
|
|
79
88
|
<TestFormWrapper
|
|
80
89
|
watcher={watcher}
|
|
81
|
-
type
|
|
90
|
+
context={{ type: "boolean" }}
|
|
82
91
|
defaultValues={defaultValues}
|
|
83
92
|
>
|
|
84
93
|
<FunctionParams />
|
|
@@ -88,7 +97,9 @@ describe("<ParamSelector />", () => {
|
|
|
88
97
|
);
|
|
89
98
|
await waitFor(() => expect(queryByText(/lazy/i)).not.toBeInTheDocument());
|
|
90
99
|
|
|
91
|
-
|
|
100
|
+
await act(async () =>
|
|
101
|
+
userEvent.click(await getByRole("option", { name: /param1/i }))
|
|
102
|
+
);
|
|
92
103
|
|
|
93
104
|
expect(watcher).lastCalledWith({
|
|
94
105
|
params: [
|
|
@@ -98,12 +109,13 @@ describe("<ParamSelector />", () => {
|
|
|
98
109
|
type: "boolean",
|
|
99
110
|
},
|
|
100
111
|
],
|
|
101
|
-
test: { value: 1 },
|
|
112
|
+
test: { value: { id: 1 } },
|
|
102
113
|
});
|
|
103
114
|
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
115
|
+
await act(async () => {
|
|
116
|
+
userEvent.hover(await findByRole("textbox"));
|
|
117
|
+
userEvent.click(getAllByRole("button")[0]);
|
|
118
|
+
});
|
|
107
119
|
|
|
108
120
|
expect(watcher).lastCalledWith({
|
|
109
121
|
params: [],
|
|
@@ -40,7 +40,7 @@ describe("<ShapeSelector />", () => {
|
|
|
40
40
|
const { container, queryByText, getByRole } = render(
|
|
41
41
|
<TestFormWrapper
|
|
42
42
|
watcher={watcher}
|
|
43
|
-
type
|
|
43
|
+
context={{ type: "boolean" }}
|
|
44
44
|
defaultValues={defaultValues}
|
|
45
45
|
>
|
|
46
46
|
<ShapeSelector />
|
|
@@ -69,7 +69,7 @@ describe("<ShapeSelector />", () => {
|
|
|
69
69
|
const watcher = jest.fn();
|
|
70
70
|
|
|
71
71
|
const { container, queryByText, getByRole } = render(
|
|
72
|
-
<TestFormWrapper watcher={watcher} type
|
|
72
|
+
<TestFormWrapper watcher={watcher} context={{ type: "boolean" }}>
|
|
73
73
|
<ShapeSelector />
|
|
74
74
|
</TestFormWrapper>,
|
|
75
75
|
renderOpts
|
|
@@ -89,7 +89,7 @@ describe("<ShapeSelector />", () => {
|
|
|
89
89
|
const watcher = jest.fn();
|
|
90
90
|
|
|
91
91
|
const { container, queryByText, getByRole } = render(
|
|
92
|
-
<TestFormWrapper watcher={watcher} type
|
|
92
|
+
<TestFormWrapper watcher={watcher} context={{ type: "boolean" }}>
|
|
93
93
|
<ShapeSelector />
|
|
94
94
|
</TestFormWrapper>,
|
|
95
95
|
renderOpts
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
|
2
|
+
|
|
3
|
+
exports[`<Clauses /> matches the latest snapshot 1`] = `
|
|
4
|
+
<div>
|
|
5
|
+
<div
|
|
6
|
+
class="field"
|
|
7
|
+
>
|
|
8
|
+
<label>
|
|
9
|
+
Clause
|
|
10
|
+
</label>
|
|
11
|
+
<div
|
|
12
|
+
class="ui horizontal divider"
|
|
13
|
+
>
|
|
14
|
+
<button
|
|
15
|
+
class="ui mini button"
|
|
16
|
+
>
|
|
17
|
+
Add Group
|
|
18
|
+
</button>
|
|
19
|
+
</div>
|
|
20
|
+
</div>
|
|
21
|
+
</div>
|
|
22
|
+
`;
|
|
23
|
+
|
|
24
|
+
exports[`<Clauses /> matches the latest snapshot with content 1`] = `
|
|
25
|
+
<div>
|
|
26
|
+
<div
|
|
27
|
+
class="field"
|
|
28
|
+
>
|
|
29
|
+
<label>
|
|
30
|
+
Clause
|
|
31
|
+
</label>
|
|
32
|
+
<div>
|
|
33
|
+
<div
|
|
34
|
+
class="ui segment"
|
|
35
|
+
>
|
|
36
|
+
<div
|
|
37
|
+
class="clause-and-group"
|
|
38
|
+
/>
|
|
39
|
+
<div
|
|
40
|
+
class="ui horizontal divider"
|
|
41
|
+
>
|
|
42
|
+
<button
|
|
43
|
+
class="ui mini button"
|
|
44
|
+
>
|
|
45
|
+
addExpression
|
|
46
|
+
</button>
|
|
47
|
+
</div>
|
|
48
|
+
</div>
|
|
49
|
+
<div
|
|
50
|
+
class="ui horizontal divider"
|
|
51
|
+
/>
|
|
52
|
+
</div>
|
|
53
|
+
<div
|
|
54
|
+
class="ui horizontal divider"
|
|
55
|
+
>
|
|
56
|
+
<button
|
|
57
|
+
class="ui mini button"
|
|
58
|
+
>
|
|
59
|
+
Add Group
|
|
60
|
+
</button>
|
|
61
|
+
</div>
|
|
62
|
+
</div>
|
|
63
|
+
</div>
|
|
64
|
+
`;
|
|
@@ -0,0 +1,316 @@
|
|
|
1
|
+
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
|
2
|
+
|
|
3
|
+
exports[`<Condition /> matches the latest snapshot 1`] = `
|
|
4
|
+
<div>
|
|
5
|
+
<div>
|
|
6
|
+
<div
|
|
7
|
+
class="ui grid condition-row"
|
|
8
|
+
>
|
|
9
|
+
<div
|
|
10
|
+
class="six wide column"
|
|
11
|
+
>
|
|
12
|
+
<div
|
|
13
|
+
class="ui grid"
|
|
14
|
+
>
|
|
15
|
+
<div
|
|
16
|
+
class="sixteen wide column"
|
|
17
|
+
>
|
|
18
|
+
<div
|
|
19
|
+
class="expression-container"
|
|
20
|
+
>
|
|
21
|
+
<div
|
|
22
|
+
aria-expanded="false"
|
|
23
|
+
class="ui top left pointing dropdown"
|
|
24
|
+
role="listbox"
|
|
25
|
+
tabindex="0"
|
|
26
|
+
>
|
|
27
|
+
<div
|
|
28
|
+
class="shape-selector-trigger"
|
|
29
|
+
>
|
|
30
|
+
f(x)
|
|
31
|
+
</div>
|
|
32
|
+
<div
|
|
33
|
+
class="menu transition"
|
|
34
|
+
>
|
|
35
|
+
<div
|
|
36
|
+
aria-checked="false"
|
|
37
|
+
aria-selected="false"
|
|
38
|
+
class="item"
|
|
39
|
+
role="option"
|
|
40
|
+
style="pointer-events: all;"
|
|
41
|
+
>
|
|
42
|
+
<div
|
|
43
|
+
class="text flex-center"
|
|
44
|
+
>
|
|
45
|
+
<small
|
|
46
|
+
style="margin-right: 5px;"
|
|
47
|
+
>
|
|
48
|
+
<b>
|
|
49
|
+
<code>
|
|
50
|
+
[π]
|
|
51
|
+
</code>
|
|
52
|
+
</b>
|
|
53
|
+
</small>
|
|
54
|
+
Constant
|
|
55
|
+
</div>
|
|
56
|
+
</div>
|
|
57
|
+
<div
|
|
58
|
+
aria-checked="true"
|
|
59
|
+
aria-selected="true"
|
|
60
|
+
class="active selected item"
|
|
61
|
+
role="option"
|
|
62
|
+
style="pointer-events: all;"
|
|
63
|
+
>
|
|
64
|
+
<div
|
|
65
|
+
class="text flex-center"
|
|
66
|
+
>
|
|
67
|
+
<small
|
|
68
|
+
style="margin-right: 5px;"
|
|
69
|
+
>
|
|
70
|
+
<b>
|
|
71
|
+
<code>
|
|
72
|
+
f(x)
|
|
73
|
+
</code>
|
|
74
|
+
</b>
|
|
75
|
+
</small>
|
|
76
|
+
Function
|
|
77
|
+
</div>
|
|
78
|
+
</div>
|
|
79
|
+
</div>
|
|
80
|
+
</div>
|
|
81
|
+
<div
|
|
82
|
+
class="accordion ui fluid no-margin"
|
|
83
|
+
>
|
|
84
|
+
<div
|
|
85
|
+
class="active title no-padding"
|
|
86
|
+
>
|
|
87
|
+
<div
|
|
88
|
+
class="flex-center"
|
|
89
|
+
>
|
|
90
|
+
<i
|
|
91
|
+
aria-hidden="true"
|
|
92
|
+
class="dropdown icon"
|
|
93
|
+
/>
|
|
94
|
+
<div
|
|
95
|
+
aria-expanded="false"
|
|
96
|
+
class="ui fluid search selection dropdown"
|
|
97
|
+
role="combobox"
|
|
98
|
+
>
|
|
99
|
+
<input
|
|
100
|
+
aria-autocomplete="list"
|
|
101
|
+
autocomplete="off"
|
|
102
|
+
class="search"
|
|
103
|
+
tabindex="0"
|
|
104
|
+
type="text"
|
|
105
|
+
value=""
|
|
106
|
+
/>
|
|
107
|
+
<div
|
|
108
|
+
aria-atomic="true"
|
|
109
|
+
aria-live="polite"
|
|
110
|
+
class="divider text"
|
|
111
|
+
role="alert"
|
|
112
|
+
>
|
|
113
|
+
function placeholder
|
|
114
|
+
</div>
|
|
115
|
+
<i
|
|
116
|
+
aria-hidden="true"
|
|
117
|
+
class="dropdown icon"
|
|
118
|
+
/>
|
|
119
|
+
<div
|
|
120
|
+
class="menu transition"
|
|
121
|
+
role="listbox"
|
|
122
|
+
>
|
|
123
|
+
<div
|
|
124
|
+
class="message"
|
|
125
|
+
>
|
|
126
|
+
No results found.
|
|
127
|
+
</div>
|
|
128
|
+
</div>
|
|
129
|
+
</div>
|
|
130
|
+
</div>
|
|
131
|
+
</div>
|
|
132
|
+
<div
|
|
133
|
+
class="content active no-padding"
|
|
134
|
+
/>
|
|
135
|
+
</div>
|
|
136
|
+
</div>
|
|
137
|
+
</div>
|
|
138
|
+
</div>
|
|
139
|
+
</div>
|
|
140
|
+
<div
|
|
141
|
+
class="three wide column"
|
|
142
|
+
>
|
|
143
|
+
<div
|
|
144
|
+
class="flex-justify-center"
|
|
145
|
+
>
|
|
146
|
+
<div
|
|
147
|
+
aria-expanded="false"
|
|
148
|
+
class="ui top left pointing dropdown"
|
|
149
|
+
role="listbox"
|
|
150
|
+
tabindex="0"
|
|
151
|
+
>
|
|
152
|
+
<div
|
|
153
|
+
class="condition-operator-trigger"
|
|
154
|
+
>
|
|
155
|
+
<span>
|
|
156
|
+
Select Function
|
|
157
|
+
</span>
|
|
158
|
+
</div>
|
|
159
|
+
<div
|
|
160
|
+
class="menu transition"
|
|
161
|
+
>
|
|
162
|
+
<div
|
|
163
|
+
aria-checked="false"
|
|
164
|
+
aria-selected="true"
|
|
165
|
+
class="selected item"
|
|
166
|
+
role="option"
|
|
167
|
+
style="pointer-events: all;"
|
|
168
|
+
>
|
|
169
|
+
<span
|
|
170
|
+
class="text"
|
|
171
|
+
>
|
|
172
|
+
Custom Expression
|
|
173
|
+
</span>
|
|
174
|
+
</div>
|
|
175
|
+
</div>
|
|
176
|
+
</div>
|
|
177
|
+
</div>
|
|
178
|
+
</div>
|
|
179
|
+
<div
|
|
180
|
+
class="six wide column"
|
|
181
|
+
>
|
|
182
|
+
<div
|
|
183
|
+
class="ui grid"
|
|
184
|
+
>
|
|
185
|
+
<div
|
|
186
|
+
class="sixteen wide column"
|
|
187
|
+
>
|
|
188
|
+
<div
|
|
189
|
+
class="expression-container"
|
|
190
|
+
>
|
|
191
|
+
<div
|
|
192
|
+
aria-expanded="false"
|
|
193
|
+
class="ui top left pointing dropdown"
|
|
194
|
+
role="listbox"
|
|
195
|
+
tabindex="0"
|
|
196
|
+
>
|
|
197
|
+
<div
|
|
198
|
+
class="shape-selector-trigger"
|
|
199
|
+
>
|
|
200
|
+
f(x)
|
|
201
|
+
</div>
|
|
202
|
+
<div
|
|
203
|
+
class="menu transition"
|
|
204
|
+
>
|
|
205
|
+
<div
|
|
206
|
+
aria-checked="false"
|
|
207
|
+
aria-selected="false"
|
|
208
|
+
class="item"
|
|
209
|
+
role="option"
|
|
210
|
+
style="pointer-events: all;"
|
|
211
|
+
>
|
|
212
|
+
<div
|
|
213
|
+
class="text flex-center"
|
|
214
|
+
>
|
|
215
|
+
<small
|
|
216
|
+
style="margin-right: 5px;"
|
|
217
|
+
>
|
|
218
|
+
<b>
|
|
219
|
+
<code>
|
|
220
|
+
[π]
|
|
221
|
+
</code>
|
|
222
|
+
</b>
|
|
223
|
+
</small>
|
|
224
|
+
Constant
|
|
225
|
+
</div>
|
|
226
|
+
</div>
|
|
227
|
+
<div
|
|
228
|
+
aria-checked="true"
|
|
229
|
+
aria-selected="true"
|
|
230
|
+
class="active selected item"
|
|
231
|
+
role="option"
|
|
232
|
+
style="pointer-events: all;"
|
|
233
|
+
>
|
|
234
|
+
<div
|
|
235
|
+
class="text flex-center"
|
|
236
|
+
>
|
|
237
|
+
<small
|
|
238
|
+
style="margin-right: 5px;"
|
|
239
|
+
>
|
|
240
|
+
<b>
|
|
241
|
+
<code>
|
|
242
|
+
f(x)
|
|
243
|
+
</code>
|
|
244
|
+
</b>
|
|
245
|
+
</small>
|
|
246
|
+
Function
|
|
247
|
+
</div>
|
|
248
|
+
</div>
|
|
249
|
+
</div>
|
|
250
|
+
</div>
|
|
251
|
+
<div
|
|
252
|
+
class="accordion ui fluid no-margin"
|
|
253
|
+
>
|
|
254
|
+
<div
|
|
255
|
+
class="active title no-padding"
|
|
256
|
+
>
|
|
257
|
+
<div
|
|
258
|
+
class="flex-center"
|
|
259
|
+
>
|
|
260
|
+
<i
|
|
261
|
+
aria-hidden="true"
|
|
262
|
+
class="dropdown icon"
|
|
263
|
+
/>
|
|
264
|
+
<div
|
|
265
|
+
aria-expanded="false"
|
|
266
|
+
class="ui fluid search selection dropdown"
|
|
267
|
+
role="combobox"
|
|
268
|
+
>
|
|
269
|
+
<input
|
|
270
|
+
aria-autocomplete="list"
|
|
271
|
+
autocomplete="off"
|
|
272
|
+
class="search"
|
|
273
|
+
tabindex="0"
|
|
274
|
+
type="text"
|
|
275
|
+
value=""
|
|
276
|
+
/>
|
|
277
|
+
<div
|
|
278
|
+
aria-atomic="true"
|
|
279
|
+
aria-live="polite"
|
|
280
|
+
class="divider text"
|
|
281
|
+
role="alert"
|
|
282
|
+
>
|
|
283
|
+
function placeholder
|
|
284
|
+
</div>
|
|
285
|
+
<i
|
|
286
|
+
aria-hidden="true"
|
|
287
|
+
class="dropdown icon"
|
|
288
|
+
/>
|
|
289
|
+
<div
|
|
290
|
+
class="menu transition"
|
|
291
|
+
role="listbox"
|
|
292
|
+
>
|
|
293
|
+
<div
|
|
294
|
+
class="message"
|
|
295
|
+
>
|
|
296
|
+
No results found.
|
|
297
|
+
</div>
|
|
298
|
+
</div>
|
|
299
|
+
</div>
|
|
300
|
+
</div>
|
|
301
|
+
</div>
|
|
302
|
+
<div
|
|
303
|
+
class="content active no-padding"
|
|
304
|
+
/>
|
|
305
|
+
</div>
|
|
306
|
+
</div>
|
|
307
|
+
</div>
|
|
308
|
+
</div>
|
|
309
|
+
</div>
|
|
310
|
+
<div
|
|
311
|
+
class="middle aligned one wide column"
|
|
312
|
+
/>
|
|
313
|
+
</div>
|
|
314
|
+
</div>
|
|
315
|
+
</div>
|
|
316
|
+
`;
|