diff --git a/.github/workflows/build-docs.yml b/.github/workflows/build-docs.yml index 54c3ea6a..658a2e7e 100644 --- a/.github/workflows/build-docs.yml +++ b/.github/workflows/build-docs.yml @@ -10,6 +10,6 @@ jobs: - uses: actions/checkout@v3 - uses: actions/setup-node@v3 with: - node-version: 12 + node-version: 14.15 - run: yarn install - run: yarn build-v2 diff --git a/.github/workflows/build-v1.yml b/.github/workflows/build-v1.yml index d0e465a9..d1dfbbc1 100644 --- a/.github/workflows/build-v1.yml +++ b/.github/workflows/build-v1.yml @@ -13,7 +13,7 @@ jobs: - uses: actions/checkout@v3 - uses: actions/setup-node@v3 with: - node-version: 12 + node-version: 14.15 - run: yarn install - run: yarn build - run: yarn lint diff --git a/.github/workflows/npm-publish-v1.yml b/.github/workflows/npm-publish-v1.yml index 066f0b0f..9bc36c9f 100644 --- a/.github/workflows/npm-publish-v1.yml +++ b/.github/workflows/npm-publish-v1.yml @@ -12,7 +12,7 @@ jobs: - uses: actions/checkout@v3 - uses: actions/setup-node@v3 with: - node-version: 12 + node-version: 14.15 - run: npm publish env: NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}} diff --git a/.github/workflows/npm-publish.yml b/.github/workflows/npm-publish.yml index 4427daff..a234b463 100644 --- a/.github/workflows/npm-publish.yml +++ b/.github/workflows/npm-publish.yml @@ -16,7 +16,7 @@ jobs: ref: ${{ github.event.inputs.tag }} - uses: actions/setup-node@v3 with: - node-version: 12 + node-version: 14.15 - run: cd v2 && npm publish env: NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}} diff --git a/.nvmrc b/.nvmrc index 82f87fa0..bbfaef74 100644 --- a/.nvmrc +++ b/.nvmrc @@ -1 +1 @@ -v12.18.4 +v14.15 diff --git a/package.json b/package.json index c876bf24..5cd1a240 100644 --- a/package.json +++ b/package.json @@ -38,6 +38,7 @@ "react-toastify": "^9.0.8", "rxjs": "^7.5.6", "typescript": "^4.8.3", + "uuid": "^9.0.0", "xterm": "^4.18.0", "xterm-addon-fit": "^0.5.0" }, @@ -79,6 +80,7 @@ "@types/storybook__addon-actions": "^5.2.1", "@types/storybook__addon-links": "^3.3.0", "@types/storybook__react": "^3.0.7", + "@types/uuid": "^9.0.1", "@types/yamljs": "^0.2.31", "babel-loader": "^8.2.5", "chai": "^4.3.7", diff --git a/src/components/autocomplete/autocomplete.tsx b/src/components/autocomplete/autocomplete.tsx index 63be3336..145eb19f 100644 --- a/src/components/autocomplete/autocomplete.tsx +++ b/src/components/autocomplete/autocomplete.tsx @@ -1,6 +1,7 @@ import {default as classNames} from 'classnames'; +import {CSSProperties, ReactNode} from 'react'; import * as React from 'react'; -import * as ReactAutocomplete from 'react-autocomplete'; +import ReactAutocomplete from 'react-autocomplete'; require('./autocomplete.scss'); export interface AutocompleteApi { @@ -106,16 +107,16 @@ export const Autocomplete = (props: AutocompleteProps) => { shouldItemRender={(item: AutocompleteOption, val: string) => { return !props.filterSuggestions || item.label.toLowerCase().includes(val.toLowerCase()); }} - renderMenu={function(menuItems, _, style) { + renderMenu={function(menuItems: ReactNode[], _: string, style: CSSProperties) { if (menuItems.length === 0) { return
; } return ; }} - getItemValue={(item) => item.label} + getItemValue={(item: any) => item.label} items={items} value={props.value} - renderItem={(item, isSelected) => ( + renderItem={(item: any, isSelected: boolean) => (