Skip to content

Commit 82538fe

Browse files
authored
Merge pull request #1316 from rvsia/techDebt
Tech debt
2 parents c94dc60 + 5ff2c18 commit 82538fe

File tree

6 files changed

+5
-1146
lines changed

6 files changed

+5
-1146
lines changed

packages/blueprint-component-mapper/demo/index.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,6 @@ class App extends React.Component {
5656
FormTemplate={(props) => <FormTemplate {...props} showFormControls={this.state.additionalOptions.showFormControls} />}
5757
onCancel={console.log}
5858
schema={this.state.schema}
59-
uiSchema={this.state.ui}
6059
{...this.state.additionalOptions}
6160
/>
6261
</div>

packages/mui-component-mapper/demo/demo-schemas/widget-schema.js

Lines changed: 0 additions & 314 deletions
Original file line numberDiff line numberDiff line change
@@ -84,317 +84,3 @@ export const schema = {
8484
}
8585
}
8686
};
87-
88-
export const uiSchema = {
89-
boolean: {
90-
radio: {
91-
'ui:widget': 'radio'
92-
},
93-
select: {
94-
'ui:widget': 'select'
95-
}
96-
},
97-
string: {
98-
textarea: {
99-
'ui:widget': 'textarea',
100-
'ui:options': {
101-
rows: 5
102-
}
103-
},
104-
color: {
105-
'ui:widget': 'color'
106-
}
107-
},
108-
secret: {
109-
'ui:widget': 'hidden'
110-
},
111-
disabled: {
112-
'ui:disabled': true
113-
},
114-
readonly: {
115-
'ui:readonly': true
116-
},
117-
widgetOptions: {
118-
'ui:options': {
119-
backgroundColor: 'yellow'
120-
}
121-
},
122-
selectWidgetOptions: {
123-
'ui:options': {
124-
backgroundColor: 'pink'
125-
}
126-
}
127-
};
128-
129-
export const conditionalSchema = {
130-
title: 'Web hook',
131-
description: 'This web hook allows us to send a JSON object from the service portal',
132-
type: 'object',
133-
required: ['url', 'secret'],
134-
definitions: {
135-
Authentications: {
136-
title: 'Authentications',
137-
type: 'string',
138-
anyOf: [
139-
{
140-
type: 'string',
141-
enum: ['oauth'],
142-
title: 'OAuth 2.0'
143-
},
144-
{
145-
type: 'string',
146-
enum: ['basic'],
147-
title: 'Basic Authentication'
148-
},
149-
{
150-
type: 'string',
151-
enum: ['none'],
152-
title: 'No Authentication needed'
153-
}
154-
]
155-
}
156-
},
157-
properties: {
158-
url: {
159-
type: 'string',
160-
title: 'URL',
161-
description: 'The URL which will be receving this request',
162-
pattern: '^(http|https)://*'
163-
},
164-
verify_ssl: {
165-
// eslint-disable-line camelcase
166-
type: 'boolean',
167-
default: true,
168-
title: 'Verify Server Certificate'
169-
},
170-
secret: {
171-
type: 'string',
172-
title: 'Secret',
173-
description: 'If specified we will create a HMAC signature of the body with the secret and include it in the HTTP Header X-Service-Portal-Signature' // eslint-disable-line
174-
},
175-
authentication: {
176-
$ref: '#/definitions/Authentications',
177-
title: 'Authentication',
178-
default: 'none'
179-
}
180-
},
181-
dependencies: {
182-
authentication: {
183-
oneOf: [
184-
{
185-
properties: {
186-
authentication: {
187-
enum: ['none']
188-
}
189-
}
190-
},
191-
{
192-
properties: {
193-
authentication: {
194-
enum: ['oauth']
195-
},
196-
token: {
197-
type: 'string',
198-
title: 'Bearer Token',
199-
description: 'For OAuth 2.0 authentication please provide a token'
200-
}
201-
}
202-
},
203-
{
204-
properties: {
205-
authentication: {
206-
enum: ['basic']
207-
},
208-
userid: {
209-
type: 'string',
210-
title: 'Username',
211-
description: 'For basic authentication please provide a userid'
212-
},
213-
password: {
214-
type: 'string',
215-
title: 'Password',
216-
format: 'password',
217-
description: 'For basic authentication please provide a password'
218-
}
219-
}
220-
}
221-
]
222-
}
223-
}
224-
};
225-
226-
export const arraySchema = {
227-
definitions: {
228-
Thing: {
229-
type: 'object',
230-
properties: {
231-
name: {
232-
type: 'string',
233-
default: 'Default name'
234-
}
235-
}
236-
}
237-
},
238-
type: 'object',
239-
properties: {
240-
listOfStrings: {
241-
type: 'array',
242-
title: 'A list of strings',
243-
items: {
244-
type: 'string',
245-
default: 'bazinga'
246-
}
247-
},
248-
multipleChoicesList: {
249-
type: 'array',
250-
title: 'A multiple choices list',
251-
items: {
252-
type: 'string',
253-
enum: ['foo', 'bar', 'fuzz', 'qux']
254-
},
255-
uniqueItems: true
256-
},
257-
fixedItemsList: {
258-
type: 'array',
259-
title: 'A list of fixed items',
260-
items: [
261-
{
262-
title: 'A string value',
263-
type: 'string',
264-
default: 'lorem ipsum'
265-
},
266-
{
267-
title: 'a boolean value',
268-
type: 'boolean'
269-
}
270-
],
271-
additionalItems: {
272-
title: 'Additional item',
273-
type: 'number'
274-
}
275-
},
276-
minItemsList: {
277-
type: 'array',
278-
title: 'A list with a minimal number of items',
279-
minItems: 3,
280-
items: {
281-
$ref: '#/definitions/Thing'
282-
}
283-
},
284-
defaultsAndMinItems: {
285-
type: 'array',
286-
title: 'List and item level defaults',
287-
minItems: 5,
288-
default: ['carp', 'trout', 'bream'],
289-
items: {
290-
type: 'string',
291-
default: 'unidentified'
292-
}
293-
},
294-
nestedList: {
295-
type: 'array',
296-
title: 'Nested list',
297-
items: {
298-
type: 'array',
299-
title: 'Inner list',
300-
items: {
301-
type: 'string',
302-
default: 'lorem ipsum'
303-
}
304-
}
305-
},
306-
unorderable: {
307-
title: 'Unorderable items',
308-
type: 'array',
309-
items: {
310-
type: 'string',
311-
default: 'lorem ipsum'
312-
}
313-
},
314-
unremovable: {
315-
title: 'Unremovable items',
316-
type: 'array',
317-
items: {
318-
type: 'string',
319-
default: 'lorem ipsum'
320-
}
321-
},
322-
noToolbar: {
323-
title: 'No add, remove and order buttons',
324-
type: 'array',
325-
items: {
326-
type: 'string',
327-
default: 'lorem ipsum'
328-
}
329-
},
330-
fixedNoToolbar: {
331-
title: 'Fixed array without buttons',
332-
type: 'array',
333-
items: [
334-
{
335-
title: 'A number',
336-
type: 'number',
337-
default: 42
338-
},
339-
{
340-
title: 'A boolean',
341-
type: 'boolean',
342-
default: false
343-
}
344-
],
345-
additionalItems: {
346-
title: 'A string',
347-
type: 'string',
348-
default: 'lorem ipsum'
349-
}
350-
}
351-
}
352-
};
353-
354-
export const uiArraySchema = {
355-
listOfStrings: {
356-
items: {
357-
'ui:emptyValue': ''
358-
}
359-
},
360-
multipleChoicesList: {
361-
'ui:widget': 'checkboxes'
362-
},
363-
fixedItemsList: {
364-
items: [
365-
{
366-
'ui:widget': 'textarea'
367-
},
368-
{
369-
'ui:widget': 'select'
370-
}
371-
],
372-
additionalItems: {
373-
'ui:widget': 'updown'
374-
}
375-
},
376-
unorderable: {
377-
'ui:options': {
378-
orderable: false
379-
}
380-
},
381-
unremovable: {
382-
'ui:options': {
383-
removable: false
384-
}
385-
},
386-
noToolbar: {
387-
'ui:options': {
388-
addable: false,
389-
orderable: false,
390-
removable: false
391-
}
392-
},
393-
fixedNoToolbar: {
394-
'ui:options': {
395-
addable: false,
396-
orderable: false,
397-
removable: false
398-
}
399-
}
400-
};

0 commit comments

Comments
 (0)