@pareto-engineering/design-system 2.0.0-alpha.46 → 2.0.0-alpha.49
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/dist/cjs/f/FormInput/FormInput.js +7 -0
- package/dist/cjs/f/fields/QueryCombobox/QueryCombobox.js +33 -11
- package/dist/cjs/f/fields/QueryCombobox/common/Combobox/Combobox.js +20 -9
- package/dist/cjs/f/fields/QueryCombobox/common/MultipleCombobox/MultipleCombobox.js +40 -17
- package/dist/cjs/f/fields/QueryCombobox/common/index.js +9 -1
- package/dist/cjs/f/fields/QueryCombobox/styles.scss +11 -5
- package/dist/cjs/f/fields/QuerySelect/QuerySelect.js +201 -0
- package/dist/cjs/f/fields/QuerySelect/index.js +15 -0
- package/dist/cjs/f/fields/QuerySelect/styles.scss +21 -0
- package/dist/cjs/f/fields/SelectInput/SelectInput.js +15 -3
- package/dist/cjs/f/fields/SelectInput/styles.scss +27 -14
- package/dist/cjs/f/fields/index.js +9 -1
- package/dist/es/f/FormInput/FormInput.js +8 -1
- package/dist/es/f/fields/QueryCombobox/QueryCombobox.js +34 -12
- package/dist/es/f/fields/QueryCombobox/common/Combobox/Combobox.js +20 -9
- package/dist/es/f/fields/QueryCombobox/common/MultipleCombobox/MultipleCombobox.js +40 -17
- package/dist/es/f/fields/QueryCombobox/common/index.js +2 -1
- package/dist/es/f/fields/QueryCombobox/styles.scss +11 -5
- package/dist/es/f/fields/QuerySelect/QuerySelect.js +179 -0
- package/dist/es/f/fields/QuerySelect/index.js +2 -0
- package/dist/es/f/fields/QuerySelect/styles.scss +21 -0
- package/dist/es/f/fields/SelectInput/SelectInput.js +14 -3
- package/dist/es/f/fields/SelectInput/styles.scss +27 -14
- package/dist/es/f/fields/index.js +2 -1
- package/package.json +2 -2
- package/src/__snapshots__/Storyshots.test.js.snap +783 -237
- package/src/local.scss +3 -3
- package/src/stories/f/FormInput.stories.jsx +122 -4
- package/src/stories/f/QueryCombobox.stories.jsx +59 -10
- package/src/stories/f/QuerySelect.stories.jsx +134 -0
- package/src/stories/f/__generated__/FormInputAllTaskStatusesQuery.graphql.js +122 -0
- package/src/stories/f/__generated__/QuerySelectAllTaskStatusesQuery.graphql.js +122 -0
- package/src/ui/f/FormInput/FormInput.jsx +10 -0
- package/src/ui/f/fields/QueryCombobox/QueryCombobox.jsx +34 -14
- package/src/ui/f/fields/QueryCombobox/common/Combobox/Combobox.jsx +15 -7
- package/src/ui/f/fields/QueryCombobox/common/MultipleCombobox/MultipleCombobox.jsx +318 -0
- package/src/ui/f/fields/QueryCombobox/common/MultipleCombobox/index.js +2 -0
- package/src/ui/f/fields/QueryCombobox/common/index.js +1 -0
- package/src/ui/f/fields/QueryCombobox/styles.scss +11 -5
- package/src/ui/f/fields/QuerySelect/QuerySelect.jsx +200 -0
- package/src/ui/f/fields/QuerySelect/index.js +2 -0
- package/src/ui/f/fields/SelectInput/SelectInput.jsx +16 -3
- package/src/ui/f/fields/SelectInput/styles.scss +27 -14
- package/src/ui/f/fields/index.js +1 -0
package/src/local.scss
CHANGED
|
@@ -5,12 +5,12 @@
|
|
|
5
5
|
--theme-border-style: 1px solid;
|
|
6
6
|
--theme-border-color: var(--paragraph);
|
|
7
7
|
--theme-border: var(--theme-border-style) var(--theme-border-color);
|
|
8
|
+
--default-gap: 1em;
|
|
8
9
|
}
|
|
9
10
|
|
|
10
11
|
html {
|
|
11
12
|
font-family: var(--font-default);
|
|
12
13
|
font-size: 18px;
|
|
13
|
-
font-feature-settings:'liga' on;
|
|
14
|
+
font-feature-settings: 'liga' on;
|
|
14
15
|
scroll-behavior: smooth;
|
|
15
|
-
}
|
|
16
|
-
|
|
16
|
+
}
|
|
@@ -186,17 +186,135 @@ export const WithQueryCombobox = () => {
|
|
|
186
186
|
],
|
|
187
187
|
},
|
|
188
188
|
{
|
|
189
|
-
type
|
|
190
|
-
name
|
|
191
|
-
query
|
|
189
|
+
type :'query-combobox',
|
|
190
|
+
name :'team',
|
|
191
|
+
query:{
|
|
192
|
+
graphql :FETCH_TEAMS_QUERY,
|
|
193
|
+
accessor:'allTeams',
|
|
194
|
+
},
|
|
192
195
|
label :'Search for a team',
|
|
193
196
|
optionsKeyMap:{
|
|
194
197
|
value:'id',
|
|
195
198
|
label:'name',
|
|
196
199
|
},
|
|
197
|
-
graphQlNode :'allTeams',
|
|
198
200
|
searchVariable:'name_Icontains',
|
|
199
201
|
},
|
|
202
|
+
{
|
|
203
|
+
type :'query-combobox',
|
|
204
|
+
name :'teams',
|
|
205
|
+
query:{
|
|
206
|
+
graphql :FETCH_TEAMS_QUERY,
|
|
207
|
+
accessor:'allTeams',
|
|
208
|
+
},
|
|
209
|
+
label :'Search for teams',
|
|
210
|
+
optionsKeyMap:{
|
|
211
|
+
value:'id',
|
|
212
|
+
label:'name',
|
|
213
|
+
},
|
|
214
|
+
searchVariable:'name_Icontains',
|
|
215
|
+
multiple :true,
|
|
216
|
+
},
|
|
217
|
+
]
|
|
218
|
+
|
|
219
|
+
mockRelayOperation(allTeamsMockData)
|
|
220
|
+
mockRelayOperation(allTeamsMockData)
|
|
221
|
+
mockRelayOperation(allTeamsMockData)
|
|
222
|
+
|
|
223
|
+
return (
|
|
224
|
+
<>
|
|
225
|
+
{
|
|
226
|
+
inputMap.map((input) => <FormInput {...input} key={input.name} />)
|
|
227
|
+
}
|
|
228
|
+
<FormDebugger />
|
|
229
|
+
|
|
230
|
+
</>
|
|
231
|
+
)
|
|
232
|
+
}
|
|
233
|
+
|
|
234
|
+
const statuses = [
|
|
235
|
+
'Backlog',
|
|
236
|
+
'In Review',
|
|
237
|
+
'In Progress',
|
|
238
|
+
'Requested',
|
|
239
|
+
'Blocked',
|
|
240
|
+
'Completed',
|
|
241
|
+
]
|
|
242
|
+
const allTaskStatusesMockData = {
|
|
243
|
+
PageInfo() {
|
|
244
|
+
return {
|
|
245
|
+
hasNextPage :true,
|
|
246
|
+
hasPreviousPage:true,
|
|
247
|
+
}
|
|
248
|
+
},
|
|
249
|
+
TaskStatusNodeConnection:() => ({
|
|
250
|
+
pageInfo:{
|
|
251
|
+
hasNextPage :true,
|
|
252
|
+
hasPreviousPage:true,
|
|
253
|
+
},
|
|
254
|
+
|
|
255
|
+
edges:statuses.map((status) => ({
|
|
256
|
+
node:{
|
|
257
|
+
id:generateNodeId('TaskStatusNode'),
|
|
258
|
+
status,
|
|
259
|
+
},
|
|
260
|
+
})),
|
|
261
|
+
}),
|
|
262
|
+
}
|
|
263
|
+
|
|
264
|
+
const FETCH_ALL_TASK_STATUSES = graphql`
|
|
265
|
+
query FormInputAllTaskStatusesQuery {
|
|
266
|
+
allTaskStatuses {
|
|
267
|
+
edges {
|
|
268
|
+
node {
|
|
269
|
+
id
|
|
270
|
+
status
|
|
271
|
+
}
|
|
272
|
+
}
|
|
273
|
+
}
|
|
274
|
+
}
|
|
275
|
+
`
|
|
276
|
+
|
|
277
|
+
export const WithPrefetchedQuerySelect = () => {
|
|
278
|
+
mockRelayOperation(allTaskStatusesMockData)
|
|
279
|
+
|
|
280
|
+
const inputMap = [
|
|
281
|
+
{
|
|
282
|
+
type :'text',
|
|
283
|
+
name :'firstName',
|
|
284
|
+
label:"What's your first name ?",
|
|
285
|
+
},
|
|
286
|
+
{
|
|
287
|
+
type :'choices',
|
|
288
|
+
name :'colors',
|
|
289
|
+
label :'What are your favourite colors ?',
|
|
290
|
+
options:[
|
|
291
|
+
{
|
|
292
|
+
value:'red',
|
|
293
|
+
label:'Color Red',
|
|
294
|
+
},
|
|
295
|
+
{
|
|
296
|
+
value:'blue',
|
|
297
|
+
label:'Color Blue',
|
|
298
|
+
},
|
|
299
|
+
{
|
|
300
|
+
value:'green',
|
|
301
|
+
label:'Color Green',
|
|
302
|
+
},
|
|
303
|
+
],
|
|
304
|
+
},
|
|
305
|
+
{
|
|
306
|
+
type :'query-select',
|
|
307
|
+
name :'status',
|
|
308
|
+
query:{
|
|
309
|
+
graphql :FETCH_ALL_TASK_STATUSES,
|
|
310
|
+
accessor:'allTaskStatuses',
|
|
311
|
+
},
|
|
312
|
+
label :'Select Task Status',
|
|
313
|
+
optionsKeyMap:{
|
|
314
|
+
value:'id',
|
|
315
|
+
label:'status',
|
|
316
|
+
},
|
|
317
|
+
},
|
|
200
318
|
]
|
|
201
319
|
|
|
202
320
|
mockRelayOperation(allTeamsMockData)
|
|
@@ -80,7 +80,7 @@ const FETCH_TEAMS_QUERY = graphql`
|
|
|
80
80
|
`
|
|
81
81
|
|
|
82
82
|
// eslint-disable-next-line react/prop-types
|
|
83
|
-
const ResolvedTemplate = ({ multiple, defaultFormikState
|
|
83
|
+
const ResolvedTemplate = ({ multiple, defaultFormikState }) => {
|
|
84
84
|
mockRelayOperation(allTeamsMockData)
|
|
85
85
|
mockRelayOperation(allTeamsMockData)
|
|
86
86
|
mockRelayOperation(allTeamsMockData)
|
|
@@ -88,29 +88,47 @@ const ResolvedTemplate = ({ multiple, defaultFormikState = {} }) => {
|
|
|
88
88
|
const Content = () => {
|
|
89
89
|
const name = multiple ? 'teams' : 'team'
|
|
90
90
|
|
|
91
|
-
const [, , helpers] = useField(name)
|
|
91
|
+
const [, meta, helpers] = useField(name)
|
|
92
|
+
|
|
93
|
+
const { value } = meta
|
|
92
94
|
|
|
93
95
|
const { setValue } = helpers
|
|
94
96
|
|
|
95
97
|
const updateFormikState = () => {
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
98
|
+
if (multiple) {
|
|
99
|
+
setValue([
|
|
100
|
+
...(value || []),
|
|
101
|
+
{
|
|
102
|
+
value:'VGVhbU5vZGU6MDAxZTIyOGEtYzA5My00MGI0LWE1MTUtYTNkMTM1NTE1MDNk',
|
|
103
|
+
label:'Matomoko',
|
|
104
|
+
},
|
|
105
|
+
{
|
|
106
|
+
value:'VGVhbU5vZGU6MDAxZTIyOGEtYzA5My00MGI0LWE1MTUtYTNkMTM1NTE1MDNp',
|
|
107
|
+
label:'Chungwa',
|
|
108
|
+
},
|
|
109
|
+
])
|
|
110
|
+
} else {
|
|
111
|
+
setValue({
|
|
112
|
+
value:'VGVhbU5vZGU6MDAxZTIyOGEtYzA5My00MGI0LWE1MTUtYTNkMTM1NTE1MDNk',
|
|
113
|
+
label:'Kafagoho',
|
|
114
|
+
})
|
|
115
|
+
}
|
|
100
116
|
}
|
|
101
117
|
|
|
102
118
|
return (
|
|
103
119
|
<>
|
|
104
120
|
<QueryCombobox
|
|
105
|
-
query={FETCH_TEAMS_QUERY}
|
|
106
121
|
label="Search for a team"
|
|
107
122
|
optionsKeyMap={{
|
|
108
123
|
value:'id',
|
|
109
124
|
label:'name',
|
|
110
125
|
}}
|
|
126
|
+
query={{
|
|
127
|
+
graphql :FETCH_TEAMS_QUERY,
|
|
128
|
+
accessor:'allTeams',
|
|
129
|
+
}}
|
|
111
130
|
name={name}
|
|
112
131
|
multiple={multiple}
|
|
113
|
-
graphQlNode="allTeams"
|
|
114
132
|
searchVariable="name_Icontains"
|
|
115
133
|
/>
|
|
116
134
|
<div
|
|
@@ -124,16 +142,24 @@ const ResolvedTemplate = ({ multiple, defaultFormikState = {} }) => {
|
|
|
124
142
|
<Button
|
|
125
143
|
onClick={updateFormikState}
|
|
126
144
|
>
|
|
127
|
-
{multiple ? 'Add
|
|
145
|
+
{multiple ? 'Add formik values' : 'Replace formik value'}
|
|
128
146
|
</Button>
|
|
129
147
|
</div>
|
|
130
148
|
</>
|
|
131
149
|
)
|
|
132
150
|
}
|
|
133
151
|
|
|
152
|
+
let initialValues = defaultFormikState
|
|
153
|
+
|
|
154
|
+
if (!defaultFormikState && multiple) {
|
|
155
|
+
initialValues = []
|
|
156
|
+
} else if (!defaultFormikState && !multiple) {
|
|
157
|
+
initialValues = {}
|
|
158
|
+
}
|
|
159
|
+
|
|
134
160
|
return (
|
|
135
161
|
<Formik
|
|
136
|
-
initialValues={
|
|
162
|
+
initialValues={initialValues}
|
|
137
163
|
>
|
|
138
164
|
<Form>
|
|
139
165
|
<Content />
|
|
@@ -158,6 +184,29 @@ SingleSelectWithDefaultFormikState.args = {
|
|
|
158
184
|
},
|
|
159
185
|
}
|
|
160
186
|
|
|
187
|
+
export const MultipleSelect = ResolvedTemplate.bind({})
|
|
188
|
+
MultipleSelect.args = {
|
|
189
|
+
multiple :true,
|
|
190
|
+
defaultFormikState:{ teams: [] },
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
export const MultipleSelectWithDefaultFormikState = ResolvedTemplate.bind({})
|
|
194
|
+
MultipleSelectWithDefaultFormikState.args = {
|
|
195
|
+
multiple :true,
|
|
196
|
+
defaultFormikState:{
|
|
197
|
+
teams:[
|
|
198
|
+
{
|
|
199
|
+
value:'VGVhbU5vZGU6MDAxZTIyOGEtYzA5My00MGI0LWE1MTUtYTNkMTM1NTE1MDNl',
|
|
200
|
+
label:'Apple',
|
|
201
|
+
},
|
|
202
|
+
{
|
|
203
|
+
value:'VGVhbU5vZGU6MDA0N2U4MzktODY0Zi00N2U5LTg3ZjgtZGUwMmM2Yzg1YWJm',
|
|
204
|
+
label:'Pear',
|
|
205
|
+
},
|
|
206
|
+
],
|
|
207
|
+
},
|
|
208
|
+
}
|
|
209
|
+
|
|
161
210
|
// eslint-disable-next-line react/prop-types
|
|
162
211
|
// const RejectedTemplate = ({ multiple }) => {
|
|
163
212
|
// const Content = () => {
|
|
@@ -0,0 +1,134 @@
|
|
|
1
|
+
/* @pareto-engineering/generator-front 1.0.12 */
|
|
2
|
+
import * as React from 'react'
|
|
3
|
+
|
|
4
|
+
import { QuerySelect, FormDebugger } from 'ui'
|
|
5
|
+
|
|
6
|
+
import { Formik, Form } from 'formik'
|
|
7
|
+
|
|
8
|
+
import generateNodeId from '../utils/generateNodeId'
|
|
9
|
+
|
|
10
|
+
import {
|
|
11
|
+
RelayEnvironmentProvider,
|
|
12
|
+
mockRelayOperation,
|
|
13
|
+
environment,
|
|
14
|
+
} from '../utils/relay'
|
|
15
|
+
|
|
16
|
+
export default {
|
|
17
|
+
title :'f/fields/QuerySelect',
|
|
18
|
+
component :QuerySelect,
|
|
19
|
+
subcomponents:{
|
|
20
|
+
// Item:QuerySelect.Item
|
|
21
|
+
},
|
|
22
|
+
decorators:[
|
|
23
|
+
// storyfn => <div className="">{ storyfn() }</div>,
|
|
24
|
+
(storyfn) => (
|
|
25
|
+
<RelayEnvironmentProvider>
|
|
26
|
+
{ storyfn() }
|
|
27
|
+
</RelayEnvironmentProvider>
|
|
28
|
+
),
|
|
29
|
+
],
|
|
30
|
+
argTypes:{
|
|
31
|
+
backgroundColor:{ control: 'color' },
|
|
32
|
+
},
|
|
33
|
+
}
|
|
34
|
+
const statuses = [
|
|
35
|
+
'Backlog',
|
|
36
|
+
'In Review',
|
|
37
|
+
'In Progress',
|
|
38
|
+
'Requested',
|
|
39
|
+
'Blocked',
|
|
40
|
+
'Completed',
|
|
41
|
+
]
|
|
42
|
+
const allTaskStatusesMockData = {
|
|
43
|
+
PageInfo() {
|
|
44
|
+
return {
|
|
45
|
+
hasNextPage :true,
|
|
46
|
+
hasPreviousPage:true,
|
|
47
|
+
}
|
|
48
|
+
},
|
|
49
|
+
TaskStatusNodeConnection:() => ({
|
|
50
|
+
pageInfo:{
|
|
51
|
+
hasNextPage :true,
|
|
52
|
+
hasPreviousPage:true,
|
|
53
|
+
},
|
|
54
|
+
|
|
55
|
+
edges:statuses.map((status) => ({
|
|
56
|
+
node:{
|
|
57
|
+
id:generateNodeId('TaskStatusNode'),
|
|
58
|
+
status,
|
|
59
|
+
},
|
|
60
|
+
})),
|
|
61
|
+
}),
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
const FETCH_ALL_TASK_STATUSES = graphql`
|
|
65
|
+
query QuerySelectAllTaskStatusesQuery {
|
|
66
|
+
allTaskStatuses {
|
|
67
|
+
edges {
|
|
68
|
+
node {
|
|
69
|
+
id
|
|
70
|
+
status
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
`
|
|
76
|
+
|
|
77
|
+
// eslint-disable-next-line react/prop-types
|
|
78
|
+
const Template = ({ isLoading, defaultFormikState }) => {
|
|
79
|
+
if (isLoading) {
|
|
80
|
+
setTimeout(() => {
|
|
81
|
+
mockRelayOperation(allTaskStatusesMockData)
|
|
82
|
+
environment.mock.queuePendingOperation(
|
|
83
|
+
FETCH_ALL_TASK_STATUSES,
|
|
84
|
+
)
|
|
85
|
+
}, 500)
|
|
86
|
+
} else {
|
|
87
|
+
mockRelayOperation(allTaskStatusesMockData)
|
|
88
|
+
environment.mock.queuePendingOperation(
|
|
89
|
+
FETCH_ALL_TASK_STATUSES,
|
|
90
|
+
)
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
const Content = () => (
|
|
94
|
+
<>
|
|
95
|
+
<QuerySelect
|
|
96
|
+
name="status"
|
|
97
|
+
label="Select Task Status"
|
|
98
|
+
query={{
|
|
99
|
+
graphql :FETCH_ALL_TASK_STATUSES,
|
|
100
|
+
accessor:'allTaskStatuses',
|
|
101
|
+
}}
|
|
102
|
+
optionsKeyMap={{
|
|
103
|
+
value:'id',
|
|
104
|
+
label:'status',
|
|
105
|
+
}}
|
|
106
|
+
/>
|
|
107
|
+
<FormDebugger />
|
|
108
|
+
</>
|
|
109
|
+
)
|
|
110
|
+
|
|
111
|
+
const initialValues = defaultFormikState ?? { status: '' }
|
|
112
|
+
|
|
113
|
+
return (
|
|
114
|
+
<Formik
|
|
115
|
+
initialValues={initialValues}
|
|
116
|
+
>
|
|
117
|
+
<Form>
|
|
118
|
+
<Content />
|
|
119
|
+
</Form>
|
|
120
|
+
</Formik>
|
|
121
|
+
)
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
export const Base = Template.bind({})
|
|
125
|
+
export const WithDefaultValue = Template.bind({})
|
|
126
|
+
WithDefaultValue.args = {
|
|
127
|
+
defaultFormikState:{
|
|
128
|
+
status:'VGFza1N0YXR1c05vZGU6NGRiYjNlMmItMGIxYy00ZjIxLTk0MmUtZTNjZGQwMjdiNjU3',
|
|
129
|
+
},
|
|
130
|
+
}
|
|
131
|
+
export const LoadingOptions = Template.bind({})
|
|
132
|
+
LoadingOptions.args = {
|
|
133
|
+
isLoading:true,
|
|
134
|
+
}
|
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @flow
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
/* eslint-disable */
|
|
6
|
+
|
|
7
|
+
'use strict';
|
|
8
|
+
|
|
9
|
+
/*::
|
|
10
|
+
import type { ConcreteRequest } from 'relay-runtime';
|
|
11
|
+
export type FormInputAllTaskStatusesQueryVariables = {||};
|
|
12
|
+
export type FormInputAllTaskStatusesQueryResponse = {|
|
|
13
|
+
+allTaskStatuses: ?{|
|
|
14
|
+
+edges: $ReadOnlyArray<?{|
|
|
15
|
+
+node: ?{|
|
|
16
|
+
+id: string,
|
|
17
|
+
+status: string,
|
|
18
|
+
|}
|
|
19
|
+
|}>
|
|
20
|
+
|}
|
|
21
|
+
|};
|
|
22
|
+
export type FormInputAllTaskStatusesQuery = {|
|
|
23
|
+
variables: FormInputAllTaskStatusesQueryVariables,
|
|
24
|
+
response: FormInputAllTaskStatusesQueryResponse,
|
|
25
|
+
|};
|
|
26
|
+
*/
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
/*
|
|
30
|
+
query FormInputAllTaskStatusesQuery {
|
|
31
|
+
allTaskStatuses {
|
|
32
|
+
edges {
|
|
33
|
+
node {
|
|
34
|
+
id
|
|
35
|
+
status
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
*/
|
|
41
|
+
|
|
42
|
+
const node/*: ConcreteRequest*/ = (function(){
|
|
43
|
+
var v0 = [
|
|
44
|
+
{
|
|
45
|
+
"alias": null,
|
|
46
|
+
"args": null,
|
|
47
|
+
"concreteType": "TaskStatusNodeConnection",
|
|
48
|
+
"kind": "LinkedField",
|
|
49
|
+
"name": "allTaskStatuses",
|
|
50
|
+
"plural": false,
|
|
51
|
+
"selections": [
|
|
52
|
+
{
|
|
53
|
+
"alias": null,
|
|
54
|
+
"args": null,
|
|
55
|
+
"concreteType": "TaskStatusNodeEdge",
|
|
56
|
+
"kind": "LinkedField",
|
|
57
|
+
"name": "edges",
|
|
58
|
+
"plural": true,
|
|
59
|
+
"selections": [
|
|
60
|
+
{
|
|
61
|
+
"alias": null,
|
|
62
|
+
"args": null,
|
|
63
|
+
"concreteType": "TaskStatusNode",
|
|
64
|
+
"kind": "LinkedField",
|
|
65
|
+
"name": "node",
|
|
66
|
+
"plural": false,
|
|
67
|
+
"selections": [
|
|
68
|
+
{
|
|
69
|
+
"alias": null,
|
|
70
|
+
"args": null,
|
|
71
|
+
"kind": "ScalarField",
|
|
72
|
+
"name": "id",
|
|
73
|
+
"storageKey": null
|
|
74
|
+
},
|
|
75
|
+
{
|
|
76
|
+
"alias": null,
|
|
77
|
+
"args": null,
|
|
78
|
+
"kind": "ScalarField",
|
|
79
|
+
"name": "status",
|
|
80
|
+
"storageKey": null
|
|
81
|
+
}
|
|
82
|
+
],
|
|
83
|
+
"storageKey": null
|
|
84
|
+
}
|
|
85
|
+
],
|
|
86
|
+
"storageKey": null
|
|
87
|
+
}
|
|
88
|
+
],
|
|
89
|
+
"storageKey": null
|
|
90
|
+
}
|
|
91
|
+
];
|
|
92
|
+
return {
|
|
93
|
+
"fragment": {
|
|
94
|
+
"argumentDefinitions": [],
|
|
95
|
+
"kind": "Fragment",
|
|
96
|
+
"metadata": null,
|
|
97
|
+
"name": "FormInputAllTaskStatusesQuery",
|
|
98
|
+
"selections": (v0/*: any*/),
|
|
99
|
+
"type": "Query",
|
|
100
|
+
"abstractKey": null
|
|
101
|
+
},
|
|
102
|
+
"kind": "Request",
|
|
103
|
+
"operation": {
|
|
104
|
+
"argumentDefinitions": [],
|
|
105
|
+
"kind": "Operation",
|
|
106
|
+
"name": "FormInputAllTaskStatusesQuery",
|
|
107
|
+
"selections": (v0/*: any*/)
|
|
108
|
+
},
|
|
109
|
+
"params": {
|
|
110
|
+
"cacheID": "54ce3d351c6ef9fa16c73a954fc5cfea",
|
|
111
|
+
"id": null,
|
|
112
|
+
"metadata": {},
|
|
113
|
+
"name": "FormInputAllTaskStatusesQuery",
|
|
114
|
+
"operationKind": "query",
|
|
115
|
+
"text": "query FormInputAllTaskStatusesQuery {\n allTaskStatuses {\n edges {\n node {\n id\n status\n }\n }\n }\n}\n"
|
|
116
|
+
}
|
|
117
|
+
};
|
|
118
|
+
})();
|
|
119
|
+
// prettier-ignore
|
|
120
|
+
(node/*: any*/).hash = 'a86a4a669c61db10cd2bd9b72b3eeb12';
|
|
121
|
+
|
|
122
|
+
module.exports = node;
|
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @flow
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
/* eslint-disable */
|
|
6
|
+
|
|
7
|
+
'use strict';
|
|
8
|
+
|
|
9
|
+
/*::
|
|
10
|
+
import type { ConcreteRequest } from 'relay-runtime';
|
|
11
|
+
export type QuerySelectAllTaskStatusesQueryVariables = {||};
|
|
12
|
+
export type QuerySelectAllTaskStatusesQueryResponse = {|
|
|
13
|
+
+allTaskStatuses: ?{|
|
|
14
|
+
+edges: $ReadOnlyArray<?{|
|
|
15
|
+
+node: ?{|
|
|
16
|
+
+id: string,
|
|
17
|
+
+status: string,
|
|
18
|
+
|}
|
|
19
|
+
|}>
|
|
20
|
+
|}
|
|
21
|
+
|};
|
|
22
|
+
export type QuerySelectAllTaskStatusesQuery = {|
|
|
23
|
+
variables: QuerySelectAllTaskStatusesQueryVariables,
|
|
24
|
+
response: QuerySelectAllTaskStatusesQueryResponse,
|
|
25
|
+
|};
|
|
26
|
+
*/
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
/*
|
|
30
|
+
query QuerySelectAllTaskStatusesQuery {
|
|
31
|
+
allTaskStatuses {
|
|
32
|
+
edges {
|
|
33
|
+
node {
|
|
34
|
+
id
|
|
35
|
+
status
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
*/
|
|
41
|
+
|
|
42
|
+
const node/*: ConcreteRequest*/ = (function(){
|
|
43
|
+
var v0 = [
|
|
44
|
+
{
|
|
45
|
+
"alias": null,
|
|
46
|
+
"args": null,
|
|
47
|
+
"concreteType": "TaskStatusNodeConnection",
|
|
48
|
+
"kind": "LinkedField",
|
|
49
|
+
"name": "allTaskStatuses",
|
|
50
|
+
"plural": false,
|
|
51
|
+
"selections": [
|
|
52
|
+
{
|
|
53
|
+
"alias": null,
|
|
54
|
+
"args": null,
|
|
55
|
+
"concreteType": "TaskStatusNodeEdge",
|
|
56
|
+
"kind": "LinkedField",
|
|
57
|
+
"name": "edges",
|
|
58
|
+
"plural": true,
|
|
59
|
+
"selections": [
|
|
60
|
+
{
|
|
61
|
+
"alias": null,
|
|
62
|
+
"args": null,
|
|
63
|
+
"concreteType": "TaskStatusNode",
|
|
64
|
+
"kind": "LinkedField",
|
|
65
|
+
"name": "node",
|
|
66
|
+
"plural": false,
|
|
67
|
+
"selections": [
|
|
68
|
+
{
|
|
69
|
+
"alias": null,
|
|
70
|
+
"args": null,
|
|
71
|
+
"kind": "ScalarField",
|
|
72
|
+
"name": "id",
|
|
73
|
+
"storageKey": null
|
|
74
|
+
},
|
|
75
|
+
{
|
|
76
|
+
"alias": null,
|
|
77
|
+
"args": null,
|
|
78
|
+
"kind": "ScalarField",
|
|
79
|
+
"name": "status",
|
|
80
|
+
"storageKey": null
|
|
81
|
+
}
|
|
82
|
+
],
|
|
83
|
+
"storageKey": null
|
|
84
|
+
}
|
|
85
|
+
],
|
|
86
|
+
"storageKey": null
|
|
87
|
+
}
|
|
88
|
+
],
|
|
89
|
+
"storageKey": null
|
|
90
|
+
}
|
|
91
|
+
];
|
|
92
|
+
return {
|
|
93
|
+
"fragment": {
|
|
94
|
+
"argumentDefinitions": [],
|
|
95
|
+
"kind": "Fragment",
|
|
96
|
+
"metadata": null,
|
|
97
|
+
"name": "QuerySelectAllTaskStatusesQuery",
|
|
98
|
+
"selections": (v0/*: any*/),
|
|
99
|
+
"type": "Query",
|
|
100
|
+
"abstractKey": null
|
|
101
|
+
},
|
|
102
|
+
"kind": "Request",
|
|
103
|
+
"operation": {
|
|
104
|
+
"argumentDefinitions": [],
|
|
105
|
+
"kind": "Operation",
|
|
106
|
+
"name": "QuerySelectAllTaskStatusesQuery",
|
|
107
|
+
"selections": (v0/*: any*/)
|
|
108
|
+
},
|
|
109
|
+
"params": {
|
|
110
|
+
"cacheID": "bd929dd60893f2a67f23d8cd2fb003de",
|
|
111
|
+
"id": null,
|
|
112
|
+
"metadata": {},
|
|
113
|
+
"name": "QuerySelectAllTaskStatusesQuery",
|
|
114
|
+
"operationKind": "query",
|
|
115
|
+
"text": "query QuerySelectAllTaskStatusesQuery {\n allTaskStatuses {\n edges {\n node {\n id\n status\n }\n }\n }\n}\n"
|
|
116
|
+
}
|
|
117
|
+
};
|
|
118
|
+
})();
|
|
119
|
+
// prettier-ignore
|
|
120
|
+
(node/*: any*/).hash = '31d9d1e820e814f7cee8ef7b273074ab';
|
|
121
|
+
|
|
122
|
+
module.exports = node;
|
|
@@ -11,6 +11,7 @@ import {
|
|
|
11
11
|
ChoicesInput,
|
|
12
12
|
SelectInput,
|
|
13
13
|
QueryCombobox,
|
|
14
|
+
QuerySelect,
|
|
14
15
|
} from '../fields'
|
|
15
16
|
|
|
16
17
|
// Local Definitions
|
|
@@ -74,6 +75,15 @@ const FormInput = ({
|
|
|
74
75
|
/>
|
|
75
76
|
)
|
|
76
77
|
}
|
|
78
|
+
if (type === 'query-select') {
|
|
79
|
+
return (
|
|
80
|
+
<QuerySelect
|
|
81
|
+
className={newClassName}
|
|
82
|
+
disabled={disabled}
|
|
83
|
+
{...otherProps}
|
|
84
|
+
/>
|
|
85
|
+
)
|
|
86
|
+
}
|
|
77
87
|
if (extraTypes?.[type]) {
|
|
78
88
|
const Component = extraTypes[type]
|
|
79
89
|
return (
|