* chore: update settings to relative imports

* fix: remove REMOTE_WORKFLOW action type

* fix: typo
This commit is contained in:
Matt Mazzola 2020-02-20 16:36:51 -08:00 коммит произвёл GitHub
Родитель ed395fad4a
Коммит 069b37bbc4
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
3 изменённых файлов: 18 добавлений и 6 удалений

4
.vscode/settings.json поставляемый
Просмотреть файл

@ -6,7 +6,9 @@
"docs/**/*": true,
"build/**/*": true,
"lib/**/*": true,
"dist/**/*": true,
},
"editor.formatOnSave": true,
"typescript.format.semicolons": "remove"
"typescript.format.semicolons": "remove",
"typescript.preferences.importModuleSpecifier": "relative"
}

Просмотреть файл

@ -14,7 +14,6 @@ export enum ActionTypes {
SET_ENTITY = 'SET_ENTITY',
DISPATCH = 'DISPATCH',
CHANGE_MODEL = 'CHANGE_MODEL',
REMOTE_WORKFLOW = 'REMOTE_WORKFLOW',
}
export enum ConditionType {

Просмотреть файл

@ -134,9 +134,9 @@ const convertEntityToConditionalTags = (entity: CLM.EntityBase, expand = true):
}
// Returns deduplicated array of conditions currently used as required or negative conditions.
const conditionalEntityTags = (entities: CLM.EntityBase[], actionz: CLM.ActionBase[]): IConditionalTag[] => {
const conditionalEntityTags = (entities: CLM.EntityBase[], actions: CLM.ActionBase[]): IConditionalTag[] => {
// Might have duplicates since different actions can have same conditions
const actionConditionTags = actionz
const actionConditionTags = actions
.map(a => [...a.requiredConditions, ...a.negativeConditions])
.reduce((a, b) => [...a, ...b], [])
.map(c => convertConditionToConditionalTag(c, entities))
@ -235,7 +235,7 @@ const tryCreateSlateValue = (actionType: string, slotName: string, content: obje
}
}
const actionTypeOptions = (Object.values(CLM.ActionTypes) as string[])
const actionTypeOptions = Object.values<string>(CLM.ActionTypes)
.map<OF.IDropdownOption>(actionTypeString => {
return {
key: actionTypeString,
@ -1785,6 +1785,17 @@ class ActionCreatorEditor extends React.Component<Props, ComponentState> {
? this.props.actions.find(a => a.actionId === this.state.repromptActionId)
: undefined
const isDispatcherFeatureEnabled = Util.isFeatureEnabled(this.props.settings.features, FeatureStrings.DISPATCHER)
const availableActionTypeOptions = actionTypeOptions
.filter(actionTypeOption => {
if (isDispatcherFeatureEnabled === false
&& actionTypeOption.key === CLM.ActionTypes.DISPATCH) {
return false
}
return true
})
return (
<OF.Modal
isOpen={this.props.open}
@ -1800,7 +1811,7 @@ class ActionCreatorEditor extends React.Component<Props, ComponentState> {
<TC.Dropdown
data-testid="dropdown-action-type"
label="Action Type"
options={actionTypeOptions}
options={availableActionTypeOptions}
onChange={(event, actionTypeOption) => this.onChangeActionType(actionTypeOption)}
selectedKey={this.state.selectedActionTypeOptionKey}
disabled={disabled}