Commit Graph

22 Commits

Author SHA1 Message Date
Vladimir Gorej
8c79e2a375 refactor: prefix lifecycle methods with UNSAFE_
Refs #7341
2021-11-03 09:49:50 +01:00
Tim Lai
4d264ae17f chore(lint): cumulative lint fixes prep for eslint@7 (#7078) 2021-03-16 10:11:35 -07:00
tomdegoede
fc3ed30f3d improvement: Move inline styles to SCSS instead (#5578)
* fix: convert propStyle to propClass
2020-06-10 16:39:48 -07:00
kyle
eaa1f4a8b4 bug: enum Select crashes when selecting the empty value (via #5463)
* add failing tests

* fix property access

* @babel/plugin-proposal-optional-chaining
2019-07-12 23:05:00 -05:00
kyle
23d7260f92 feat: Multiple Examples for OpenAPI 3 Parameters, Request Bodies, and Responses (via #5427)
* add opt-in Prettier config

* remove legacy `examples` implementation

* create ExamplesSelect

* support `Response.examples` in OpenAPI 3

* create response controls group

* prettier reformat

* prepare to break up Parameters

* reunify Parameters and OAS3 Parameters

* Parameter Examples

* Example component

* handle parameter value stringification correctly

* FOR REVIEW: add prop for controlling Select

* use regular header for param examples in Try-It-Out

* manage active examples member via Redux

* Request Body Try-It-Out examples

* remove special Response description styling

* omit Example value display in Try-It-Out

* support disabled text inputs in JsonSchemaForm

* Example.omitValue => Example.showValue

* ExamplesSelectValueRetainer

* styling for disabled inputs

* remove console.log

* support "Modified Values" in ExamplesSelect

* remove Examples component
(wasn't used anywhere)

* use ParameterRow.getParamKey for active examples member keying

* split-rendering of examples in ParameterRow

* send disabled prop to JsonSchemaForm

* use content type to key request body active examples members

* remove debugger

* rewire RequestBodyEditor to be a controlled component

REVIEW: does this have perf implications?

* trigger synthetic onSelect events in ExamplesSelect

* prettier updates

* remove outdated Examples usage in RequestBody

* don't handle examples changes in ESVR

* make RequestBodyEditor semi-controlled

* don't default to an empty Map for request bodies

* add namespaceKey to ESVR for state mgmt

* don't key RequestBody activeExampleKeys on media type

* tweak ESVR isModifiedValueSelected calculation

* add trace class to ExamplesSelect

* remove usage of ESVR.currentNamespace

* reset to first example if currentExampleKey is invalid

* add default values to RequestBody rendering

* stringify things in ESVR

* avoid null select value (silences React warning)

* detect user inputs that match any examples member's value

* add trace class for json-schema-array

* shallowly convert namespace state, to preserve Immutable stucts in state

* stringify RBE values; don't trim JSON in editor

* match user input to an example when non-primitives are expressed in state as strings

* update Cypress

* don't apply sample values in JsonSchema_Object

* support disabling all JsonSchemaForm subcomponents

* Core tests

* style changes to accomodate Examples

* fix version-checking error in Response

* disable SCU for Responses

* don't stringify Select values

* ModelExample: default to Model tab if no example is available; provide a default no example message

* don't trim JSON ParamBody inputs

* read directly from 2.0 Response.schema instead of inferring a value

* show current Example information in RequestBody

* show label for Examples dropdown by default

* rework Response content ordering

* style disabled textareas like other read-only blocks

* meta: fix sourcemaps

* refactor ESVR setNameForNamespace

* protect second half of ternary expession

* cypress: `select.examples-select` => `.examples-select > select`

* clarify ModelExample.componentWillReceiveProps

* add gates/defaults to prevent issues in very bare-boned documents

* fix test block organization problem

* simplify RequestBodyEditor interface

* linter fixes

* prettier updates

* use plugin system for new components

* move ME Cypress helpers to other file
2019-06-29 19:52:51 +01:00
kyle
dd3afdc456 fix: anchor tag safety (via #4789)
* v3.17.6

* release(3.17.6): rebuild dist

* add failing tests

* fix Link component

* fix OnlineValidatorBadge component

* switch from <a> to <Link> in operation components

* make Markdown inputs safe

* use Link component in Info block, for target safety

* add eslint rule for unsafe `target` usage
2018-08-04 00:54:03 -07:00
kyle
0359f9c364 housekeeping: bundle size reductions (#4713)
* set new bundlesize goal
* preserve `GeneratorFunction` instead of all function names
* use js-yaml fork that doesn't require esprima
* set HTML content directly, instead of using React-Markdown
* use remarkable for all Markdown rendering
* add babel-plugin-transform-react-remove-prop-types
* remove SplitPaneMode plugin
* remove react-collapse
* remove AST plugin, and yaml-js
* trim Markdown HTML string output before rendering
* disable obsolete function name preservation
* add `getComponent` to propTypes
2018-07-19 13:48:39 -07:00
narutowyh
12a9fbc0ca fix: ignore prototype's keys in a handful of for...in loops 2018-01-05 21:57:17 -06:00
Kyle Shockey
5224932cf9 Fix failing test 2017-11-29 19:21:20 -06:00
Larry Gregory
57a3be28b0 Update react-collapse and react-motion 2017-11-08 07:41:23 -05:00
Owen Conti
b3bccfb185 fixes after merge 2017-07-24 18:55:32 -06:00
Kyle Shockey
5c70134f53 Revert "Merge pull request #3427 from owenconti/bug/3414-validate-params-reworked"
Reopens #3414

This reverts commit 99d368673b, reversing
changes made to 8bf9037bbc.
2017-07-24 13:07:12 -07:00
Owen Conti
666e22f989 Update parameter <select> elements to render 'invalid' classes. Add '.invalid' CSS for <select> elements. Rework validateParam() function. Added .btn-sm class for "Add item" and "Remove item" buttons in array parameters. Reduce border-width on <select> elements inside parameters. Update tests for utils.validateParam(). 2017-07-20 21:33:57 -06:00
RVKen
d36f0a6dbd fix eslint issues 2017-06-29 04:37:19 +02:00
Scott O'Hara
eed62339b2 Remove unused legacy clear class (Fixes #3167) 2017-06-05 08:36:49 +10:00
Kyle Shockey
a2eed69ee7 Create providers directory; Markdown provider 2017-06-01 21:37:00 -07:00
Anna Bodnia
7e1eb4e9a7 fix #2841 2017-05-04 17:18:47 +03:00
Kyle Shockey
7d87c9d680 Fix typo in container classname 2017-04-27 09:09:09 -07:00
Kyle Shockey
78336e99aa Merge branch 'container-name-change' of https://github.com/Minasokoni/swagger-ui into Minasokoni-container-name-change 2017-04-27 09:08:55 -07:00
Minasokoni
198f9b6874 changed container classname 2017-04-27 08:35:33 -07:00
Kyle Shockey
e1fcbfbf09 Linter error fixes 2017-03-23 16:36:45 -07:00
Ron
f22a628934 in with the new 2017-03-17 21:17:53 -07:00