This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const ui = SwaggerUIBundle({ | |
| url: "https://petstore.swagger.io/v2/swagger.json", | |
| ... | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| using System; | |
| using System.Collections.Generic; | |
| using System.IO; | |
| using System.Text; | |
| using System.Text.RegularExpressions; | |
| using System.Threading.Tasks; | |
| using CseApi.Functions.Shared; | |
| using CseApi.Helpers.Config; | |
| using CseApi.Helpers.Http; | |
| using Microsoft.AspNetCore.Http; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| new EventHooksPlugin({ | |
| 'afterEmit': () => { | |
| const hashedIndexHtml = glob.sync(`${paths.appBuild}/*.html`)[0]; | |
| const hash = /index\.(.*?)\.html/.exec(hashedIndexHtml)[1]; | |
| const webConfig = fs.readFileSync(`${paths.appBuild}/web.config`).toString(); | |
| const result = webConfig.toString().replace(/index\.html/g, `index.${hash}.html`); | |
| fs.writeFileSync(`${paths.appBuild}/web.config`, result); | |
| } | |
| }), |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?xml version="1.0" encoding="UTF-8"?> | |
| <configuration> | |
| <system.webServer> | |
| <defaultDocument> | |
| <files> | |
| <add value="index.html" /> | |
| </files> | |
| </defaultDocument> | |
| <rewrite> | |
| <rules> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| interface IActionUpdateProductNameVersion { | |
| productName: string; | |
| productVersion: string; | |
| } | |
| const requestUpdateProductVersion = createAction<interfaces.IActionUpdateProductNameVersion, void>(types.REQUEST_UPDATE_PRODUCT_VERSION, | |
| (productName: string, productVersion: string) => ({productName, productVersion}), | |
| null | |
| ); | |
| const receiveUpdateProductVersion = createAction<interfaces.IActionUpdateProductNameVersion, interfaces.IMetaIsXhrError>(types.RECEIVE_UPDATE_PRODUCT_VERSION, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| interface IActionProductName { productName: string; } | |
| interface IActionProductVersion { productVersion string; } | |
| const requestUpdateProductVersion = createAction<interfaces.IActionProductName & interfaces.IActionProductVersion, void>(types.REQUEST_UPDATE_PRODUCT_VERSION, | |
| (productName: string, productVersion: string) => ({productName, productVersion}), | |
| null | |
| ); | |
| const receiveUpdateProductVersion = createAction<interfaces.IActionProductName & interfaces.IActionProductVersion, interfaces.IMetaIsXhrError>(types.RECEIVE_UPDATE_PRODUCT_VERSION, | |
| (productName: string, productVersion: string) => ({productName, productVersion}), | |
| isXhrError |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| filterElements(filter, e) { | |
| FilterSortActions.filter(filter); | |
| } | |
| sortElements(sort, e) { | |
| FilterSortActions.sort(sort); | |
| } | |
| renderLoadButtons() { | |
| return _.map(loadData, d => <Button key={d.name} active={this.props.type == d.value} onClick={ElementActions.loadElements.bind(this, d.value)}>{d.name}</Button>, this) | |
| } | |
| renderFilterButtons() { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| componentDidUpdate(prevProps) { | |
| // The list of keys seen in the previous render | |
| let currentKeys = _.map(prevProps.children, (n) => n.key); | |
| // The latest list of keys that have been rendered | |
| let newKeys = _.map(this.props.children, (n) => n.key); | |
| // Find which keys are new between the current set of keys and any new children passed to this component | |
| let addKeys = _.difference(newKeys, currentKeys); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| render() { | |
| return <div className="isotope" ref="isotopeContainer"> | |
| <div className="element-item-sizer"></div> | |
| {this.props.children} | |
| </div> | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| createIsotopeContainer() { | |
| if (this.iso == null) { | |
| this.iso = new Isotope(React.findDOMNode(this.refs.isotopeContainer), this.isoOptions); | |
| } | |
| } |