@truedat/qx 7.5.7 → 7.5.10
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 +45 -64
- package/src/components/QxRoutes.js +38 -19
- package/src/components/__tests__/QxRoutes.spec.js +73 -0
- package/src/components/__tests__/__fixtures__/helper.js +6 -7
- package/src/components/__tests__/__snapshots__/QxRoutes.spec.js.snap +60 -0
- package/src/components/common/ClauseViewer.js +6 -6
- package/src/components/common/DescriptionInput.js +0 -1
- package/src/components/common/ResourceSelector.js +2 -3
- package/src/components/common/TestFormWrapper.js +2 -13
- package/src/components/common/TypeSelector.js +0 -1
- package/src/components/common/__tests__/DescriptionInput.spec.js +12 -21
- package/src/components/common/__tests__/ResourceSelector.spec.js +42 -87
- package/src/components/common/__tests__/TypeSelector.spec.js +0 -1
- package/src/components/common/__tests__/__snapshots__/ResourceSelector.spec.js.snap +32 -22
- package/src/components/common/expressions/Clauses.js +5 -6
- package/src/components/common/expressions/Condition.js +8 -9
- package/src/components/common/expressions/ConstantSelector.js +2 -2
- package/src/components/common/expressions/Expression.js +2 -2
- package/src/components/common/expressions/FieldSelector.js +2 -2
- package/src/components/common/expressions/FunctionArgs.js +5 -6
- package/src/components/common/expressions/FunctionSelector.js +2 -2
- package/src/components/common/expressions/ParamSelector.js +2 -2
- package/src/components/common/expressions/ShapeSelector.js +7 -16
- package/src/components/common/expressions/__tests__/Clauses.spec.js +10 -9
- package/src/components/common/expressions/__tests__/Condition.spec.js +6 -26
- package/src/components/common/expressions/__tests__/ConstantSelector.spec.js +14 -30
- package/src/components/common/expressions/__tests__/Expression.spec.js +36 -62
- package/src/components/common/expressions/__tests__/FieldSelector.spec.js +2 -7
- package/src/components/common/expressions/__tests__/FunctionArgs.spec.js +18 -44
- package/src/components/common/expressions/__tests__/FunctionSelector.spec.js +19 -27
- package/src/components/common/expressions/__tests__/ParamSelector.spec.js +28 -58
- package/src/components/common/expressions/__tests__/ShapeSelector.spec.js +34 -47
- package/src/components/common/expressions/__tests__/__snapshots__/Condition.spec.js.snap +6 -6
- package/src/components/common/expressions/__tests__/__snapshots__/ConstantSelector.spec.js.snap +6 -7
- package/src/components/common/expressions/__tests__/__snapshots__/Expression.spec.js.snap +20 -20
- package/src/components/common/expressions/__tests__/__snapshots__/FunctionArgs.spec.js.snap +8 -9
- package/src/components/common/expressions/__tests__/__snapshots__/FunctionSelector.spec.js.snap +670 -8
- package/src/components/common/expressions/__tests__/__snapshots__/ParamSelector.spec.js.snap +5 -5
- package/src/components/common/expressions/__tests__/__snapshots__/ShapeSelector.spec.js.snap +9 -9
- package/src/components/common/expressions/__tests__/useWatchParams.spec.js +1 -4
- package/src/components/common/expressions/constantInputs/AnySelector.js +5 -6
- package/src/components/common/expressions/constantInputs/BooleanSelector.js +2 -2
- package/src/components/common/expressions/constantInputs/DefaultSelector.js +2 -2
- package/src/components/common/expressions/constantInputs/__tests__/AnySelector.spec.js +16 -37
- package/src/components/common/expressions/constantInputs/__tests__/BooleanSelector.spec.js +14 -17
- package/src/components/common/expressions/constantInputs/__tests__/DefaultSelector.spec.js +12 -27
- package/src/components/common/expressions/constantInputs/__tests__/__snapshots__/AnySelector.spec.js.snap +11 -11
- package/src/components/common/expressions/constantInputs/__tests__/__snapshots__/DefaultSelector.spec.js.snap +0 -1
- package/src/components/common/resourceSelectors/DataStructureSelector.js +2 -2
- package/src/components/common/resourceSelectors/DataViewSelector.js +2 -2
- package/src/components/common/resourceSelectors/ReferenceDatasetSelector.js +2 -2
- package/src/components/common/resourceSelectors/__tests__/DataStructureSelector.spec.js +5 -29
- package/src/components/common/resourceSelectors/__tests__/DataViewSelector.spec.js +23 -25
- package/src/components/common/resourceSelectors/__tests__/ReferenceDatasetSelector.spec.js +21 -32
- package/src/components/common/resourceSelectors/__tests__/__snapshots__/DataStructureSelector.spec.js.snap +3 -4
- package/src/components/common/resourceSelectors/__tests__/__snapshots__/DataViewSelector.spec.js.snap +1 -1
- package/src/components/common/resourceSelectors/__tests__/__snapshots__/ReferenceDatasetSelector.spec.js.snap +1 -1
- package/src/components/dataViews/DataViewEditor.js +5 -6
- package/src/components/dataViews/DataViewSelect.js +4 -5
- package/src/components/dataViews/DataViews.js +1 -2
- package/src/components/dataViews/Queryable.js +4 -4
- package/src/components/dataViews/Queryables.js +0 -1
- package/src/components/dataViews/__tests__/DataViewEditor.spec.js +36 -111
- package/src/components/dataViews/__tests__/DataViewSelect.spec.js +0 -1
- package/src/components/dataViews/__tests__/DataViews.spec.js +15 -16
- package/src/components/dataViews/__tests__/Queryable.spec.js +0 -1
- package/src/components/dataViews/__tests__/Queryables.spec.js +35 -74
- package/src/components/dataViews/__tests__/__snapshots__/DataViewEditor.spec.js.snap +61 -55
- package/src/components/dataViews/__tests__/__snapshots__/DataViews.spec.js.snap +5 -5
- package/src/components/dataViews/__tests__/__snapshots__/Queryables.spec.js.snap +59 -59
- package/src/components/dataViews/queryableProperties/From.js +4 -4
- package/src/components/dataViews/queryableProperties/GroupBy.js +6 -6
- package/src/components/dataViews/queryableProperties/Join.js +6 -6
- package/src/components/dataViews/queryableProperties/JoinTypeIcon.js +8 -9
- package/src/components/dataViews/queryableProperties/Select.js +4 -5
- package/src/components/dataViews/queryableProperties/SelectField.js +4 -4
- package/src/components/dataViews/queryableProperties/Where.js +4 -4
- package/src/components/dataViews/queryableProperties/__tests__/From.spec.js +0 -1
- package/src/components/dataViews/queryableProperties/__tests__/GroupBy.spec.js +16 -42
- package/src/components/dataViews/queryableProperties/__tests__/Join.spec.js +6 -29
- package/src/components/dataViews/queryableProperties/__tests__/JoinTypeIcon.spec.js +0 -1
- package/src/components/dataViews/queryableProperties/__tests__/Select.spec.js +26 -50
- package/src/components/dataViews/queryableProperties/__tests__/SelectField.spec.js +19 -44
- package/src/components/dataViews/queryableProperties/__tests__/Where.spec.js +6 -17
- package/src/components/dataViews/queryableProperties/__tests__/__snapshots__/GroupBy.spec.js.snap +309 -9
- package/src/components/dataViews/queryableProperties/__tests__/__snapshots__/Join.spec.js.snap +12 -12
- package/src/components/dataViews/queryableProperties/__tests__/__snapshots__/Select.spec.js.snap +192 -18
- package/src/components/dataViews/queryableProperties/__tests__/__snapshots__/SelectField.spec.js.snap +6 -8
- package/src/components/dataViews/queryableProperties/__tests__/__snapshots__/Where.spec.js.snap +2 -2
- package/src/components/functions/FunctionEditor.js +3 -5
- package/src/components/functions/FunctionParams.js +2 -3
- package/src/components/functions/Functions.js +3 -4
- package/src/components/functions/__tests__/FunctionEditor.spec.js +61 -57
- package/src/components/functions/__tests__/FunctionParams.spec.js +50 -47
- package/src/components/functions/__tests__/Functions.spec.js +5 -12
- package/src/components/functions/__tests__/__snapshots__/FunctionParams.spec.js.snap +11 -11
- package/src/components/functions/__tests__/__snapshots__/Functions.spec.js.snap +4 -5
- package/src/components/qualityControls/ControlProperties.js +8 -7
- package/src/components/qualityControls/ControlPropertiesView.js +5 -5
- package/src/components/qualityControls/EditQualityControl.js +5 -5
- package/src/components/qualityControls/IconPopup.js +0 -1
- package/src/components/qualityControls/NewDraftQualityControl.js +8 -6
- package/src/components/qualityControls/NewQualityControl.js +5 -6
- package/src/components/qualityControls/QualityBadge.js +29 -21
- package/src/components/qualityControls/QualityControl.js +4 -7
- package/src/components/qualityControls/QualityControlActions.js +7 -7
- package/src/components/qualityControls/QualityControlCrumbs.js +1 -3
- package/src/components/qualityControls/QualityControlEditor.js +6 -12
- package/src/components/qualityControls/QualityControlHeader.js +4 -6
- package/src/components/qualityControls/QualityControlHistory.js +3 -3
- package/src/components/qualityControls/QualityControlManageDomain.js +2 -2
- package/src/components/qualityControls/QualityControlQueryModal.js +1 -1
- package/src/components/qualityControls/QualityControlRoutes.js +27 -54
- package/src/components/qualityControls/QualityControlRow.js +0 -2
- package/src/components/qualityControls/QualityControlScores.js +7 -5
- package/src/components/qualityControls/QualityControlTabs.js +2 -2
- package/src/components/qualityControls/QualityControls.js +10 -8
- package/src/components/qualityControls/QualityControlsLabelResults.js +0 -2
- package/src/components/qualityControls/QualityControlsPagination.js +0 -1
- package/src/components/qualityControls/QualityControlsTable.js +1 -2
- package/src/components/qualityControls/ScoreCriteria.js +8 -4
- package/src/components/qualityControls/ScoreCriteriaView.js +34 -54
- package/src/components/qualityControls/__tests__/ControlProperties.spec.js +16 -21
- package/src/components/qualityControls/__tests__/ControlPropertiesView.spec.js +5 -6
- package/src/components/qualityControls/__tests__/EditQualityControl.spec.js +28 -70
- package/src/components/qualityControls/__tests__/IconPopup.spec.js +10 -11
- package/src/components/qualityControls/__tests__/NewDraftQualityControl.spec.js +33 -70
- package/src/components/qualityControls/__tests__/NewQualityControl.spec.js +88 -107
- package/src/components/qualityControls/__tests__/QualityBadge.spec.js +55 -63
- package/src/components/qualityControls/__tests__/QualityControl.spec.js +19 -31
- package/src/components/qualityControls/__tests__/QualityControlActions.spec.js +49 -46
- package/src/components/qualityControls/__tests__/QualityControlCrumbs.spec.js +0 -1
- package/src/components/qualityControls/__tests__/QualityControlEditor.spec.js +68 -107
- package/src/components/qualityControls/__tests__/QualityControlHeader.spec.js +22 -25
- package/src/components/qualityControls/__tests__/QualityControlHistory.spec.js +6 -6
- package/src/components/qualityControls/__tests__/QualityControlManageDomain.spec.js +0 -1
- package/src/components/qualityControls/__tests__/QualityControlQueryModal.spec.js +13 -12
- package/src/components/qualityControls/__tests__/QualityControlRow.spec.js +4 -8
- package/src/components/qualityControls/__tests__/QualityControlScores.spec.js +23 -19
- package/src/components/qualityControls/__tests__/QualityControlTabs.spec.js +2 -3
- package/src/components/qualityControls/__tests__/QualityControls.spec.js +69 -53
- package/src/components/qualityControls/__tests__/QualityControlsLabelResults.spec.js +0 -1
- package/src/components/qualityControls/__tests__/QualityControlsPagination.spec.js +0 -1
- package/src/components/qualityControls/__tests__/QualityControlsTable.spec.js +2 -3
- package/src/components/qualityControls/__tests__/ScoreCriteria.spec.js +3 -4
- package/src/components/qualityControls/__tests__/ScoreCriteriaView.spec.js +18 -3
- package/src/components/qualityControls/__tests__/__fixtures__/qualityControlHelper.js +2 -2
- package/src/components/qualityControls/__tests__/__snapshots__/ControlProperties.spec.js.snap +1 -1
- package/src/components/qualityControls/__tests__/__snapshots__/ControlPropertiesView.spec.js.snap +53 -53
- package/src/components/qualityControls/__tests__/__snapshots__/EditQualityControl.spec.js.snap +45 -34
- package/src/components/qualityControls/__tests__/__snapshots__/NewDraftQualityControl.spec.js.snap +44 -33
- package/src/components/qualityControls/__tests__/__snapshots__/NewQualityControl.spec.js.snap +30 -19
- package/src/components/qualityControls/__tests__/__snapshots__/QualityBadge.spec.js.snap +1 -1
- package/src/components/qualityControls/__tests__/__snapshots__/QualityControl.spec.js.snap +11 -19
- package/src/components/qualityControls/__tests__/__snapshots__/QualityControlActions.spec.js.snap +5 -4
- package/src/components/qualityControls/__tests__/__snapshots__/QualityControlCrumbs.spec.js.snap +1 -0
- package/src/components/qualityControls/__tests__/__snapshots__/QualityControlEditor.spec.js.snap +28 -5
- package/src/components/qualityControls/__tests__/__snapshots__/QualityControlHeader.spec.js.snap +16 -11
- package/src/components/qualityControls/__tests__/__snapshots__/QualityControlHistory.spec.js.snap +2 -0
- package/src/components/qualityControls/__tests__/__snapshots__/QualityControlRow.spec.js.snap +2 -1
- package/src/components/qualityControls/__tests__/__snapshots__/QualityControlScores.spec.js.snap +3 -0
- package/src/components/qualityControls/__tests__/__snapshots__/QualityControlTabs.spec.js.snap +3 -0
- package/src/components/qualityControls/__tests__/__snapshots__/QualityControls.spec.js.snap +11 -21
- package/src/components/qualityControls/__tests__/__snapshots__/QualityControlsTable.spec.js.snap +2 -0
- package/src/components/qualityControls/__tests__/__snapshots__/ScoreCriteria.spec.js.snap +1 -1
- package/src/components/qualityControls/__tests__/__snapshots__/ScoreCriteriaView.spec.js.snap +2 -4
- package/src/components/qualityControls/__tests__/qualityByControlMode.spec.js +16 -16
- package/src/components/qualityControls/controlProperties/{ErrorCount.js → Count.js} +7 -7
- package/src/components/qualityControls/controlProperties/Ratio.js +6 -8
- package/src/components/qualityControls/controlProperties/__tests__/{ErrorCount.spec.js → Count.spec.js} +9 -25
- package/src/components/qualityControls/controlProperties/__tests__/Ratio.spec.js +9 -27
- package/src/components/qualityControls/controlProperties/__tests__/__snapshots__/{ErrorCount.spec.js.snap → Count.spec.js.snap} +5 -5
- package/src/components/qualityControls/controlProperties/__tests__/__snapshots__/Ratio.spec.js.snap +10 -10
- package/src/components/qualityControls/qualityByControlMode.js +39 -16
- package/src/components/qualityControls/qualityControlScoresColumns.js +1 -2
- package/src/components/qualityControls/scoreCriterias/Count.js +88 -0
- package/src/components/qualityControls/scoreCriterias/Deviation.js +2 -2
- package/src/components/qualityControls/scoreCriterias/ErrorCount.js +4 -4
- package/src/components/qualityControls/scoreCriterias/Percentage.js +2 -2
- package/src/components/qualityControls/scoreCriterias/__tests__/Count.spec.js +62 -0
- package/src/components/qualityControls/scoreCriterias/__tests__/Deviation.spec.js +0 -1
- package/src/components/qualityControls/scoreCriterias/__tests__/ErrorCount.spec.js +39 -31
- package/src/components/qualityControls/scoreCriterias/__tests__/Percentage.spec.js +23 -19
- package/src/components/qualityControls/scoreCriterias/__tests__/__snapshots__/Count.spec.js.snap +58 -0
- package/src/components/qualityControls/scoreCriterias/__tests__/__snapshots__/ErrorCount.spec.js.snap +4 -7
- package/src/components/scores/MyScoreGroups.js +0 -1
- package/src/components/scores/QualityBar.js +24 -22
- package/src/components/scores/Score.js +4 -5
- package/src/components/scores/ScoreCrumbs.js +3 -5
- package/src/components/scores/ScoreDetails.js +2 -2
- package/src/components/scores/ScoreEvents.js +2 -2
- package/src/components/scores/ScoreGroup.js +5 -4
- package/src/components/scores/ScoreGroupBreadcrumbs.js +1 -2
- package/src/components/scores/ScoreGroupForm.js +2 -4
- package/src/components/scores/ScoreGroupLink.js +1 -2
- package/src/components/scores/ScoreGroupMessage.js +0 -1
- package/src/components/scores/ScoreGroupPopup.js +1 -1
- package/src/components/scores/ScoreGroupsRoutes.js +19 -0
- package/src/components/scores/ScoreGroupsTable.js +15 -48
- package/src/components/scores/ScoreRoutes.js +9 -24
- package/src/components/scores/ScoreStatusDecorator.js +1 -2
- package/src/components/scores/ScoreTabs.js +2 -2
- package/src/components/scores/__tests__/MyScoreGroups.spec.js +2 -3
- package/src/components/scores/__tests__/QualityBar.spec.js +19 -26
- package/src/components/scores/__tests__/Score.spec.js +2 -3
- package/src/components/scores/__tests__/ScoreCrumbs.spec.js +4 -5
- package/src/components/scores/__tests__/ScoreDetails.spec.js +4 -5
- package/src/components/scores/__tests__/ScoreEvents.spec.js +2 -3
- package/src/components/scores/__tests__/ScoreGroup.spec.js +15 -14
- package/src/components/scores/__tests__/ScoreGroupBreadcrumbs.spec.js +0 -1
- package/src/components/scores/__tests__/ScoreGroupForm.spec.js +18 -34
- package/src/components/scores/__tests__/ScoreGroupLink.spec.js +0 -1
- package/src/components/scores/__tests__/ScoreGroupMessage.spec.js +0 -1
- package/src/components/scores/__tests__/ScoreGroupPopup.spec.js +0 -2
- package/src/components/scores/__tests__/ScoreGroupsRoutes.spec.js +32 -0
- package/src/components/scores/__tests__/ScoreGroupsTable.spec.js +0 -1
- package/src/components/scores/__tests__/ScoreStatusDecorator.spec.js +0 -1
- package/src/components/scores/__tests__/ScoreTabs.spec.js +3 -4
- package/src/components/scores/__tests__/__snapshots__/MyScoreGroups.spec.js.snap +2 -0
- package/src/components/scores/__tests__/__snapshots__/Score.spec.js.snap +4 -0
- package/src/components/scores/__tests__/__snapshots__/ScoreCrumbs.spec.js.snap +2 -0
- package/src/components/scores/__tests__/__snapshots__/ScoreDetails.spec.js.snap +1 -0
- package/src/components/scores/__tests__/__snapshots__/ScoreGroup.spec.js.snap +39 -10
- package/src/components/scores/__tests__/__snapshots__/ScoreGroupBreadcrumbs.spec.js.snap +1 -0
- package/src/components/scores/__tests__/__snapshots__/ScoreGroupForm.spec.js.snap +10 -10
- package/src/components/scores/__tests__/__snapshots__/ScoreGroupLink.spec.js.snap +1 -0
- package/src/components/scores/__tests__/__snapshots__/ScoreGroupsRoutes.spec.js.snap +19 -0
- package/src/components/scores/__tests__/__snapshots__/ScoreGroupsTable.spec.js.snap +2 -0
- package/src/components/scores/__tests__/__snapshots__/ScoreStatusDecorator.spec.js.snap +5 -0
- package/src/components/scores/__tests__/__snapshots__/ScoreTabs.spec.js.snap +4 -0
- package/src/hooks/__tests__/useDataViews.spec.js +1 -1
- package/src/hooks/__tests__/useFunctions.spec.js +5 -5
- package/src/hooks/useDataViews.js +2 -2
- package/src/hooks/useExecutionGroups.js +1 -1
- package/src/hooks/useFunctions.js +4 -4
- package/src/hooks/useQualityControls.js +13 -7
- package/src/hooks/useScoreGroups.js +1 -1
- package/src/hooks/useScores.js +2 -2
- package/src/styles/scores.less +21 -21
- package/src/types.js +1 -4
|
@@ -26,7 +26,7 @@ exports[`<Queryables /> matches the latest snapshot with from queryable 1`] = `
|
|
|
26
26
|
<div
|
|
27
27
|
class="ui blue ribbon label"
|
|
28
28
|
>
|
|
29
|
-
from
|
|
29
|
+
dataViews.form.queryable.from
|
|
30
30
|
</div>
|
|
31
31
|
</div>
|
|
32
32
|
<div
|
|
@@ -36,14 +36,14 @@ exports[`<Queryables /> matches the latest snapshot with from queryable 1`] = `
|
|
|
36
36
|
class="field"
|
|
37
37
|
>
|
|
38
38
|
<label>
|
|
39
|
-
alias
|
|
39
|
+
dataViews.form.queryable.alias
|
|
40
40
|
</label>
|
|
41
41
|
<div
|
|
42
42
|
class="ui input"
|
|
43
43
|
>
|
|
44
44
|
<input
|
|
45
45
|
autocomplete="off"
|
|
46
|
-
placeholder="alias"
|
|
46
|
+
placeholder="dataViews.form.queryable.alias"
|
|
47
47
|
type="text"
|
|
48
48
|
value=""
|
|
49
49
|
/>
|
|
@@ -57,7 +57,7 @@ exports[`<Queryables /> matches the latest snapshot with from queryable 1`] = `
|
|
|
57
57
|
class="required field"
|
|
58
58
|
>
|
|
59
59
|
<label>
|
|
60
|
-
resource
|
|
60
|
+
queryables.form.resource
|
|
61
61
|
</label>
|
|
62
62
|
<div
|
|
63
63
|
aria-expanded="false"
|
|
@@ -71,7 +71,7 @@ exports[`<Queryables /> matches the latest snapshot with from queryable 1`] = `
|
|
|
71
71
|
class="divider default text"
|
|
72
72
|
role="alert"
|
|
73
73
|
>
|
|
74
|
-
type
|
|
74
|
+
queryables.resource.type
|
|
75
75
|
</div>
|
|
76
76
|
<i
|
|
77
77
|
aria-hidden="true"
|
|
@@ -90,7 +90,7 @@ exports[`<Queryables /> matches the latest snapshot with from queryable 1`] = `
|
|
|
90
90
|
<span
|
|
91
91
|
class="text"
|
|
92
92
|
>
|
|
93
|
-
data_structure
|
|
93
|
+
queryables.resource.type.data_structure
|
|
94
94
|
</span>
|
|
95
95
|
</div>
|
|
96
96
|
</div>
|
|
@@ -112,22 +112,22 @@ exports[`<Queryables /> matches the latest snapshot with from queryable 1`] = `
|
|
|
112
112
|
<button
|
|
113
113
|
class="ui button"
|
|
114
114
|
>
|
|
115
|
-
join
|
|
115
|
+
dataViews.form.queryable.join
|
|
116
116
|
</button>
|
|
117
117
|
<button
|
|
118
118
|
class="ui button"
|
|
119
119
|
>
|
|
120
|
-
where
|
|
120
|
+
dataViews.form.queryable.where
|
|
121
121
|
</button>
|
|
122
122
|
<button
|
|
123
123
|
class="ui button"
|
|
124
124
|
>
|
|
125
|
-
select
|
|
125
|
+
dataViews.form.queryable.select
|
|
126
126
|
</button>
|
|
127
127
|
<button
|
|
128
128
|
class="ui button"
|
|
129
129
|
>
|
|
130
|
-
group_by
|
|
130
|
+
dataViews.form.queryable.group_by
|
|
131
131
|
</button>
|
|
132
132
|
</div>
|
|
133
133
|
</div>
|
|
@@ -161,7 +161,7 @@ exports[`<Queryables /> matches the latest snapshot with from queryable 2`] = `
|
|
|
161
161
|
<div
|
|
162
162
|
class="ui blue ribbon label"
|
|
163
163
|
>
|
|
164
|
-
group_by
|
|
164
|
+
dataViews.form.queryable.group_by
|
|
165
165
|
</div>
|
|
166
166
|
</div>
|
|
167
167
|
<div
|
|
@@ -171,14 +171,14 @@ exports[`<Queryables /> matches the latest snapshot with from queryable 2`] = `
|
|
|
171
171
|
class="field"
|
|
172
172
|
>
|
|
173
173
|
<label>
|
|
174
|
-
alias
|
|
174
|
+
dataViews.form.queryable.alias
|
|
175
175
|
</label>
|
|
176
176
|
<div
|
|
177
177
|
class="ui input"
|
|
178
178
|
>
|
|
179
179
|
<input
|
|
180
180
|
autocomplete="off"
|
|
181
|
-
placeholder="alias"
|
|
181
|
+
placeholder="dataViews.form.queryable.alias"
|
|
182
182
|
type="text"
|
|
183
183
|
value=""
|
|
184
184
|
/>
|
|
@@ -192,7 +192,7 @@ exports[`<Queryables /> matches the latest snapshot with from queryable 2`] = `
|
|
|
192
192
|
class="required field"
|
|
193
193
|
>
|
|
194
194
|
<label>
|
|
195
|
-
group_fields
|
|
195
|
+
queryables.group_by.form.group_fields
|
|
196
196
|
</label>
|
|
197
197
|
<div
|
|
198
198
|
class="ui list"
|
|
@@ -205,7 +205,7 @@ exports[`<Queryables /> matches the latest snapshot with from queryable 2`] = `
|
|
|
205
205
|
<button
|
|
206
206
|
class="ui button"
|
|
207
207
|
>
|
|
208
|
-
add_group_field
|
|
208
|
+
queryables.group_by.form.add_group_field
|
|
209
209
|
</button>
|
|
210
210
|
</div>
|
|
211
211
|
</div>
|
|
@@ -214,7 +214,7 @@ exports[`<Queryables /> matches the latest snapshot with from queryable 2`] = `
|
|
|
214
214
|
class="field"
|
|
215
215
|
>
|
|
216
216
|
<label>
|
|
217
|
-
aggregate_fields
|
|
217
|
+
queryables.group_by.form.aggregate_fields
|
|
218
218
|
</label>
|
|
219
219
|
<div
|
|
220
220
|
class="ui list"
|
|
@@ -227,7 +227,7 @@ exports[`<Queryables /> matches the latest snapshot with from queryable 2`] = `
|
|
|
227
227
|
<button
|
|
228
228
|
class="ui button"
|
|
229
229
|
>
|
|
230
|
-
add_aggregate_field
|
|
230
|
+
queryables.group_by.form.add_aggregate_field
|
|
231
231
|
</button>
|
|
232
232
|
</div>
|
|
233
233
|
</div>
|
|
@@ -248,22 +248,22 @@ exports[`<Queryables /> matches the latest snapshot with from queryable 2`] = `
|
|
|
248
248
|
<button
|
|
249
249
|
class="ui button"
|
|
250
250
|
>
|
|
251
|
-
join
|
|
251
|
+
dataViews.form.queryable.join
|
|
252
252
|
</button>
|
|
253
253
|
<button
|
|
254
254
|
class="ui button"
|
|
255
255
|
>
|
|
256
|
-
where
|
|
256
|
+
dataViews.form.queryable.where
|
|
257
257
|
</button>
|
|
258
258
|
<button
|
|
259
259
|
class="ui button"
|
|
260
260
|
>
|
|
261
|
-
select
|
|
261
|
+
dataViews.form.queryable.select
|
|
262
262
|
</button>
|
|
263
263
|
<button
|
|
264
264
|
class="ui button"
|
|
265
265
|
>
|
|
266
|
-
group_by
|
|
266
|
+
dataViews.form.queryable.group_by
|
|
267
267
|
</button>
|
|
268
268
|
</div>
|
|
269
269
|
</div>
|
|
@@ -297,7 +297,7 @@ exports[`<Queryables /> matches the latest snapshot with join queryable 1`] = `
|
|
|
297
297
|
<div
|
|
298
298
|
class="ui blue ribbon label"
|
|
299
299
|
>
|
|
300
|
-
join
|
|
300
|
+
dataViews.form.queryable.join
|
|
301
301
|
</div>
|
|
302
302
|
</div>
|
|
303
303
|
<div
|
|
@@ -307,14 +307,14 @@ exports[`<Queryables /> matches the latest snapshot with join queryable 1`] = `
|
|
|
307
307
|
class="field"
|
|
308
308
|
>
|
|
309
309
|
<label>
|
|
310
|
-
alias
|
|
310
|
+
dataViews.form.queryable.alias
|
|
311
311
|
</label>
|
|
312
312
|
<div
|
|
313
313
|
class="ui input"
|
|
314
314
|
>
|
|
315
315
|
<input
|
|
316
316
|
autocomplete="off"
|
|
317
|
-
placeholder="alias"
|
|
317
|
+
placeholder="dataViews.form.queryable.alias"
|
|
318
318
|
type="text"
|
|
319
319
|
value=""
|
|
320
320
|
/>
|
|
@@ -328,7 +328,7 @@ exports[`<Queryables /> matches the latest snapshot with join queryable 1`] = `
|
|
|
328
328
|
class="required field"
|
|
329
329
|
>
|
|
330
330
|
<label>
|
|
331
|
-
resource
|
|
331
|
+
queryables.form.resource
|
|
332
332
|
</label>
|
|
333
333
|
<div
|
|
334
334
|
aria-expanded="false"
|
|
@@ -342,7 +342,7 @@ exports[`<Queryables /> matches the latest snapshot with join queryable 1`] = `
|
|
|
342
342
|
class="divider default text"
|
|
343
343
|
role="alert"
|
|
344
344
|
>
|
|
345
|
-
type
|
|
345
|
+
queryables.resource.type
|
|
346
346
|
</div>
|
|
347
347
|
<i
|
|
348
348
|
aria-hidden="true"
|
|
@@ -361,7 +361,7 @@ exports[`<Queryables /> matches the latest snapshot with join queryable 1`] = `
|
|
|
361
361
|
<span
|
|
362
362
|
class="text"
|
|
363
363
|
>
|
|
364
|
-
data_structure
|
|
364
|
+
queryables.resource.type.data_structure
|
|
365
365
|
</span>
|
|
366
366
|
</div>
|
|
367
367
|
</div>
|
|
@@ -374,12 +374,12 @@ exports[`<Queryables /> matches the latest snapshot with join queryable 1`] = `
|
|
|
374
374
|
class="field"
|
|
375
375
|
>
|
|
376
376
|
<label>
|
|
377
|
-
type
|
|
377
|
+
queryables.form.join.type
|
|
378
378
|
</label>
|
|
379
379
|
<div
|
|
380
380
|
aria-expanded="false"
|
|
381
381
|
class="ui selection dropdown select-field-dropdown"
|
|
382
|
-
label="alias"
|
|
382
|
+
label="dataViews.form.queryable.alias"
|
|
383
383
|
role="listbox"
|
|
384
384
|
tabindex="0"
|
|
385
385
|
>
|
|
@@ -403,7 +403,7 @@ exports[`<Queryables /> matches the latest snapshot with join queryable 1`] = `
|
|
|
403
403
|
class="circle circle-right"
|
|
404
404
|
/>
|
|
405
405
|
</div>
|
|
406
|
-
inner
|
|
406
|
+
joinType.inner
|
|
407
407
|
</div>
|
|
408
408
|
<i
|
|
409
409
|
aria-hidden="true"
|
|
@@ -436,7 +436,7 @@ exports[`<Queryables /> matches the latest snapshot with join queryable 1`] = `
|
|
|
436
436
|
<span
|
|
437
437
|
class="text"
|
|
438
438
|
>
|
|
439
|
-
inner
|
|
439
|
+
joinType.inner
|
|
440
440
|
</span>
|
|
441
441
|
</div>
|
|
442
442
|
<div
|
|
@@ -463,7 +463,7 @@ exports[`<Queryables /> matches the latest snapshot with join queryable 1`] = `
|
|
|
463
463
|
<span
|
|
464
464
|
class="text"
|
|
465
465
|
>
|
|
466
|
-
left
|
|
466
|
+
joinType.left
|
|
467
467
|
</span>
|
|
468
468
|
</div>
|
|
469
469
|
<div
|
|
@@ -490,7 +490,7 @@ exports[`<Queryables /> matches the latest snapshot with join queryable 1`] = `
|
|
|
490
490
|
<span
|
|
491
491
|
class="text"
|
|
492
492
|
>
|
|
493
|
-
right
|
|
493
|
+
joinType.right
|
|
494
494
|
</span>
|
|
495
495
|
</div>
|
|
496
496
|
<div
|
|
@@ -517,7 +517,7 @@ exports[`<Queryables /> matches the latest snapshot with join queryable 1`] = `
|
|
|
517
517
|
<span
|
|
518
518
|
class="text"
|
|
519
519
|
>
|
|
520
|
-
full_outer
|
|
520
|
+
joinType.full_outer
|
|
521
521
|
</span>
|
|
522
522
|
</div>
|
|
523
523
|
</div>
|
|
@@ -531,7 +531,7 @@ exports[`<Queryables /> matches the latest snapshot with join queryable 1`] = `
|
|
|
531
531
|
class="field"
|
|
532
532
|
>
|
|
533
533
|
<label>
|
|
534
|
-
clause
|
|
534
|
+
expression.form.clause
|
|
535
535
|
</label>
|
|
536
536
|
<div
|
|
537
537
|
class="ui horizontal divider"
|
|
@@ -539,7 +539,7 @@ exports[`<Queryables /> matches the latest snapshot with join queryable 1`] = `
|
|
|
539
539
|
<button
|
|
540
540
|
class="ui mini button"
|
|
541
541
|
>
|
|
542
|
-
addGroup
|
|
542
|
+
expression.clause.action.addGroup
|
|
543
543
|
</button>
|
|
544
544
|
</div>
|
|
545
545
|
</div>
|
|
@@ -560,22 +560,22 @@ exports[`<Queryables /> matches the latest snapshot with join queryable 1`] = `
|
|
|
560
560
|
<button
|
|
561
561
|
class="ui button"
|
|
562
562
|
>
|
|
563
|
-
join
|
|
563
|
+
dataViews.form.queryable.join
|
|
564
564
|
</button>
|
|
565
565
|
<button
|
|
566
566
|
class="ui button"
|
|
567
567
|
>
|
|
568
|
-
where
|
|
568
|
+
dataViews.form.queryable.where
|
|
569
569
|
</button>
|
|
570
570
|
<button
|
|
571
571
|
class="ui button"
|
|
572
572
|
>
|
|
573
|
-
select
|
|
573
|
+
dataViews.form.queryable.select
|
|
574
574
|
</button>
|
|
575
575
|
<button
|
|
576
576
|
class="ui button"
|
|
577
577
|
>
|
|
578
|
-
group_by
|
|
578
|
+
dataViews.form.queryable.group_by
|
|
579
579
|
</button>
|
|
580
580
|
</div>
|
|
581
581
|
</div>
|
|
@@ -609,7 +609,7 @@ exports[`<Queryables /> matches the latest snapshot with select queryable 1`] =
|
|
|
609
609
|
<div
|
|
610
610
|
class="ui blue ribbon label"
|
|
611
611
|
>
|
|
612
|
-
select
|
|
612
|
+
dataViews.form.queryable.select
|
|
613
613
|
</div>
|
|
614
614
|
</div>
|
|
615
615
|
<div
|
|
@@ -619,14 +619,14 @@ exports[`<Queryables /> matches the latest snapshot with select queryable 1`] =
|
|
|
619
619
|
class="field"
|
|
620
620
|
>
|
|
621
621
|
<label>
|
|
622
|
-
alias
|
|
622
|
+
dataViews.form.queryable.alias
|
|
623
623
|
</label>
|
|
624
624
|
<div
|
|
625
625
|
class="ui input"
|
|
626
626
|
>
|
|
627
627
|
<input
|
|
628
628
|
autocomplete="off"
|
|
629
|
-
placeholder="alias"
|
|
629
|
+
placeholder="dataViews.form.queryable.alias"
|
|
630
630
|
type="text"
|
|
631
631
|
value=""
|
|
632
632
|
/>
|
|
@@ -647,14 +647,14 @@ exports[`<Queryables /> matches the latest snapshot with select queryable 1`] =
|
|
|
647
647
|
<button
|
|
648
648
|
class="ui button"
|
|
649
649
|
>
|
|
650
|
-
add_select_field
|
|
650
|
+
queryables.select.form.add_select_field
|
|
651
651
|
</button>
|
|
652
652
|
<button
|
|
653
653
|
class="ui disabled button"
|
|
654
654
|
disabled=""
|
|
655
655
|
tabindex="-1"
|
|
656
656
|
>
|
|
657
|
-
add_all_select_fields
|
|
657
|
+
queryables.select.form.add_all_select_fields
|
|
658
658
|
</button>
|
|
659
659
|
</div>
|
|
660
660
|
</div>
|
|
@@ -674,22 +674,22 @@ exports[`<Queryables /> matches the latest snapshot with select queryable 1`] =
|
|
|
674
674
|
<button
|
|
675
675
|
class="ui button"
|
|
676
676
|
>
|
|
677
|
-
join
|
|
677
|
+
dataViews.form.queryable.join
|
|
678
678
|
</button>
|
|
679
679
|
<button
|
|
680
680
|
class="ui button"
|
|
681
681
|
>
|
|
682
|
-
where
|
|
682
|
+
dataViews.form.queryable.where
|
|
683
683
|
</button>
|
|
684
684
|
<button
|
|
685
685
|
class="ui button"
|
|
686
686
|
>
|
|
687
|
-
select
|
|
687
|
+
dataViews.form.queryable.select
|
|
688
688
|
</button>
|
|
689
689
|
<button
|
|
690
690
|
class="ui button"
|
|
691
691
|
>
|
|
692
|
-
group_by
|
|
692
|
+
dataViews.form.queryable.group_by
|
|
693
693
|
</button>
|
|
694
694
|
</div>
|
|
695
695
|
</div>
|
|
@@ -723,7 +723,7 @@ exports[`<Queryables /> test delete queryable 1`] = `
|
|
|
723
723
|
<div
|
|
724
724
|
class="ui blue ribbon label"
|
|
725
725
|
>
|
|
726
|
-
from
|
|
726
|
+
dataViews.form.queryable.from
|
|
727
727
|
</div>
|
|
728
728
|
</div>
|
|
729
729
|
<div
|
|
@@ -733,14 +733,14 @@ exports[`<Queryables /> test delete queryable 1`] = `
|
|
|
733
733
|
class="field"
|
|
734
734
|
>
|
|
735
735
|
<label>
|
|
736
|
-
alias
|
|
736
|
+
dataViews.form.queryable.alias
|
|
737
737
|
</label>
|
|
738
738
|
<div
|
|
739
739
|
class="ui input"
|
|
740
740
|
>
|
|
741
741
|
<input
|
|
742
742
|
autocomplete="off"
|
|
743
|
-
placeholder="alias"
|
|
743
|
+
placeholder="dataViews.form.queryable.alias"
|
|
744
744
|
type="text"
|
|
745
745
|
value=""
|
|
746
746
|
/>
|
|
@@ -754,7 +754,7 @@ exports[`<Queryables /> test delete queryable 1`] = `
|
|
|
754
754
|
class="required field"
|
|
755
755
|
>
|
|
756
756
|
<label>
|
|
757
|
-
resource
|
|
757
|
+
queryables.form.resource
|
|
758
758
|
</label>
|
|
759
759
|
<div
|
|
760
760
|
aria-expanded="false"
|
|
@@ -768,7 +768,7 @@ exports[`<Queryables /> test delete queryable 1`] = `
|
|
|
768
768
|
class="divider default text"
|
|
769
769
|
role="alert"
|
|
770
770
|
>
|
|
771
|
-
type
|
|
771
|
+
queryables.resource.type
|
|
772
772
|
</div>
|
|
773
773
|
<i
|
|
774
774
|
aria-hidden="true"
|
|
@@ -787,7 +787,7 @@ exports[`<Queryables /> test delete queryable 1`] = `
|
|
|
787
787
|
<span
|
|
788
788
|
class="text"
|
|
789
789
|
>
|
|
790
|
-
data_structure
|
|
790
|
+
queryables.resource.type.data_structure
|
|
791
791
|
</span>
|
|
792
792
|
</div>
|
|
793
793
|
</div>
|
|
@@ -809,22 +809,22 @@ exports[`<Queryables /> test delete queryable 1`] = `
|
|
|
809
809
|
<button
|
|
810
810
|
class="ui button"
|
|
811
811
|
>
|
|
812
|
-
join
|
|
812
|
+
dataViews.form.queryable.join
|
|
813
813
|
</button>
|
|
814
814
|
<button
|
|
815
815
|
class="ui button"
|
|
816
816
|
>
|
|
817
|
-
where
|
|
817
|
+
dataViews.form.queryable.where
|
|
818
818
|
</button>
|
|
819
819
|
<button
|
|
820
820
|
class="ui button"
|
|
821
821
|
>
|
|
822
|
-
select
|
|
822
|
+
dataViews.form.queryable.select
|
|
823
823
|
</button>
|
|
824
824
|
<button
|
|
825
825
|
class="ui button"
|
|
826
826
|
>
|
|
827
|
-
group_by
|
|
827
|
+
dataViews.form.queryable.group_by
|
|
828
828
|
</button>
|
|
829
829
|
</div>
|
|
830
830
|
</div>
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { use } from "react";
|
|
2
2
|
|
|
3
3
|
import ResourceSelector from "@truedat/qx/components/common/ResourceSelector";
|
|
4
4
|
import QxContext from "@truedat/qx/components/QxContext";
|
|
5
5
|
|
|
6
6
|
export default function From() {
|
|
7
|
-
const context =
|
|
7
|
+
const context = use(QxContext);
|
|
8
8
|
const { field } = context;
|
|
9
9
|
|
|
10
10
|
return (
|
|
11
|
-
<QxContext
|
|
11
|
+
<QxContext value={{ ...context, field: `${field}.resource` }}>
|
|
12
12
|
<ResourceSelector required />
|
|
13
|
-
</QxContext
|
|
13
|
+
</QxContext>
|
|
14
14
|
);
|
|
15
15
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import _ from "lodash/fp";
|
|
2
|
-
import
|
|
2
|
+
import { use } from "react";
|
|
3
3
|
import { useIntl } from "react-intl";
|
|
4
4
|
import { useFieldArray, useFormState } from "react-hook-form";
|
|
5
5
|
import { Button, Form, List, Popup } from "semantic-ui-react";
|
|
@@ -9,7 +9,7 @@ import SelectField, { newSelectField } from "./SelectField";
|
|
|
9
9
|
|
|
10
10
|
export default function GroupBy() {
|
|
11
11
|
const { formatMessage } = useIntl();
|
|
12
|
-
const context =
|
|
12
|
+
const context = use(QxContext);
|
|
13
13
|
const { field } = context;
|
|
14
14
|
const {
|
|
15
15
|
fields: groupFields,
|
|
@@ -58,7 +58,7 @@ export default function GroupBy() {
|
|
|
58
58
|
<List>
|
|
59
59
|
{groupFields.map((selectField, index) => (
|
|
60
60
|
<List.Item key={selectField.id}>
|
|
61
|
-
<QxContext
|
|
61
|
+
<QxContext
|
|
62
62
|
value={{
|
|
63
63
|
...context,
|
|
64
64
|
field: `${field}.group_fields[${index}]`,
|
|
@@ -66,7 +66,7 @@ export default function GroupBy() {
|
|
|
66
66
|
}}
|
|
67
67
|
>
|
|
68
68
|
<SelectField onDelete={() => removeGroupField(index)} />
|
|
69
|
-
</QxContext
|
|
69
|
+
</QxContext>
|
|
70
70
|
</List.Item>
|
|
71
71
|
))}
|
|
72
72
|
<List.Item>
|
|
@@ -91,7 +91,7 @@ export default function GroupBy() {
|
|
|
91
91
|
<List>
|
|
92
92
|
{aggregateFields.map((selectField, index) => (
|
|
93
93
|
<List.Item key={selectField.id}>
|
|
94
|
-
<QxContext
|
|
94
|
+
<QxContext
|
|
95
95
|
value={{
|
|
96
96
|
...context,
|
|
97
97
|
field: `${field}.aggregate_fields[${index}]`,
|
|
@@ -100,7 +100,7 @@ export default function GroupBy() {
|
|
|
100
100
|
}}
|
|
101
101
|
>
|
|
102
102
|
<SelectField onDelete={() => removeAggregateField(index)} />
|
|
103
|
-
</QxContext
|
|
103
|
+
</QxContext>
|
|
104
104
|
</List.Item>
|
|
105
105
|
))}
|
|
106
106
|
<List.Item>
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import _ from "lodash/fp";
|
|
2
|
-
import
|
|
2
|
+
import { use } from "react";
|
|
3
3
|
import { useIntl } from "react-intl";
|
|
4
4
|
import { Clauses } from "@truedat/qx/components/common/expressions";
|
|
5
5
|
import { Controller, useFormContext } from "react-hook-form";
|
|
@@ -10,7 +10,7 @@ import JoinTypeIcon from "./JoinTypeIcon";
|
|
|
10
10
|
|
|
11
11
|
export default function Join() {
|
|
12
12
|
const { formatMessage } = useIntl();
|
|
13
|
-
const context =
|
|
13
|
+
const context = use(QxContext);
|
|
14
14
|
const { control } = useFormContext();
|
|
15
15
|
const { field } = context;
|
|
16
16
|
|
|
@@ -25,9 +25,9 @@ export default function Join() {
|
|
|
25
25
|
|
|
26
26
|
return (
|
|
27
27
|
<>
|
|
28
|
-
<QxContext
|
|
28
|
+
<QxContext value={{ ...context, field: `${field}.resource` }}>
|
|
29
29
|
<ResourceSelector required />
|
|
30
|
-
</QxContext
|
|
30
|
+
</QxContext>
|
|
31
31
|
<div className="vertical-space">
|
|
32
32
|
<Controller
|
|
33
33
|
control={control}
|
|
@@ -53,9 +53,9 @@ export default function Join() {
|
|
|
53
53
|
/>
|
|
54
54
|
</div>
|
|
55
55
|
<div className="vertical-space">
|
|
56
|
-
<QxContext
|
|
56
|
+
<QxContext value={{ ...context, field: `${field}.clauses` }}>
|
|
57
57
|
<Clauses />
|
|
58
|
-
</QxContext
|
|
58
|
+
</QxContext>
|
|
59
59
|
</div>
|
|
60
60
|
</>
|
|
61
61
|
);
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import React from "react";
|
|
2
1
|
import PropTypes from "prop-types";
|
|
3
2
|
|
|
4
3
|
export const JoinTypeIcon = ({ type }) => {
|
|
@@ -7,36 +6,36 @@ export const JoinTypeIcon = ({ type }) => {
|
|
|
7
6
|
return (
|
|
8
7
|
<div className="join_type">
|
|
9
8
|
<div className="circle circle-left">
|
|
10
|
-
<div className="circle circle-center fill"
|
|
9
|
+
<div className="circle circle-center fill" />
|
|
11
10
|
</div>
|
|
12
|
-
<div className="circle circle-right"
|
|
11
|
+
<div className="circle circle-right" />
|
|
13
12
|
</div>
|
|
14
13
|
);
|
|
15
14
|
case "left":
|
|
16
15
|
return (
|
|
17
16
|
<div className="join_type">
|
|
18
17
|
<div className="circle circle-left fill">
|
|
19
|
-
<div className="circle circle-center fill"
|
|
18
|
+
<div className="circle circle-center fill" />
|
|
20
19
|
</div>
|
|
21
|
-
<div className="circle circle-right"
|
|
20
|
+
<div className="circle circle-right" />
|
|
22
21
|
</div>
|
|
23
22
|
);
|
|
24
23
|
case "right":
|
|
25
24
|
return (
|
|
26
25
|
<div className="join_type">
|
|
27
26
|
<div className="circle circle-left">
|
|
28
|
-
<div className="circle circle-center fill"
|
|
27
|
+
<div className="circle circle-center fill" />
|
|
29
28
|
</div>
|
|
30
|
-
<div className="circle circle-right fill"
|
|
29
|
+
<div className="circle circle-right fill" />
|
|
31
30
|
</div>
|
|
32
31
|
);
|
|
33
32
|
case "full_outer":
|
|
34
33
|
return (
|
|
35
34
|
<div className="join_type">
|
|
36
35
|
<div className="circle circle-left fill">
|
|
37
|
-
<div className="circle circle-center fill"
|
|
36
|
+
<div className="circle circle-center fill" />
|
|
38
37
|
</div>
|
|
39
|
-
<div className="circle circle-right fill"
|
|
38
|
+
<div className="circle circle-right fill" />
|
|
40
39
|
</div>
|
|
41
40
|
);
|
|
42
41
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import _ from "lodash/fp";
|
|
2
|
-
import
|
|
2
|
+
import { use } from "react";
|
|
3
3
|
import { useIntl } from "react-intl";
|
|
4
4
|
import { useFieldArray, useFormState } from "react-hook-form";
|
|
5
5
|
import { Button, List, Popup } from "semantic-ui-react";
|
|
@@ -8,7 +8,7 @@ import SelectField, { newSelectField } from "./SelectField";
|
|
|
8
8
|
|
|
9
9
|
export default function Select() {
|
|
10
10
|
const { formatMessage } = useIntl();
|
|
11
|
-
const context =
|
|
11
|
+
const context = use(QxContext);
|
|
12
12
|
const { field, fields: ctxFields } = context;
|
|
13
13
|
const { fields, append, remove } = useFieldArray({
|
|
14
14
|
name: `${field}.fields`,
|
|
@@ -39,11 +39,11 @@ export default function Select() {
|
|
|
39
39
|
<List>
|
|
40
40
|
{fields.map((selectField, index) => (
|
|
41
41
|
<List.Item key={selectField.key}>
|
|
42
|
-
<QxContext
|
|
42
|
+
<QxContext
|
|
43
43
|
value={{ ...context, field: `${field}.fields[${index}]`, index }}
|
|
44
44
|
>
|
|
45
45
|
<SelectField onDelete={() => remove(index)} />
|
|
46
|
-
</QxContext
|
|
46
|
+
</QxContext>
|
|
47
47
|
</List.Item>
|
|
48
48
|
))}
|
|
49
49
|
<List.Item>
|
|
@@ -59,7 +59,6 @@ export default function Select() {
|
|
|
59
59
|
) : (
|
|
60
60
|
addFieldButton
|
|
61
61
|
)}
|
|
62
|
-
|
|
63
62
|
{_.size(fields) == 0 ? (
|
|
64
63
|
<Button
|
|
65
64
|
onClick={() => append(allFields)}
|