Skip to content
This repository was archived by the owner on Jul 9, 2025. It is now read-only.
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
4 changes: 0 additions & 4 deletions Composer/.eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,10 +47,6 @@ module.exports = {
'security/detect-pseudoRandomBytes': 'error',
'security/detect-unsafe-regex': 'error',
},
parserOptions: {
// temp fix for https://github.com/typescript-eslint/typescript-eslint/issues/864
createDefaultProgram: true,
},
overrides: [
{
files: ['**/*.+(test|spec).+(js|jsx|ts|tsx)'],
Expand Down
4 changes: 2 additions & 2 deletions Composer/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,8 @@
"@babel/preset-env": "7.3.0",
"@babel/preset-react": "^7.0.0",
"@babel/preset-typescript": "^7.3.3",
"@typescript-eslint/eslint-plugin": "2.3.3",
"@typescript-eslint/parser": "2.3.3",
"@typescript-eslint/eslint-plugin": "2.4.0",
"@typescript-eslint/parser": "2.4.0",
"babel-jest": "24.0.0",
"concurrently": "^4.1.0",
"cypress": "3.4.0",
Expand Down
14 changes: 8 additions & 6 deletions Composer/packages/extensions/obiformeditor/src/FormEditor.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React from 'react';
import React, { useState } from 'react';
import { Dropdown } from 'office-ui-fabric-react/lib/Dropdown';
import { JSONSchema6Definition, JSONSchema6 } from 'json-schema';
import merge from 'lodash.merge';
Expand Down Expand Up @@ -35,13 +35,14 @@ export interface FormEditorProps {

export const FormEditor: React.FunctionComponent<FormEditorProps> = props => {
const { data, schemas, memory, dialogs, shellApi } = props;
const type = getType(data);
const [localData, setLocalData] = useState(data);
const type = getType(localData);

if (!type) {
return (
<div>
Malformed data: missing $type.
<pre>{JSON.stringify(data, null, 2)}</pre>
<pre>{JSON.stringify(localData, null, 2)}</pre>
</div>
);
}
Expand All @@ -53,7 +54,7 @@ export const FormEditor: React.FunctionComponent<FormEditorProps> = props => {
return (
<div>
Malformed data: missing type defintion in schema.
<pre>{JSON.stringify(data, null, 2)}</pre>
<pre>{JSON.stringify(localData, null, 2)}</pre>
</div>
);
}
Expand All @@ -70,8 +71,9 @@ export const FormEditor: React.FunctionComponent<FormEditorProps> = props => {
const dialogOptions = dialogs.map(f => ({ value: f.id, label: f.displayName }));

const onChange = newValue => {
if (!isEqual(newValue.formData, data)) {
if (!isEqual(newValue.formData, localData)) {
props.onChange(newValue.formData);
setLocalData(newValue.formData);
}
};

Expand All @@ -97,7 +99,7 @@ export const FormEditor: React.FunctionComponent<FormEditorProps> = props => {
noValidate
className="schemaForm"
onChange={onChange}
formData={data}
formData={localData}
onBlur={props.onBlur}
schema={dialogSchema}
uiSchema={dialogUiSchema}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,9 +80,9 @@ export const ElementRenderer: FC<NodeProps> = ({ id, data, onEvent, onResize, ta
css={css`
display: inline-block;
position: relative;
border-radius: 1px 1px 0 0;
${nodeFocused && nodeBorderSelectedStyle};
border-radius: 2px 2px 0 0;
${nodeSelected && nodeBorderSelectedStyle};
${nodeFocused && nodeBorderSelectedStyle};
${nodeDoubleSelected && nodeBorderDoubleSelectedStyle};
&:hover {
${!nodeFocused && nodeBorderHoveredStyle}
Expand Down
103 changes: 79 additions & 24 deletions Composer/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2510,41 +2510,42 @@
resolved "https://registry.yarnpkg.com/@types/yargs/-/yargs-12.0.10.tgz#17a8ec65cd8e88f51b418ceb271af18d3137df67"
integrity sha512-WsVzTPshvCSbHThUduGGxbmnwcpkgSctHGHTqzWyFg4lYAuV5qXlyFPOsP3OWqCINfmg/8VXP+zJaa4OxEsBQQ==

"@typescript-eslint/eslint-plugin@2.3.3":
version "2.3.3"
resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-2.3.3.tgz#71e06c6887650301e02105c99b4c8f67454157e3"
integrity sha512-12cCbwu5PbQudkq2xCIS/QhB7hCMrsNPXK+vJtqy/zFqtzVkPRGy12O5Yy0gUK086f3VHV/P4a4R4CjMW853pA==
"@typescript-eslint/eslint-plugin@2.4.0":
version "2.4.0"
resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-2.4.0.tgz#aaf6b542ff75b78f4191a8bf1c519184817caa24"
integrity sha512-se/YCk7PUoyMwSm/u3Ii9E+BgDUc736uw/lXCDpXEqRgPGsoBTtS8Mntue/vZX8EGyzGplYuePBuVyhZDM9EpQ==
dependencies:
"@typescript-eslint/experimental-utils" "2.3.3"
"@typescript-eslint/experimental-utils" "2.4.0"
eslint-utils "^1.4.2"
functional-red-black-tree "^1.0.1"
regexpp "^2.0.1"
tsutils "^3.17.1"

"@typescript-eslint/experimental-utils@2.3.3":
version "2.3.3"
resolved "https://registry.yarnpkg.com/@typescript-eslint/experimental-utils/-/experimental-utils-2.3.3.tgz#0685613063ff397cfa9209be2e6e81c0382a9b11"
integrity sha512-MQ4jKPMTU1ty4TigJCRKFPye2qyQdH8jzIIkceaHgecKFmkNS1hXPqKiZ+mOehkz6+HcN5Nuvwm+frmWZR9tdg==
"@typescript-eslint/experimental-utils@2.4.0":
version "2.4.0"
resolved "https://registry.yarnpkg.com/@typescript-eslint/experimental-utils/-/experimental-utils-2.4.0.tgz#dd8f3f466be25c3610a06fed22cfb6e6aa17f6d9"
integrity sha512-2cvhNaJoWavgTtnC7e1jUSPZQ7e4U2X9Yoy5sQmkS7lTESuyuZrlRcaoNuFfYEd6hgrmMU7+QoSp8Ad+kT1nfA==
dependencies:
"@types/json-schema" "^7.0.3"
"@typescript-eslint/typescript-estree" "2.3.3"
"@typescript-eslint/typescript-estree" "2.4.0"
eslint-scope "^5.0.0"

"@typescript-eslint/parser@2.3.3":
version "2.3.3"
resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-2.3.3.tgz#af519d6572bdee3e9610e21c8362766858976bc1"
integrity sha512-+cV53HuYFeeyrNW8x/rgPmbVrzzp/rpRmwbJnNtwn4K8mroL1BdjxwQh7X9cUHp9rm4BBiEWmD3cSBjKG7d5mw==
"@typescript-eslint/parser@2.4.0":
version "2.4.0"
resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-2.4.0.tgz#fe43ed5fec14af03d3594fce2c3b7ec4c8df0243"
integrity sha512-IouAKi/grJ4MFrwdXIJ1GHAwbPWYgkT3b/x8Q49F378c9nwgxVkO76e0rZeUVpwHMaUuoKG2sUeK0XGkwdlwkw==
dependencies:
"@types/eslint-visitor-keys" "^1.0.0"
"@typescript-eslint/experimental-utils" "2.3.3"
"@typescript-eslint/typescript-estree" "2.3.3"
"@typescript-eslint/experimental-utils" "2.4.0"
"@typescript-eslint/typescript-estree" "2.4.0"
eslint-visitor-keys "^1.1.0"

"@typescript-eslint/typescript-estree@2.3.3":
version "2.3.3"
resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-2.3.3.tgz#be802220876bedfb80384cde1d46fe57ae7abf71"
integrity sha512-GkACs12Xp8d/STunNv/iSMYJFQrkrax9vuPZySlgSzoJJtw1cp6tbEw4qsLskQv6vloLrkFJHcTJ0a/yCB5cIA==
"@typescript-eslint/typescript-estree@2.4.0":
version "2.4.0"
resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-2.4.0.tgz#722c95493e1b7682893edaaaec0e69f36917feef"
integrity sha512-/DzDAtMqF5d9IlXrrvu/Id/uoKjnSxf/3FbtKK679a/T7lbDM8qQuirtGvFy6Uh+x0hALuCMwnMfUf0P24/+Iw==
dependencies:
chokidar "^3.0.2"
glob "^7.1.4"
is-glob "^4.0.1"
lodash.unescape "4.0.1"
Expand Down Expand Up @@ -3383,6 +3384,14 @@ anymatch@^2.0.0:
micromatch "^3.1.4"
normalize-path "^2.1.1"

anymatch@~3.1.1:
version "3.1.1"
resolved "https://registry.yarnpkg.com/anymatch/-/anymatch-3.1.1.tgz#c55ecf02185e2469259399310c173ce31233b142"
integrity sha512-mM8522psRCqzV+6LhomX5wgp25YVibjh8Wj23I5RPkPppSVSjyKD2A2mBJmWGa+KN7f2D6LNh9jkBCeyLktzjg==
dependencies:
normalize-path "^3.0.0"
picomatch "^2.0.4"

append-transform@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/append-transform/-/append-transform-1.0.0.tgz#046a52ae582a228bd72f58acfbe2967c678759ab"
Expand Down Expand Up @@ -4906,6 +4915,11 @@ binary-extensions@^1.0.0:
resolved "https://registry.yarnpkg.com/binary-extensions/-/binary-extensions-1.13.0.tgz#9523e001306a32444b907423f1de2164222f6ab1"
integrity sha512-EgmjVLMn22z7eGGv3kcnHwSnJXmFHjISTY9E/S5lIcTD3Oxw05QTcBLNkJFzcb3cNueUdF/IN4U+d78V0zO8Hw==

binary-extensions@^2.0.0:
version "2.0.0"
resolved "https://registry.yarnpkg.com/binary-extensions/-/binary-extensions-2.0.0.tgz#23c0df14f6a88077f5f986c0d167ec03c3d5537c"
integrity sha512-Phlt0plgpIIBOGTT/ehfFnbNlfsDEiqmzE2KRXoX1bLIlir4X/MR+zSyBEkL05ffWgnRSf/DXv+WrUAVr93/ow==

bitsyntax@~0.1.0:
version "0.1.0"
resolved "https://registry.yarnpkg.com/bitsyntax/-/bitsyntax-0.1.0.tgz#b0c59acef03505de5a2ed62a2f763c56ae1d6205"
Expand Down Expand Up @@ -5107,7 +5121,7 @@ braces@^2.3.1, braces@^2.3.2:
split-string "^3.0.2"
to-regex "^3.0.1"

braces@^3.0.1:
braces@^3.0.1, braces@~3.0.2:
version "3.0.2"
resolved "https://registry.yarnpkg.com/braces/-/braces-3.0.2.tgz#3454e1a462ee8d599e236df336cd9ea4f8afe107"
integrity sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==
Expand Down Expand Up @@ -5718,6 +5732,21 @@ chokidar@^2.1.6:
optionalDependencies:
fsevents "^1.2.7"

chokidar@^3.0.2:
version "3.2.1"
resolved "https://registry.yarnpkg.com/chokidar/-/chokidar-3.2.1.tgz#4634772a1924512d990d4505957bf3a510611387"
integrity sha512-/j5PPkb5Feyps9e+jo07jUZGvkB5Aj953NrI4s8xSVScrAo/RHeILrtdb4uzR7N6aaFFxxJ+gt8mA8HfNpw76w==
dependencies:
anymatch "~3.1.1"
braces "~3.0.2"
glob-parent "~5.1.0"
is-binary-path "~2.1.0"
is-glob "~4.0.1"
normalize-path "~3.0.0"
readdirp "~3.1.3"
optionalDependencies:
fsevents "~2.1.0"

chownr@^1.0.1, chownr@^1.1.1:
version "1.1.1"
resolved "https://registry.yarnpkg.com/chownr/-/chownr-1.1.1.tgz#54726b8b8fff4df053c42187e801fb4412df1494"
Expand Down Expand Up @@ -9354,6 +9383,11 @@ fsevents@^1.0.0, fsevents@^1.2.7:
nan "^2.9.2"
node-pre-gyp "^0.10.0"

fsevents@~2.1.0:
version "2.1.1"
resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-2.1.1.tgz#74c64e21df71721845d0c44fe54b7f56b82995a9"
integrity sha512-4FRPXWETxtigtJW/gxzEDsX1LVbPAM93VleB83kZB+ellqbHMkyt2aJfuzNLRvFPnGi6bcE5SvfxgbXPeKteJw==

ftp@~0.3.10:
version "0.3.10"
resolved "https://registry.yarnpkg.com/ftp/-/ftp-0.3.10.tgz#9197d861ad8142f3e63d5a83bfe4c59f7330885d"
Expand Down Expand Up @@ -9507,6 +9541,13 @@ glob-parent@^3.1.0:
is-glob "^3.1.0"
path-dirname "^1.0.0"

glob-parent@~5.1.0:
version "5.1.0"
resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-5.1.0.tgz#5f4c1d1e748d30cd73ad2944b3577a81b081e8c2"
integrity sha512-qjtRgnIVmOfnKUE3NJAQEdk+lKrxfw8t5ke7SXtfMTHcjsBfOfWXCQfdb30zfDoZQ2IRSIiidmjtbHZPZ++Ihw==
dependencies:
is-glob "^4.0.1"

glob-to-regexp@^0.3.0:
version "0.3.0"
resolved "https://registry.yarnpkg.com/glob-to-regexp/-/glob-to-regexp-0.3.0.tgz#8c5a1494d2066c570cc3bfe4496175acc4d502ab"
Expand Down Expand Up @@ -10659,6 +10700,13 @@ is-binary-path@^1.0.0:
dependencies:
binary-extensions "^1.0.0"

is-binary-path@~2.1.0:
version "2.1.0"
resolved "https://registry.yarnpkg.com/is-binary-path/-/is-binary-path-2.1.0.tgz#ea1f7f3b80f064236e83470f86c09c254fb45b09"
integrity sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==
dependencies:
binary-extensions "^2.0.0"

is-boolean-object@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/is-boolean-object/-/is-boolean-object-1.0.0.tgz#98f8b28030684219a95f375cfbd88ce3405dff93"
Expand Down Expand Up @@ -10848,7 +10896,7 @@ is-glob@^4.0.0:
dependencies:
is-extglob "^2.1.1"

is-glob@^4.0.1:
is-glob@^4.0.1, is-glob@~4.0.1:
version "4.0.1"
resolved "https://registry.yarnpkg.com/is-glob/-/is-glob-4.0.1.tgz#7567dbe9f2f5e2467bc77ab83c4a29482407a5dc"
integrity sha512-5G0tKtBTFImOqDnLB2hG6Bp2qcKEFduo4tZu9MT/H6NQv/ghhy30o55ufafxJ/LdH79LLs2Kfrn85TLKyA7BUg==
Expand Down Expand Up @@ -13808,7 +13856,7 @@ normalize-path@^2.0.0, normalize-path@^2.0.1, normalize-path@^2.1.1:
dependencies:
remove-trailing-separator "^1.0.1"

normalize-path@^3.0.0:
normalize-path@^3.0.0, normalize-path@~3.0.0:
version "3.0.0"
resolved "https://registry.yarnpkg.com/normalize-path/-/normalize-path-3.0.0.tgz#0dcd69ff23a1c9b11fd0978316644a0388216a65"
integrity sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==
Expand Down Expand Up @@ -14704,7 +14752,7 @@ phantomjs-prebuilt@2.1.16, phantomjs-prebuilt@^2.1.7:
request-progress "^2.0.1"
which "^1.2.10"

picomatch@^2.0.5:
picomatch@^2.0.4, picomatch@^2.0.5:
version "2.0.7"
resolved "https://registry.yarnpkg.com/picomatch/-/picomatch-2.0.7.tgz#514169d8c7cd0bdbeecc8a2609e34a7163de69f6"
integrity sha512-oLHIdio3tZ0qH76NybpeneBhYVj0QFTfXEFTc/B3zKQspYfYYkWYgFsmzo+4kvId/bQRcNkVeguI3y+CD22BtA==
Expand Down Expand Up @@ -16184,6 +16232,13 @@ readdirp@^2.0.0, readdirp@^2.2.1:
micromatch "^3.1.10"
readable-stream "^2.0.2"

readdirp@~3.1.3:
version "3.1.3"
resolved "https://registry.yarnpkg.com/readdirp/-/readdirp-3.1.3.tgz#d6e011ed5b9240a92f08651eeb40f7942ceb6cc1"
integrity sha512-ZOsfTGkjO2kqeR5Mzr5RYDbTGYneSkdNKX2fOX2P5jF7vMrd/GNnIAUtDldeHHumHUCQ3V05YfWUdxMPAsRu9Q==
dependencies:
picomatch "^2.0.4"

readline-sync@^1.4.9:
version "1.4.9"
resolved "https://registry.yarnpkg.com/readline-sync/-/readline-sync-1.4.9.tgz#3eda8e65f23cd2a17e61301b1f0003396af5ecda"
Expand Down