Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fe deps update #1238

Merged
merged 16 commits into from
Sep 21, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ jobs:
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: 13.2
node-version: 14.11.0
- run: ./ciFrontendTest.sh


2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
13.2.0
14.11.0
4 changes: 3 additions & 1 deletion ui/client/actions/nk/assignSettings.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
import {UnknownRecord} from "../../types/common"

type MetricsType = {
url: string,
defaultDashboard: string,
processingTypeToDashboard: {},
processingTypeToDashboard: UnknownRecord,
}

type FeaturesSettings = {
Expand Down
3 changes: 0 additions & 3 deletions ui/client/actions/nk/reportEvent.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,8 @@ export function reportEvent(eventInfo: EventInfo): ThunkAction {
type: "USER_TRACKING",
tracking: {
event: {
// eslint-disable-next-line @typescript-eslint/camelcase
e_c: eventInfo.category,
// eslint-disable-next-line @typescript-eslint/camelcase
e_a: eventInfo.action,
// eslint-disable-next-line @typescript-eslint/camelcase
e_n: eventInfo.name,
},
},
Expand Down
2 changes: 1 addition & 1 deletion ui/client/brace/theme/nussknacker.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
//based on https://github.com/thlorenz/brace/blob/master/theme/monokai.js

const nussknackerCssTheme = require('!raw-loader!./nussknacker.css');
const nussknackerCssTheme = require('!raw-loader!./nussknacker.css').default;

ace.define("ace/theme/nussknacker",["require","exports","module","ace/lib/dom"], function(acequire, exports, module) {

Expand Down
2 changes: 1 addition & 1 deletion ui/client/common/LoaderUtils.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
export function loadSvgContent(fileName) {
return require(`!raw-loader!../assets/img/${fileName}`)
return require(`!raw-loader!../assets/img/${fileName}`).default
}
6 changes: 4 additions & 2 deletions ui/client/components/Process/types.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
/* eslint-disable i18next/no-literal-string */
import {UnknownRecord} from "../../types/common"

export enum ActionType {
Deploy = "DEPLOY",
Cancel = "CANCEL",
Expand All @@ -21,7 +23,7 @@ export type ProcessActionType = {
action: ActionType,
commentId?: number,
comment?: string,
buildInfo?: {},
buildInfo?: UnknownRecord,
}

type ProcessHistoryEntry = $TodoType
Expand Down Expand Up @@ -64,6 +66,6 @@ export type ProcessStateType = {
tooltip?: string,
description?: string,
startTime?: Date,
attributes?: {},
attributes?: UnknownRecord,
errors?: Array<string>,
}
3 changes: 2 additions & 1 deletion ui/client/components/ProcessAttachments.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import {WithTranslation} from "react-i18next/src"
import {connect} from "react-redux"
import {mapDispatchWithEspActions} from "../actions/ActionsUtils"
import InlinedSvgs from "../assets/icons/InlinedSvgs"
import {UnknownRecord} from "../types/common"
import {NkButton} from "./NkButton"
import HttpService from "../http/HttpService"
import {RootState} from "../reducers/index"
Expand All @@ -14,7 +15,7 @@ import {FocusOutline, InputWithFocus} from "./withFocus"

type State = { pendingRequest: boolean }

type OwnProps = {} & WithTranslation
type OwnProps = UnknownRecord & WithTranslation

export class ProcessAttachments extends React.Component<Props, State> {
private initState: State
Expand Down
4 changes: 2 additions & 2 deletions ui/client/components/ProcessHistory.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,16 @@ import {Scrollbars} from "react-custom-scrollbars"
import {connect} from "react-redux"
import {mapDispatchWithEspActions} from "../actions/ActionsUtils"
import {unsavedProcessChanges} from "../common/DialogMessages"
import ProcessUtils from "../common/ProcessUtils"
import styles from "../stylesheets/processHistory.styl"
import {UnknownRecord} from "../types/common"
import Date from "./common/Date"
import {compose} from "redux"
import {WithTranslation} from "react-i18next/src"
import {withTranslation} from "react-i18next"
import {ProcessVersionType} from "./Process/types"
import {isBusinessView, isSaveDisabled} from "../reducers/selectors/graph"

type OwnProps = {}
type OwnProps = UnknownRecord

type State = {
currentVersion: ProcessVersionType,
Expand Down
3 changes: 2 additions & 1 deletion ui/client/components/Spinner.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
import React from "react"
import "../stylesheets/spinner.styl"
import {UnknownRecord} from "../types/common"

type State = {}
type State = UnknownRecord

type Props = {
show: boolean,
Expand Down
4 changes: 3 additions & 1 deletion ui/client/components/graph/NodeUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,11 @@ import {
ProcessDefinitionData,
EdgeType, UINodeType,
} from "../../types"
import {UnknownRecord} from "../../types/common"

class NodeUtils {

isNode = (obj: {}): obj is NodeType => {
isNode = (obj: UnknownRecord): obj is NodeType => {
return !_.isEmpty(obj) && _.has(obj, "id") && _.has(obj, "type")
}

Expand Down Expand Up @@ -197,6 +198,7 @@ class NodeUtils {
}

//TODO: this function should already exists in lodash?
// eslint-disable-next-line @typescript-eslint/ban-types
_update = <T extends {}, U>(path: string, fun: (u: U) => U, object: T): T => {
return fp.set(path, fun(_.get(object, path)), object)
}
Expand Down
7 changes: 4 additions & 3 deletions ui/client/components/graph/node-modal/AdditionalProperty.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import {get} from "lodash"
import {UnknownFunction} from "../../../types/common"
import EditableEditor from "./editors/EditableEditor"
import React from "react"
import {PossibleValue} from "./editors/Validators"
Expand All @@ -16,8 +17,8 @@ type Props = {
propertyConfig: AdditionalPropertyConfig,
propertyErrors: Array<any>,
editedNode: any,
onChange: Function,
renderFieldLabel: Function,
onChange: UnknownFunction,
renderFieldLabel: UnknownFunction,
readOnly: boolean,
}

Expand All @@ -44,7 +45,7 @@ export default function AdditionalProperty(props: Props) {
key={propertyName}
showSwitch={showSwitch}
showValidation={showValidation}
//AdditionalProperties do not use any variables
//AdditionalProperties do not use any variables
variableTypes={{}}
errors={propertyErrors}
/>
Expand Down
2 changes: 1 addition & 1 deletion ui/client/components/graph/node-modal/Variable.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ const Variable = (props: Props) => {
fieldLabel={"Expression"}
renderFieldLabel={renderFieldLabel}
expressionObj={node.value}
onValueChange={((value) => onChange("value.expression", value))}
onValueChange={((value: string) => onChange("value.expression", value))}
readOnly={readOnly}
showValidation={showValidation}
showSwitch={false}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import React from "react"
import {UnknownFunction} from "../../../../types/common"
import {editors, EditorType, simpleEditorValidators} from "./expression/Editor"
import {isEmpty} from "lodash"
import {ExpressionObj} from "./expression/types"
Expand All @@ -10,7 +11,7 @@ import {ParamType} from "./types"
type Props = {
expressionObj: ExpressionObj,
showSwitch: boolean,
renderFieldLabel?: Function,
renderFieldLabel?: UnknownFunction,
fieldLabel?: string,
readOnly: boolean,
rowClassName?: string,
Expand All @@ -20,7 +21,7 @@ type Props = {
fieldName?: string,
isMarked?: boolean,
showValidation?: boolean,
onValueChange: Function,
onValueChange: UnknownFunction,
errors?: Array<Error>,
variableTypes: VariableTypes,
validationLabelInfo?: string,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
import i18next from "i18next"
import {isEmpty} from "lodash"
import React from "react"
import {UnknownFunction} from "../../../../../types/common"
import FixedValuesEditor from "./FixedValuesEditor"
import {ExpressionObj} from "./types"
import {SimpleEditor} from "./Editor"

type Props = {
expressionObj: ExpressionObj,
onValueChange: Function,
onValueChange: UnknownFunction,
readOnly: boolean,
className: string,
values?: $TodoType,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import {UnknownFunction} from "../../../../../../types/common"
import {ExpressionObj} from "../types"
import {Validator} from "../../Validators"
import React, {useEffect, useRef, useState} from "react"
Expand All @@ -12,7 +13,7 @@ export type CronExpression = string

type Props = {
expressionObj: ExpressionObj,
onValueChange: Function,
onValueChange: UnknownFunction,
validators: Array<Validator>,
showValidation?: boolean,
readOnly: boolean,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import {UnknownFunction} from "../../../../../types/common"
import {DualEditorMode, editors, SimpleEditor} from "./Editor"
import SwitchIcon from "./SwitchIcon"
import React, {useState} from "react"
Expand All @@ -14,10 +15,10 @@ type Props = {
validators: Array<$TodoType>,
isMarked: boolean,
showValidation: boolean,
onValueChange: Function,
onValueChange: UnknownFunction,
className: string,
variableTypes: VariableTypes,
showSwitch: boolean
showSwitch: boolean,
}

export default function DualParameterEditor(props: Props) {
Expand All @@ -43,13 +44,15 @@ export default function DualParameterEditor(props: Props) {
(<SimpleEditor {...editorProps} editorConfig={editorConfig.simpleEditor}/>)
}
{showSwitch ?
(<SwitchIcon
(
<SwitchIcon
switchable={switchable}
hint={hint}
onClick={(_) => setDisplayRawEditor(!displayRawEditor)}
displayRawEditor={displayRawEditor}
readOnly={readOnly}
/>) : null }
/>
) : null }
</>
)
}
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import React from "react"
import {UnknownFunction} from "../../../../../../types/common"
import {ExpressionObj} from "../types"
import {Validator} from "../../Validators"
import "./timeRange.styl"
import TimeRangeEditor from "./TimeRangeEditor"
import _ from "lodash"
import i18next from "i18next"
import {TimeRange, TimeRangeComponentType} from "./TimeRangeComponent"
import {Formatter, FormatterType, typeFormatters} from "../Formatter"
import moment from "moment"

Expand All @@ -17,7 +17,7 @@ export type Duration = {

type Props = {
expressionObj: ExpressionObj,
onValueChange: Function,
onValueChange: UnknownFunction,
validators: Array<Validator>,
showValidation?: boolean,
readOnly: boolean,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import {UnknownFunction} from "../../../../../../types/common"
import {ExpressionObj} from "../types"
import {Validator} from "../../Validators"
import React from "react"
import moment from "moment"
import TimeRangeEditor from "./TimeRangeEditor"
import _ from "lodash"
import i18next from "i18next"
import {TimeRangeComponentType} from "./TimeRangeComponent"
import {Formatter, FormatterType, typeFormatters} from "../Formatter"

export type Period = {
Expand All @@ -16,7 +16,7 @@ export type Period = {

type Props = {
expressionObj: ExpressionObj,
onValueChange: Function,
onValueChange: UnknownFunction,
validators: Array<Validator>,
showValidation?: boolean,
readOnly: boolean,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import React from "react"
import "./timeRange.styl"
import classNames from "classnames"
import {UnknownFunction} from "../../../../../../types/common"
import {InputWithFocus} from "../../../../../withFocus"
import {Duration} from "./DurationEditor"
import {Period} from "./PeriodEditor"
Expand Down Expand Up @@ -43,7 +44,7 @@ const components: Record<string, TimeRangeComponentType> = {

type Props = {
timeRangeComponentName: TimeRange,
onChange: Function,
onChange: UnknownFunction,
value: Duration | Period,
readOnly: boolean,
showValidation: boolean,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,15 @@
import React, {useEffect, useState} from "react"
import {UnknownFunction} from "../../../../../../types/common"
import {Period} from "./PeriodEditor"
import TimeRangeSection from "./TimeRangeSection"
import {Validator} from "../../Validators"
import {TimeRange} from "./TimeRangeComponent"
import {Duration} from "./DurationEditor"

type Props = {
encode: Function,
decode: Function,
onValueChange: Function,
encode: UnknownFunction,
decode: ((exp: string) => Duration)|((exp: string) => Period),
onValueChange: UnknownFunction,
editorConfig: $TodoType,
readOnly: boolean,
showValidation: boolean,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import {UnknownFunction} from "../../../../../../types/common"
import TimeRangeComponent, {TimeRange} from "./TimeRangeComponent"
import ValidationLabels from "../../../../../modals/ValidationLabels"
import React from "react"
Expand All @@ -8,7 +9,7 @@ import "./timeRange.styl"

type Props = {
components: Array<TimeRange>,
onComponentValueChange: Function,
onComponentValueChange: UnknownFunction,
readOnly: boolean,
showValidation: boolean,
validators: Array<Validator>,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,26 +1,27 @@
import _ from "lodash"
import React from "react"
import {NodeType, UIParameter, VariableTypes} from "../../../../../types"
import {UnknownFunction} from "../../../../../types/common"
import ExpressionTestResults from "../../tests/ExpressionTestResults"
import EditableEditor from "../EditableEditor"
import {EditorType} from "./Editor"
import {NodeType, UIParameter, VariableTypes} from "../../../../../types"
import {Error} from "../Validators"
import {EditorType} from "./Editor"

type Props = {
fieldName: string,
fieldLabel: string,
exprPath: string,
isEditMode: boolean,
editedNode: NodeType,
isMarked: Function,
isMarked: (...args: unknown[]) => boolean,
showValidation: boolean,
showSwitch: boolean,
parameterDefinition: UIParameter,
setNodeDataAt: Function,
setNodeDataAt: UnknownFunction,
testResultsToShow: $TodoType,
testResultsToHide: $TodoType,
toggleTestResult: Function,
renderFieldLabel: Function,
toggleTestResult: UnknownFunction,
renderFieldLabel: UnknownFunction,
errors: Array<Error>,
variableTypes: VariableTypes,
}
Expand Down
Loading