From 66bfe4832e0269f314192bb2c1add2eaa00ae919 Mon Sep 17 00:00:00 2001 From: Tony Anziano Date: Wed, 21 Nov 2018 13:45:52 -0800 Subject: [PATCH 01/11] WIP tabs accessibility. --- .../botCreationDialog.scss.d.ts | 2 -- .../botSettingsEditor/botSettingsEditor.scss | 2 +- .../app/client/src/ui/shell/mdi/tab/tab.scss | 8 +++++ .../client/src/ui/shell/mdi/tab/tab.scss.d.ts | 1 + .../app/client/src/ui/shell/mdi/tab/tab.tsx | 34 +++++++++++++++---- .../src/ui/shell/multiTabs/multiTabs.scss | 1 + .../src/ui/shell/multiTabs/multiTabs.tsx | 15 ++++++-- .../src/ui/shell/multiTabs/tabBar/tabBar.tsx | 10 ++---- 8 files changed, 55 insertions(+), 18 deletions(-) diff --git a/packages/app/client/src/ui/dialogs/botCreationDialog/botCreationDialog.scss.d.ts b/packages/app/client/src/ui/dialogs/botCreationDialog/botCreationDialog.scss.d.ts index 6aef6f626..a21491311 100644 --- a/packages/app/client/src/ui/dialogs/botCreationDialog/botCreationDialog.scss.d.ts +++ b/packages/app/client/src/ui/dialogs/botCreationDialog/botCreationDialog.scss.d.ts @@ -3,8 +3,6 @@ export const main: string; export const multiInputRow: string; export const inputContainer: string; export const botCreateForm: string; -export const checkboxAnchorContainer: string; -export const link: string; export const endpointWarning: string; export const key: string; export const encryptKeyCheckBox: string; diff --git a/packages/app/client/src/ui/dialogs/botSettingsEditor/botSettingsEditor.scss b/packages/app/client/src/ui/dialogs/botSettingsEditor/botSettingsEditor.scss index d519900ae..d1f7af626 100644 --- a/packages/app/client/src/ui/dialogs/botSettingsEditor/botSettingsEditor.scss +++ b/packages/app/client/src/ui/dialogs/botSettingsEditor/botSettingsEditor.scss @@ -19,8 +19,8 @@ .encrypt-key-check-box { margin-top: 30px; + span { - width: auto; margin-right: 3px; } } diff --git a/packages/app/client/src/ui/shell/mdi/tab/tab.scss b/packages/app/client/src/ui/shell/mdi/tab/tab.scss index 37cd3a579..da1f3557a 100644 --- a/packages/app/client/src/ui/shell/mdi/tab/tab.scss +++ b/packages/app/client/src/ui/shell/mdi/tab/tab.scss @@ -94,3 +94,11 @@ opacity: 1; } } + +.test-tab { + position: absolute; + top: 1px; + left: 1px; + right: 1px; + bottom: 1px; +} diff --git a/packages/app/client/src/ui/shell/mdi/tab/tab.scss.d.ts b/packages/app/client/src/ui/shell/mdi/tab/tab.scss.d.ts index 297bfd711..9d5b9b72a 100644 --- a/packages/app/client/src/ui/shell/mdi/tab/tab.scss.d.ts +++ b/packages/app/client/src/ui/shell/mdi/tab/tab.scss.d.ts @@ -5,3 +5,4 @@ export const editorTabClose: string; export const truncatedTabText: string; export const draggedOverEditorTab: string; export const activeEditorTab: string; +export const testTab: string; diff --git a/packages/app/client/src/ui/shell/mdi/tab/tab.tsx b/packages/app/client/src/ui/shell/mdi/tab/tab.tsx index 737788cb0..bb549320b 100644 --- a/packages/app/client/src/ui/shell/mdi/tab/tab.tsx +++ b/packages/app/client/src/ui/shell/mdi/tab/tab.tsx @@ -67,33 +67,55 @@ class TabComponent extends React.Component { render() { const activeClassName = this.props.active ? styles.activeEditorTab : ''; const draggedOverClassName = this.state.draggedOver ? styles.draggedOverEditorTab : ''; + return (
+
 
{ this.props.label } { this.props.dirty ? * : null } - - +
); + + // return ( + //
+ // + // { this.props.label } + // { this.props.dirty ? * : null } + // + // + // + //
+ // ); } - private onCloseButtonKeyPress = (event: KeyboardEvent) => { + private onCloseButtonKeyPress = (event: any, _meow?: KeyboardEvent) => { if (event.key === ' ' || event.keyCode === 13) { this.props.onCloseClick(this.props.documentId); } } - private onCloseClick = (event: SyntheticEvent): void => { + private onCloseClick = (event: SyntheticEvent): void => { event.stopPropagation(); this.props.onCloseClick(this.props.documentId); } diff --git a/packages/app/client/src/ui/shell/multiTabs/multiTabs.scss b/packages/app/client/src/ui/shell/multiTabs/multiTabs.scss index f049b1d54..a9a917493 100644 --- a/packages/app/client/src/ui/shell/multiTabs/multiTabs.scss +++ b/packages/app/client/src/ui/shell/multiTabs/multiTabs.scss @@ -21,6 +21,7 @@ border: 0; outline: 0; } + &:focus::after { content: ''; position: absolute; diff --git a/packages/app/client/src/ui/shell/multiTabs/multiTabs.tsx b/packages/app/client/src/ui/shell/multiTabs/multiTabs.tsx index 100a7ea98..ea9b12528 100644 --- a/packages/app/client/src/ui/shell/multiTabs/multiTabs.tsx +++ b/packages/app/client/src/ui/shell/multiTabs/multiTabs.tsx @@ -63,10 +63,13 @@ class MultiTabsComponent extends React.Component { activeIndex={ this.props.value }> { React.Children.map(this.props.children, (tabbedDocument: any, index) => - + ) } @@ -91,6 +94,14 @@ class MultiTabsComponent extends React.Component { } } + private handleKeyDown = (event: React.KeyboardEvent, nextValue: number): void => { + let { key = '' } = event; + key = key.toLowerCase(); + if (key === ' ' || key === 'enter') { + this.handleTabClick(nextValue); + } + } + private setRef = (input) => { this.childRefs.push(input); } diff --git a/packages/app/client/src/ui/shell/multiTabs/tabBar/tabBar.tsx b/packages/app/client/src/ui/shell/multiTabs/tabBar/tabBar.tsx index 90a303172..7779a07ce 100644 --- a/packages/app/client/src/ui/shell/multiTabs/tabBar/tabBar.tsx +++ b/packages/app/client/src/ui/shell/multiTabs/tabBar/tabBar.tsx @@ -100,13 +100,9 @@ class TabBarComponent extends React.Component { onDragOver={ this.onDragOver } onDragLeave={ this.onDragLeave } onDrop={ this.onDrop }> -
    - { - React.Children.map(this.props.children, (child, index) => -
  • { child }
  • - ) - } -
+
+ { this.props.children } +
{ this.widgets }
From 32603886b8c1ff1cf4baf661d046129843f1da82 Mon Sep 17 00:00:00 2001 From: Tony Anziano Date: Mon, 26 Nov 2018 12:39:09 -0800 Subject: [PATCH 02/11] Syncd with latest. --- package-lock.json | 194 +++++++++--------- .../client/src/commands/electronCommands.ts | 6 - .../data/sagas/servicesExplorerSagas.spec.ts | 22 +- .../src/data/sagas/servicesExplorerSagas.ts | 12 +- .../src/platform/settings/settingsService.ts | 2 +- .../azureLoginPromptDialog.tsx | 13 +- .../azureLoginPromptDialogContainer.ts | 7 +- .../botCreationDialog/botCreationDialog.tsx | 9 +- .../botSettingsEditor/botSettingsEditor.scss | 2 +- .../connectServicePromptDialog.tsx | 22 +- .../connectServicePromptDialogContainer.ts | 7 +- .../getStartedWithCSDialog.tsx | 23 +-- .../getStartedWithCSDialogContainer.ts | 5 - .../postMigrationDialog.spec.tsx | 12 +- .../postMigrationDialog.tsx | 19 +- .../postMigrationDialogContainer.ts | 5 - .../secretPromptDialog.spec.tsx | 13 +- .../secretPromptDialog/secretPromptDialog.tsx | 7 +- .../secretPromptDialogContainer.ts | 4 - .../editor/welcomePage/welcomePage.spec.tsx | 11 - .../src/ui/editor/welcomePage/welcomePage.tsx | 97 ++------- .../welcomePage/welcomePageContainer.ts | 3 - .../connectedServiceEditor.spec.tsx | 37 ++-- .../connectedServiceEditor.tsx | 39 ++-- .../connectedServiceEditorContainer.ts | 5 - .../connectedServicePicker.tsx | 27 +-- .../connectedServicePickerContainer.ts | 5 - .../servicesExplorer.spec.tsx | 9 - .../servicesExplorer/servicesExplorer.tsx | 34 +-- .../servicesExplorerContainer.ts | 5 - packages/app/main/src/appMenuBuilder.ts | 24 +-- .../app/main/src/commands/botCommands.spec.ts | 14 +- .../main/src/commands/clientInitCommands.ts | 2 +- .../extensions/debug/client/public/qna.js | 6 +- 34 files changed, 217 insertions(+), 485 deletions(-) diff --git a/package-lock.json b/package-lock.json index b5a2fec61..a409c4e5c 100644 --- a/package-lock.json +++ b/package-lock.json @@ -2032,7 +2032,7 @@ }, "@types/chokidar": { "version": "1.7.5", - "resolved": "http://registry.npmjs.org/@types/chokidar/-/chokidar-1.7.5.tgz", + "resolved": "https://registry.npmjs.org/@types/chokidar/-/chokidar-1.7.5.tgz", "integrity": "sha512-PDkSRY7KltW3M60hSBlerxI8SFPXsO3AL/aRVsO4Kh9IHRW74Ih75gUuTd/aE4LSSFqypb10UIX3QzOJwBQMGQ==", "requires": { "@types/events": "*", @@ -2058,7 +2058,7 @@ }, "@types/events": { "version": "1.2.0", - "resolved": "http://registry.npmjs.org/@types/events/-/events-1.2.0.tgz", + "resolved": "https://registry.npmjs.org/@types/events/-/events-1.2.0.tgz", "integrity": "sha512-KEIlhXnIutzKwRbQkGWb/I4HFqBuUykAdHgDED6xqwXJfONCjF5VoE0cXEiurh3XauygxzeDzgtXUqvLkxFzzA==" }, "@types/express": { @@ -2091,7 +2091,7 @@ }, "@types/formidable": { "version": "1.0.31", - "resolved": "http://registry.npmjs.org/@types/formidable/-/formidable-1.0.31.tgz", + "resolved": "https://registry.npmjs.org/@types/formidable/-/formidable-1.0.31.tgz", "integrity": "sha512-dIhM5t8lRP0oWe2HF8MuPvdd1TpPTjhDMAqemcq6oIZQCBQTovhBAdTQ5L5veJB4pdQChadmHuxtB0YzqvfU3Q==", "requires": { "@types/events": "*", @@ -2108,7 +2108,7 @@ }, "@types/jest": { "version": "22.2.3", - "resolved": "http://registry.npmjs.org/@types/jest/-/jest-22.2.3.tgz", + "resolved": "https://registry.npmjs.org/@types/jest/-/jest-22.2.3.tgz", "integrity": "sha512-e74sM9W/4qqWB6D4TWV9FQk0WoHtX1X4FJpbjxucMSVJHtFjbQOH3H6yp+xno4br0AKG0wz/kPtaN599GUOvAg==" }, "@types/jsonwebtoken": { @@ -2121,7 +2121,7 @@ }, "@types/lscache": { "version": "1.0.29", - "resolved": "http://registry.npmjs.org/@types/lscache/-/lscache-1.0.29.tgz", + "resolved": "https://registry.npmjs.org/@types/lscache/-/lscache-1.0.29.tgz", "integrity": "sha1-BoqKzKhmjAorXV3LKAD6M0x7H2A=" }, "@types/mime": { @@ -2139,7 +2139,7 @@ }, "@types/node": { "version": "8.9.3", - "resolved": "http://registry.npmjs.org/@types/node/-/node-8.9.3.tgz", + "resolved": "https://registry.npmjs.org/@types/node/-/node-8.9.3.tgz", "integrity": "sha512-wqrPE4Uvj2fmL0E5JFQiY7D/5bAKvVUfWTnQ5NEV35ULkAU0j3QuqIi9Qyrytz8M5hsrh8Kijt+FsdLQaZR+IA==" }, "@types/range-parser": { @@ -2224,7 +2224,7 @@ }, "@types/ws": { "version": "4.0.2", - "resolved": "http://registry.npmjs.org/@types/ws/-/ws-4.0.2.tgz", + "resolved": "https://registry.npmjs.org/@types/ws/-/ws-4.0.2.tgz", "integrity": "sha512-tlDVFHCcJdNqYgjGNDPDCo4tNqhFMymIAdJCcykFbdhYr4X6vD7IlMxY0t3/k6Pfup68YNkMTpRfLKTRuKDmnQ==", "requires": { "@types/events": "*", @@ -2541,7 +2541,7 @@ }, "adaptivecards": { "version": "1.0.0", - "resolved": "http://registry.npmjs.org/adaptivecards/-/adaptivecards-1.0.0.tgz", + "resolved": "https://registry.npmjs.org/adaptivecards/-/adaptivecards-1.0.0.tgz", "integrity": "sha1-96HxdpJRYmirQMpU8Z/aP6WJdjQ=" }, "address": { @@ -2551,7 +2551,7 @@ }, "adjust-sourcemap-loader": { "version": "1.2.0", - "resolved": "http://registry.npmjs.org/adjust-sourcemap-loader/-/adjust-sourcemap-loader-1.2.0.tgz", + "resolved": "https://registry.npmjs.org/adjust-sourcemap-loader/-/adjust-sourcemap-loader-1.2.0.tgz", "integrity": "sha512-958oaHHVEXMvsY7v7cC5gEkNIcoaAVIhZ4mBReYVZJOTP9IgKmzLjIOhTtzpLMu+qriXvLsVjJ155EeInp45IQ==", "requires": { "assert": "^1.3.0", @@ -2648,7 +2648,7 @@ }, "ansi-colors": { "version": "1.1.0", - "resolved": "http://registry.npmjs.org/ansi-colors/-/ansi-colors-1.1.0.tgz", + "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-1.1.0.tgz", "integrity": "sha512-SFKX67auSNoVR38N3L+nvsPjOE0bybKTYbkf5tRvushrAPQ9V75huw0ZxBkKVeRU9kqH3d6HA4xTckbwZ4ixmA==", "requires": { "ansi-wrap": "^0.1.0" @@ -3441,32 +3441,32 @@ }, "babel-plugin-syntax-async-functions": { "version": "6.13.0", - "resolved": "http://registry.npmjs.org/babel-plugin-syntax-async-functions/-/babel-plugin-syntax-async-functions-6.13.0.tgz", + "resolved": "https://registry.npmjs.org/babel-plugin-syntax-async-functions/-/babel-plugin-syntax-async-functions-6.13.0.tgz", "integrity": "sha1-ytnK0RkbWtY0vzCuCHI5HgZHvpU=" }, "babel-plugin-syntax-class-properties": { "version": "6.13.0", - "resolved": "http://registry.npmjs.org/babel-plugin-syntax-class-properties/-/babel-plugin-syntax-class-properties-6.13.0.tgz", + "resolved": "https://registry.npmjs.org/babel-plugin-syntax-class-properties/-/babel-plugin-syntax-class-properties-6.13.0.tgz", "integrity": "sha1-1+sjt5oxf4VDlixQW4J8fWysJ94=" }, "babel-plugin-syntax-dynamic-import": { "version": "6.18.0", - "resolved": "http://registry.npmjs.org/babel-plugin-syntax-dynamic-import/-/babel-plugin-syntax-dynamic-import-6.18.0.tgz", + "resolved": "https://registry.npmjs.org/babel-plugin-syntax-dynamic-import/-/babel-plugin-syntax-dynamic-import-6.18.0.tgz", "integrity": "sha1-jWomIpyDdFqZgqRBBRVyyqF5sdo=" }, "babel-plugin-syntax-exponentiation-operator": { "version": "6.13.0", - "resolved": "http://registry.npmjs.org/babel-plugin-syntax-exponentiation-operator/-/babel-plugin-syntax-exponentiation-operator-6.13.0.tgz", + "resolved": "https://registry.npmjs.org/babel-plugin-syntax-exponentiation-operator/-/babel-plugin-syntax-exponentiation-operator-6.13.0.tgz", "integrity": "sha1-nufoM3KQ2pUoggGmpX9BcDF4MN4=" }, "babel-plugin-syntax-flow": { "version": "6.18.0", - "resolved": "http://registry.npmjs.org/babel-plugin-syntax-flow/-/babel-plugin-syntax-flow-6.18.0.tgz", + "resolved": "https://registry.npmjs.org/babel-plugin-syntax-flow/-/babel-plugin-syntax-flow-6.18.0.tgz", "integrity": "sha1-TDqyCiryaqIM0lmVw5jE63AxDI0=" }, "babel-plugin-syntax-jsx": { "version": "6.18.0", - "resolved": "http://registry.npmjs.org/babel-plugin-syntax-jsx/-/babel-plugin-syntax-jsx-6.18.0.tgz", + "resolved": "https://registry.npmjs.org/babel-plugin-syntax-jsx/-/babel-plugin-syntax-jsx-6.18.0.tgz", "integrity": "sha1-CvMqmm4Tyno/1QaeYtew9Y0NiUY=" }, "babel-plugin-syntax-object-rest-spread": { @@ -4102,7 +4102,7 @@ }, "bl": { "version": "1.2.2", - "resolved": "http://registry.npmjs.org/bl/-/bl-1.2.2.tgz", + "resolved": "https://registry.npmjs.org/bl/-/bl-1.2.2.tgz", "integrity": "sha512-e8tQYnZodmebYDWGH7KMRvtzKXaJHx3BbilrgZCfvyLUYdKpK1t5PSPmpkny/SgiTSCnjfLW7v5rlONXVFkQEA==", "requires": { "readable-stream": "^2.3.5", @@ -4229,7 +4229,7 @@ }, "async": { "version": "1.5.2", - "resolved": "http://registry.npmjs.org/async/-/async-1.5.2.tgz", + "resolved": "https://registry.npmjs.org/async/-/async-1.5.2.tgz", "integrity": "sha1-7GphrlZIDAw8skHJVhjiCJL5Zyo=" }, "jsonwebtoken": { @@ -4423,7 +4423,7 @@ }, "browserify-aes": { "version": "1.2.0", - "resolved": "http://registry.npmjs.org/browserify-aes/-/browserify-aes-1.2.0.tgz", + "resolved": "https://registry.npmjs.org/browserify-aes/-/browserify-aes-1.2.0.tgz", "integrity": "sha512-+7CHXqGuspUn/Sl5aO7Ea0xWGAtETPXNSAjHo48JfLdPWcMng33Xe4znFvQweqc/uzk5zSOI3H52CYnjCfb5hA==", "requires": { "buffer-xor": "^1.0.3", @@ -4457,7 +4457,7 @@ }, "browserify-rsa": { "version": "4.0.1", - "resolved": "http://registry.npmjs.org/browserify-rsa/-/browserify-rsa-4.0.1.tgz", + "resolved": "https://registry.npmjs.org/browserify-rsa/-/browserify-rsa-4.0.1.tgz", "integrity": "sha1-IeCr+vbyApzy+vsTNWenAdQTVSQ=", "requires": { "bn.js": "^4.1.0", @@ -4945,7 +4945,7 @@ "dependencies": { "chalk": { "version": "1.1.3", - "resolved": "http://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=", "requires": { "ansi-styles": "^2.2.1", @@ -5077,7 +5077,7 @@ }, "lodash": { "version": "3.10.1", - "resolved": "http://registry.npmjs.org/lodash/-/lodash-3.10.1.tgz", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-3.10.1.tgz", "integrity": "sha1-W/Rejkm6QYnhfUgnid/RW9FAt7Y=" }, "string-width": { @@ -5234,7 +5234,7 @@ }, "color": { "version": "0.11.4", - "resolved": "http://registry.npmjs.org/color/-/color-0.11.4.tgz", + "resolved": "https://registry.npmjs.org/color/-/color-0.11.4.tgz", "integrity": "sha1-bXtcdPtl6EHNSHkq0e1eB7kE12Q=", "requires": { "clone": "^1.0.2", @@ -5423,7 +5423,7 @@ "dependencies": { "commander": { "version": "2.6.0", - "resolved": "http://registry.npmjs.org/commander/-/commander-2.6.0.tgz", + "resolved": "https://registry.npmjs.org/commander/-/commander-2.6.0.tgz", "integrity": "sha1-nfflL7Kgyw+4kFjugMMQQiXzfh0=" }, "has-flag": { @@ -5963,7 +5963,7 @@ "dependencies": { "minimist": { "version": "1.2.0", - "resolved": "http://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=" } } @@ -5987,7 +5987,7 @@ }, "create-hash": { "version": "1.2.0", - "resolved": "http://registry.npmjs.org/create-hash/-/create-hash-1.2.0.tgz", + "resolved": "https://registry.npmjs.org/create-hash/-/create-hash-1.2.0.tgz", "integrity": "sha512-z00bCGNHDG8mHAkP7CtT1qVu+bFQUPjYq/4Iv3C3kWjTFV10zIjfSoeqXo9Asws8gwSHDGj/hl2u4OGIjapeCg==", "requires": { "cipher-base": "^1.0.1", @@ -5999,7 +5999,7 @@ }, "create-hmac": { "version": "1.1.7", - "resolved": "http://registry.npmjs.org/create-hmac/-/create-hmac-1.1.7.tgz", + "resolved": "https://registry.npmjs.org/create-hmac/-/create-hmac-1.1.7.tgz", "integrity": "sha512-MJG9liiZ+ogc4TzUwuvbER1JRdgvUFSB5+VR/g5h82fGaIRWMWddtKBHi7/sVhfjQZ6SehlyhvQYrcYkaUIpLg==", "requires": { "cipher-base": "^1.0.3", @@ -6097,12 +6097,12 @@ }, "css-color-names": { "version": "0.0.4", - "resolved": "http://registry.npmjs.org/css-color-names/-/css-color-names-0.0.4.tgz", + "resolved": "https://registry.npmjs.org/css-color-names/-/css-color-names-0.0.4.tgz", "integrity": "sha1-gIrcLnnPhHOAabZGyyDsJ762KeA=" }, "css-loader": { "version": "0.28.11", - "resolved": "http://registry.npmjs.org/css-loader/-/css-loader-0.28.11.tgz", + "resolved": "https://registry.npmjs.org/css-loader/-/css-loader-0.28.11.tgz", "integrity": "sha512-wovHgjAx8ZIMGSL8pTys7edA1ClmzxHeY6n/d97gg5odgsxEgKjULPR0viqyC+FWMCL9sfqoC/QCUBo62tLvPg==", "requires": { "babel-code-frame": "^6.26.0", @@ -6123,7 +6123,7 @@ }, "css-select": { "version": "1.2.0", - "resolved": "http://registry.npmjs.org/css-select/-/css-select-1.2.0.tgz", + "resolved": "https://registry.npmjs.org/css-select/-/css-select-1.2.0.tgz", "integrity": "sha1-KzoRBTnFNV8c2NMUYj6HCxIeyFg=", "requires": { "boolbase": "~1.0.0", @@ -6166,7 +6166,7 @@ }, "cssnano": { "version": "3.10.0", - "resolved": "http://registry.npmjs.org/cssnano/-/cssnano-3.10.0.tgz", + "resolved": "https://registry.npmjs.org/cssnano/-/cssnano-3.10.0.tgz", "integrity": "sha1-Tzj2zqK5sX+gFJDyPx3GjqZcHDg=", "requires": { "autoprefixer": "^6.3.1", @@ -6543,7 +6543,7 @@ "dependencies": { "pify": { "version": "2.3.0", - "resolved": "http://registry.npmjs.org/pify/-/pify-2.3.0.tgz", + "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=" } } @@ -6634,7 +6634,7 @@ }, "diffie-hellman": { "version": "5.0.3", - "resolved": "http://registry.npmjs.org/diffie-hellman/-/diffie-hellman-5.0.3.tgz", + "resolved": "https://registry.npmjs.org/diffie-hellman/-/diffie-hellman-5.0.3.tgz", "integrity": "sha512-kqag/Nl+f3GwyK25fhUMYj81BUOrZ9IuJsjIcDE5icNM9FJHAVm3VcUDxdLPoQtTuUylWm6ZIknYJwwaPxsUzg==", "requires": { "bn.js": "^4.1.0", @@ -6704,7 +6704,7 @@ "dependencies": { "domelementtype": { "version": "1.1.3", - "resolved": "http://registry.npmjs.org/domelementtype/-/domelementtype-1.1.3.tgz", + "resolved": "https://registry.npmjs.org/domelementtype/-/domelementtype-1.1.3.tgz", "integrity": "sha1-vSh3PiZCiBrsUVRJJCmcXNgiGFs=" } } @@ -6759,7 +6759,7 @@ }, "dotenv": { "version": "5.0.1", - "resolved": "http://registry.npmjs.org/dotenv/-/dotenv-5.0.1.tgz", + "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-5.0.1.tgz", "integrity": "sha512-4As8uPrjfwb7VXC+WnLCbXK7y+Ueb2B3zgNCePYfhxS1PYeaO1YTeplffTEcbfLhvFNGLAz90VvJs9yomG7bow==" }, "dotenv-expand": { @@ -7152,7 +7152,7 @@ }, "json5": { "version": "1.0.1", - "resolved": "http://registry.npmjs.org/json5/-/json5-1.0.1.tgz", + "resolved": "https://registry.npmjs.org/json5/-/json5-1.0.1.tgz", "integrity": "sha512-aKS4WQjPenRxiQsC93MNfjx+nbF4PAdYzmd/1JIj8HYzqfbu86beTuNgXDzPknWk0n0uARlyewZo4s++ES36Ow==", "requires": { "minimist": "^1.2.0" @@ -7160,7 +7160,7 @@ }, "minimist": { "version": "1.2.0", - "resolved": "http://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=" }, "read-config-file": { @@ -7237,7 +7237,7 @@ }, "jsonfile": { "version": "2.4.0", - "resolved": "http://registry.npmjs.org/jsonfile/-/jsonfile-2.4.0.tgz", + "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-2.4.0.tgz", "integrity": "sha1-NzaitCi4e72gzIO1P6PWM6NcKug=", "requires": { "graceful-fs": "^4.1.6" @@ -7245,7 +7245,7 @@ }, "minimist": { "version": "1.2.0", - "resolved": "http://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=" }, "path-exists": { @@ -7671,7 +7671,7 @@ }, "events": { "version": "1.1.1", - "resolved": "http://registry.npmjs.org/events/-/events-1.1.1.tgz", + "resolved": "https://registry.npmjs.org/events/-/events-1.1.1.tgz", "integrity": "sha1-nr23Y1rQmccNzEwqH1AEKI6L2SQ=" }, "eventsource": { @@ -8153,7 +8153,7 @@ }, "file-loader": { "version": "1.1.11", - "resolved": "http://registry.npmjs.org/file-loader/-/file-loader-1.1.11.tgz", + "resolved": "https://registry.npmjs.org/file-loader/-/file-loader-1.1.11.tgz", "integrity": "sha512-TGR4HU7HUsGg6GCOPJnFk06RhWgEWFLAGWiT6rcD+GRC2keU3s9RGJ+b3Z6/U73jwwNb2gKLJ7YCrp+jvU4ALg==", "requires": { "loader-utils": "^1.0.2", @@ -8181,7 +8181,7 @@ }, "filewatcher": { "version": "3.0.1", - "resolved": "http://registry.npmjs.org/filewatcher/-/filewatcher-3.0.1.tgz", + "resolved": "https://registry.npmjs.org/filewatcher/-/filewatcher-3.0.1.tgz", "integrity": "sha1-9KGVc1Xdr0Q8zXiolfPVXiPIoDQ=", "requires": { "debounce": "^1.0.0" @@ -8210,7 +8210,7 @@ }, "finalhandler": { "version": "1.1.1", - "resolved": "http://registry.npmjs.org/finalhandler/-/finalhandler-1.1.1.tgz", + "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-1.1.1.tgz", "integrity": "sha512-Y1GUDo39ez4aHAw7MysnUD5JzYX+WaIj8I57kO3aEPT1fFRL4sr7mjei97FgnwhAyyzRYmQZaTHb2+9uZ1dPtg==", "requires": { "debug": "2.6.9", @@ -9547,7 +9547,7 @@ }, "os-locale": { "version": "1.4.0", - "resolved": "http://registry.npmjs.org/os-locale/-/os-locale-1.4.0.tgz", + "resolved": "https://registry.npmjs.org/os-locale/-/os-locale-1.4.0.tgz", "integrity": "sha1-IPnxeuKe00XoveWDsT0gCYA8FNk=", "requires": { "lcid": "^1.0.0" @@ -9962,7 +9962,7 @@ }, "http-errors": { "version": "1.6.3", - "resolved": "http://registry.npmjs.org/http-errors/-/http-errors-1.6.3.tgz", + "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-1.6.3.tgz", "integrity": "sha1-i1VoC7S+KDoLW/TqLjhYC+HZMg0=", "requires": { "depd": "~1.1.2", @@ -10007,7 +10007,7 @@ }, "http-proxy-middleware": { "version": "0.18.0", - "resolved": "http://registry.npmjs.org/http-proxy-middleware/-/http-proxy-middleware-0.18.0.tgz", + "resolved": "https://registry.npmjs.org/http-proxy-middleware/-/http-proxy-middleware-0.18.0.tgz", "integrity": "sha512-Fs25KVMPAIIcgjMZkVHJoKg9VcXcC1C8yb9JUgeDvVXY0S/zgVIhMb+qVswDIgtJe2DfckMSY2d6TuTEutlk6Q==", "requires": { "http-proxy": "^1.16.2", @@ -10285,7 +10285,7 @@ }, "is": { "version": "0.2.7", - "resolved": "http://registry.npmjs.org/is/-/is-0.2.7.tgz", + "resolved": "https://registry.npmjs.org/is/-/is-0.2.7.tgz", "integrity": "sha1-OzSixI81mXLzUEKEkZOucmS2NWI=" }, "is-absolute": { @@ -10682,7 +10682,7 @@ }, "isemail": { "version": "1.2.0", - "resolved": "http://registry.npmjs.org/isemail/-/isemail-1.2.0.tgz", + "resolved": "https://registry.npmjs.org/isemail/-/isemail-1.2.0.tgz", "integrity": "sha1-vgPfjMPineTSxd9lASY/H6RZXpo=" }, "isexe": { @@ -11202,7 +11202,7 @@ }, "jest-environment-jsdom": { "version": "22.4.3", - "resolved": "http://registry.npmjs.org/jest-environment-jsdom/-/jest-environment-jsdom-22.4.3.tgz", + "resolved": "https://registry.npmjs.org/jest-environment-jsdom/-/jest-environment-jsdom-22.4.3.tgz", "integrity": "sha512-FviwfR+VyT3Datf13+ULjIMO5CSeajlayhhYQwpzgunswoaLIPutdbrnfUHEMyJCwvqQFaVtTmn9+Y8WCt6n1w==", "requires": { "jest-mock": "^22.4.3", @@ -11212,7 +11212,7 @@ }, "jest-message-util": { "version": "22.4.3", - "resolved": "http://registry.npmjs.org/jest-message-util/-/jest-message-util-22.4.3.tgz", + "resolved": "https://registry.npmjs.org/jest-message-util/-/jest-message-util-22.4.3.tgz", "integrity": "sha512-iAMeKxhB3Se5xkSjU0NndLLCHtP4n+GtCqV0bISKA5dmOXQfEbdEmYiu2qpnWBDCQdEafNDDU6Q+l6oBMd/+BA==", "requires": { "@babel/code-frame": "^7.0.0-beta.35", @@ -11224,12 +11224,12 @@ }, "jest-mock": { "version": "22.4.3", - "resolved": "http://registry.npmjs.org/jest-mock/-/jest-mock-22.4.3.tgz", + "resolved": "https://registry.npmjs.org/jest-mock/-/jest-mock-22.4.3.tgz", "integrity": "sha512-+4R6mH5M1G4NK16CKg9N1DtCaFmuxhcIqF4lQK/Q1CIotqMs/XBemfpDPeVZBFow6iyUNu6EBT9ugdNOTT5o5Q==" }, "jest-util": { "version": "22.4.3", - "resolved": "http://registry.npmjs.org/jest-util/-/jest-util-22.4.3.tgz", + "resolved": "https://registry.npmjs.org/jest-util/-/jest-util-22.4.3.tgz", "integrity": "sha512-rfDfG8wyC5pDPNdcnAlZgwKnzHvZDu8Td2NJI/jAGKEGxJPYiE4F0ss/gSAkG4778Y23Hvbz+0GMrDJTeo7RjQ==", "requires": { "callsites": "^2.0.0", @@ -11316,7 +11316,7 @@ }, "jest-get-type": { "version": "22.4.3", - "resolved": "http://registry.npmjs.org/jest-get-type/-/jest-get-type-22.4.3.tgz", + "resolved": "https://registry.npmjs.org/jest-get-type/-/jest-get-type-22.4.3.tgz", "integrity": "sha512-/jsz0Y+V29w1chdXVygEKSz2nBoHoYqNShPe+QgxSNjAuP1i8+k4LbQNrfoliKej0P45sivkSCh7yiD6ubHS3w==" }, "jest-haste-map": { @@ -11815,7 +11815,7 @@ }, "joi": { "version": "6.10.1", - "resolved": "http://registry.npmjs.org/joi/-/joi-6.10.1.tgz", + "resolved": "https://registry.npmjs.org/joi/-/joi-6.10.1.tgz", "integrity": "sha1-TVDDGAeRIgAP5fFq8f+OGRe3fgY=", "requires": { "hoek": "2.x.x", @@ -12207,7 +12207,7 @@ "dependencies": { "minimist": { "version": "1.2.0", - "resolved": "http://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=" } } @@ -12586,7 +12586,7 @@ }, "luis-apis": { "version": "1.0.7", - "resolved": "http://registry.npmjs.org/luis-apis/-/luis-apis-1.0.7.tgz", + "resolved": "https://registry.npmjs.org/luis-apis/-/luis-apis-1.0.7.tgz", "integrity": "sha512-B/wnrLWNWz2lrWVNgZya9+nFoDjWUVh1wZw2uG21D9hZ9tOrMbl0FzZRTYvLM4wASLN7YoQQ+ZbLZMQg5r8Dhw==", "requires": { "camelcase": "^4.1.0", @@ -12614,7 +12614,7 @@ }, "minimist": { "version": "1.2.0", - "resolved": "http://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=" } } @@ -12831,7 +12831,7 @@ }, "media-typer": { "version": "0.3.0", - "resolved": "http://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz", + "resolved": "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz", "integrity": "sha1-hxDXrwqmJvj/+hzgAWhUUmMlV0g=" }, "mem": { @@ -13242,7 +13242,7 @@ }, "rimraf": { "version": "2.4.5", - "resolved": "http://registry.npmjs.org/rimraf/-/rimraf-2.4.5.tgz", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.4.5.tgz", "integrity": "sha1-7nEM5dk6j9uFb7Xqj/Di11k0sto=", "optional": true, "requires": { @@ -13292,7 +13292,7 @@ }, "ncp": { "version": "2.0.0", - "resolved": "http://registry.npmjs.org/ncp/-/ncp-2.0.0.tgz", + "resolved": "https://registry.npmjs.org/ncp/-/ncp-2.0.0.tgz", "integrity": "sha1-GVoh1sRuNh0vsSgbo4uR6d9727M=" }, "nearley": { @@ -13359,12 +13359,12 @@ }, "minimist": { "version": "1.2.0", - "resolved": "http://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=" }, "node-notifier": { "version": "4.6.1", - "resolved": "http://registry.npmjs.org/node-notifier/-/node-notifier-4.6.1.tgz", + "resolved": "https://registry.npmjs.org/node-notifier/-/node-notifier-4.6.1.tgz", "integrity": "sha1-BW0UJE89zBzq3+aK+c/wxUc6M/M=", "requires": { "cli-usage": "^0.1.1", @@ -13547,7 +13547,7 @@ }, "chalk": { "version": "1.1.3", - "resolved": "http://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=", "requires": { "ansi-styles": "^2.2.1", @@ -13614,7 +13614,7 @@ }, "request": { "version": "2.79.0", - "resolved": "http://registry.npmjs.org/request/-/request-2.79.0.tgz", + "resolved": "https://registry.npmjs.org/request/-/request-2.79.0.tgz", "integrity": "sha1-Tf5b9r6LjNw3/Pk+BLZVd3InEN4=", "requires": { "aws-sign2": "~0.6.0", @@ -13883,7 +13883,7 @@ }, "minimist": { "version": "1.2.0", - "resolved": "http://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=" } } @@ -14475,7 +14475,7 @@ }, "parse-asn1": { "version": "5.1.1", - "resolved": "http://registry.npmjs.org/parse-asn1/-/parse-asn1-5.1.1.tgz", + "resolved": "https://registry.npmjs.org/parse-asn1/-/parse-asn1-5.1.1.tgz", "integrity": "sha512-KPx7flKXg775zZpnp9SxJlz00gTd4BmJ2yJufSc44gMCRrRQ7NSzAcSJQfifuOLgW6bEi+ftrALtsgALeB2Adw==", "requires": { "asn1.js": "^4.0.0", @@ -14655,7 +14655,7 @@ }, "pause-stream": { "version": "0.0.11", - "resolved": "http://registry.npmjs.org/pause-stream/-/pause-stream-0.0.11.tgz", + "resolved": "https://registry.npmjs.org/pause-stream/-/pause-stream-0.0.11.tgz", "integrity": "sha1-/lo0sMvOErWqaitAPuLnO2AvFEU=", "requires": { "through": "~2.3" @@ -14787,7 +14787,7 @@ "dependencies": { "chalk": { "version": "1.1.3", - "resolved": "http://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=", "requires": { "ansi-styles": "^2.2.1", @@ -14821,7 +14821,7 @@ }, "postcss-calc": { "version": "5.3.1", - "resolved": "http://registry.npmjs.org/postcss-calc/-/postcss-calc-5.3.1.tgz", + "resolved": "https://registry.npmjs.org/postcss-calc/-/postcss-calc-5.3.1.tgz", "integrity": "sha1-d7rnypKK2FcW4v2kLyYb98HWW14=", "requires": { "postcss": "^5.0.2", @@ -14850,7 +14850,7 @@ }, "postcss-discard-comments": { "version": "2.0.4", - "resolved": "http://registry.npmjs.org/postcss-discard-comments/-/postcss-discard-comments-2.0.4.tgz", + "resolved": "https://registry.npmjs.org/postcss-discard-comments/-/postcss-discard-comments-2.0.4.tgz", "integrity": "sha1-vv6J+v1bPazlzM5Rt2uBUUvgDj0=", "requires": { "postcss": "^5.0.14" @@ -14866,7 +14866,7 @@ }, "postcss-discard-empty": { "version": "2.1.0", - "resolved": "http://registry.npmjs.org/postcss-discard-empty/-/postcss-discard-empty-2.1.0.tgz", + "resolved": "https://registry.npmjs.org/postcss-discard-empty/-/postcss-discard-empty-2.1.0.tgz", "integrity": "sha1-0rS9nVztXr2Nyt52QMfXzX9PkrU=", "requires": { "postcss": "^5.0.14" @@ -14874,7 +14874,7 @@ }, "postcss-discard-overridden": { "version": "0.1.1", - "resolved": "http://registry.npmjs.org/postcss-discard-overridden/-/postcss-discard-overridden-0.1.1.tgz", + "resolved": "https://registry.npmjs.org/postcss-discard-overridden/-/postcss-discard-overridden-0.1.1.tgz", "integrity": "sha1-ix6vVU9ob7KIzYdMVWZ7CqNmjVg=", "requires": { "postcss": "^5.0.16" @@ -14882,7 +14882,7 @@ }, "postcss-discard-unused": { "version": "2.2.3", - "resolved": "http://registry.npmjs.org/postcss-discard-unused/-/postcss-discard-unused-2.2.3.tgz", + "resolved": "https://registry.npmjs.org/postcss-discard-unused/-/postcss-discard-unused-2.2.3.tgz", "integrity": "sha1-vOMLLMWR/8Y0Mitfs0ZLbZNPRDM=", "requires": { "postcss": "^5.0.14", @@ -14899,7 +14899,7 @@ }, "postcss-merge-idents": { "version": "2.1.7", - "resolved": "http://registry.npmjs.org/postcss-merge-idents/-/postcss-merge-idents-2.1.7.tgz", + "resolved": "https://registry.npmjs.org/postcss-merge-idents/-/postcss-merge-idents-2.1.7.tgz", "integrity": "sha1-TFUwMTwI4dWzu/PSu8dH4njuonA=", "requires": { "has": "^1.0.1", @@ -14945,7 +14945,7 @@ }, "postcss-minify-font-values": { "version": "1.0.5", - "resolved": "http://registry.npmjs.org/postcss-minify-font-values/-/postcss-minify-font-values-1.0.5.tgz", + "resolved": "https://registry.npmjs.org/postcss-minify-font-values/-/postcss-minify-font-values-1.0.5.tgz", "integrity": "sha1-S1jttWZB66fIR0qzUmyv17vey2k=", "requires": { "object-assign": "^4.0.1", @@ -14955,7 +14955,7 @@ }, "postcss-minify-gradients": { "version": "1.0.5", - "resolved": "http://registry.npmjs.org/postcss-minify-gradients/-/postcss-minify-gradients-1.0.5.tgz", + "resolved": "https://registry.npmjs.org/postcss-minify-gradients/-/postcss-minify-gradients-1.0.5.tgz", "integrity": "sha1-Xb2hE3NwP4PPtKPqOIHY11/15uE=", "requires": { "postcss": "^5.0.12", @@ -14964,7 +14964,7 @@ }, "postcss-minify-params": { "version": "1.2.2", - "resolved": "http://registry.npmjs.org/postcss-minify-params/-/postcss-minify-params-1.2.2.tgz", + "resolved": "https://registry.npmjs.org/postcss-minify-params/-/postcss-minify-params-1.2.2.tgz", "integrity": "sha1-rSzgcTc7lDs9kwo/pZo1jCjW8fM=", "requires": { "alphanum-sort": "^1.0.1", @@ -14975,7 +14975,7 @@ }, "postcss-minify-selectors": { "version": "2.1.1", - "resolved": "http://registry.npmjs.org/postcss-minify-selectors/-/postcss-minify-selectors-2.1.1.tgz", + "resolved": "https://registry.npmjs.org/postcss-minify-selectors/-/postcss-minify-selectors-2.1.1.tgz", "integrity": "sha1-ssapjAByz5G5MtGkllCBFDEXNb8=", "requires": { "alphanum-sort": "^1.0.2", @@ -15121,7 +15121,7 @@ }, "postcss-normalize-charset": { "version": "1.1.1", - "resolved": "http://registry.npmjs.org/postcss-normalize-charset/-/postcss-normalize-charset-1.1.1.tgz", + "resolved": "https://registry.npmjs.org/postcss-normalize-charset/-/postcss-normalize-charset-1.1.1.tgz", "integrity": "sha1-757nEhLX/nWceO0WL2HtYrXLk/E=", "requires": { "postcss": "^5.0.5" @@ -15129,7 +15129,7 @@ }, "postcss-normalize-url": { "version": "3.0.8", - "resolved": "http://registry.npmjs.org/postcss-normalize-url/-/postcss-normalize-url-3.0.8.tgz", + "resolved": "https://registry.npmjs.org/postcss-normalize-url/-/postcss-normalize-url-3.0.8.tgz", "integrity": "sha1-EI90s/L82viRov+j6kWSJ5/HgiI=", "requires": { "is-absolute-url": "^2.0.0", @@ -15149,7 +15149,7 @@ }, "postcss-reduce-idents": { "version": "2.4.0", - "resolved": "http://registry.npmjs.org/postcss-reduce-idents/-/postcss-reduce-idents-2.4.0.tgz", + "resolved": "https://registry.npmjs.org/postcss-reduce-idents/-/postcss-reduce-idents-2.4.0.tgz", "integrity": "sha1-wsbSDMlYKE9qv75j92Cb9AkFmtM=", "requires": { "postcss": "^5.0.4", @@ -15158,7 +15158,7 @@ }, "postcss-reduce-initial": { "version": "1.0.1", - "resolved": "http://registry.npmjs.org/postcss-reduce-initial/-/postcss-reduce-initial-1.0.1.tgz", + "resolved": "https://registry.npmjs.org/postcss-reduce-initial/-/postcss-reduce-initial-1.0.1.tgz", "integrity": "sha1-aPgGlfBF0IJjqHmtJA343WT2ROo=", "requires": { "postcss": "^5.0.4" @@ -15166,7 +15166,7 @@ }, "postcss-reduce-transforms": { "version": "1.0.4", - "resolved": "http://registry.npmjs.org/postcss-reduce-transforms/-/postcss-reduce-transforms-1.0.4.tgz", + "resolved": "https://registry.npmjs.org/postcss-reduce-transforms/-/postcss-reduce-transforms-1.0.4.tgz", "integrity": "sha1-/3b02CEkN7McKYpC0uFEQCV3GuE=", "requires": { "has": "^1.0.1", @@ -15186,7 +15186,7 @@ }, "postcss-svgo": { "version": "2.1.6", - "resolved": "http://registry.npmjs.org/postcss-svgo/-/postcss-svgo-2.1.6.tgz", + "resolved": "https://registry.npmjs.org/postcss-svgo/-/postcss-svgo-2.1.6.tgz", "integrity": "sha1-tt8YqmE7Zm4TPwittSGcJoSsEI0=", "requires": { "is-svg": "^2.0.0", @@ -15197,7 +15197,7 @@ }, "postcss-unique-selectors": { "version": "2.0.2", - "resolved": "http://registry.npmjs.org/postcss-unique-selectors/-/postcss-unique-selectors-2.0.2.tgz", + "resolved": "https://registry.npmjs.org/postcss-unique-selectors/-/postcss-unique-selectors-2.0.2.tgz", "integrity": "sha1-mB1X0p3csz57Hf4f1DuGSfkzyh0=", "requires": { "alphanum-sort": "^1.0.1", @@ -15212,7 +15212,7 @@ }, "postcss-zindex": { "version": "2.2.0", - "resolved": "http://registry.npmjs.org/postcss-zindex/-/postcss-zindex-2.2.0.tgz", + "resolved": "https://registry.npmjs.org/postcss-zindex/-/postcss-zindex-2.2.0.tgz", "integrity": "sha1-0hCd3AVbka9n/EyzsCWUZjnSryI=", "requires": { "has": "^1.0.1", @@ -15309,7 +15309,7 @@ }, "readable-stream": { "version": "1.1.14", - "resolved": "http://registry.npmjs.org/readable-stream/-/readable-stream-1.1.14.tgz", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.1.14.tgz", "integrity": "sha1-fPTFTvZI44EwhMY23SB54WbAgdk=", "requires": { "core-util-is": "~1.0.0", @@ -15527,7 +15527,7 @@ }, "minimist": { "version": "1.2.0", - "resolved": "http://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=" } } @@ -15686,7 +15686,7 @@ "dependencies": { "minimist": { "version": "1.2.0", - "resolved": "http://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=" } } @@ -15723,7 +15723,7 @@ }, "dotenv": { "version": "4.0.0", - "resolved": "http://registry.npmjs.org/dotenv/-/dotenv-4.0.0.tgz", + "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-4.0.0.tgz", "integrity": "sha1-hk7xN5rO1Vzm+V3r7NzhefegzR0=" } } @@ -16274,7 +16274,7 @@ }, "reduce-css-calc": { "version": "1.3.0", - "resolved": "http://registry.npmjs.org/reduce-css-calc/-/reduce-css-calc-1.3.0.tgz", + "resolved": "https://registry.npmjs.org/reduce-css-calc/-/reduce-css-calc-1.3.0.tgz", "integrity": "sha1-dHyRTgSWFKTJz7umKYca0dKSdxY=", "requires": { "balanced-match": "^0.4.2", @@ -16692,7 +16692,7 @@ "dependencies": { "convert-source-map": { "version": "0.3.5", - "resolved": "http://registry.npmjs.org/convert-source-map/-/convert-source-map-0.3.5.tgz", + "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-0.3.5.tgz", "integrity": "sha1-8dgClQr33SYxof6+BZZVDIarMZA=" } } @@ -16822,7 +16822,7 @@ "dependencies": { "minimist": { "version": "1.2.0", - "resolved": "http://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=" } } @@ -16871,7 +16871,7 @@ }, "os-locale": { "version": "1.4.0", - "resolved": "http://registry.npmjs.org/os-locale/-/os-locale-1.4.0.tgz", + "resolved": "https://registry.npmjs.org/os-locale/-/os-locale-1.4.0.tgz", "integrity": "sha1-IPnxeuKe00XoveWDsT0gCYA8FNk=", "requires": { "lcid": "^1.0.0" @@ -17156,7 +17156,7 @@ }, "sha.js": { "version": "2.4.11", - "resolved": "http://registry.npmjs.org/sha.js/-/sha.js-2.4.11.tgz", + "resolved": "https://registry.npmjs.org/sha.js/-/sha.js-2.4.11.tgz", "integrity": "sha512-QMEp5B7cftE7APOjk5Y6xgrbWu+WkLVQwk8JNjZ8nKRciZaByEW6MubieAiToS7+dwvrjGhH8jRXz3MVd0AYqQ==", "requires": { "inherits": "^2.0.1", @@ -18449,7 +18449,7 @@ }, "tslint-loader": { "version": "3.6.0", - "resolved": "http://registry.npmjs.org/tslint-loader/-/tslint-loader-3.6.0.tgz", + "resolved": "https://registry.npmjs.org/tslint-loader/-/tslint-loader-3.6.0.tgz", "integrity": "sha512-Me9Qf/87BOfCY8uJJw+J7VMF4U8WiMXKLhKKKugMydF0xMhMOt9wo2mjYTNhwbF9H7SHh8PAIwRG8roisTNekQ==", "requires": { "loader-utils": "^1.0.2", @@ -19216,7 +19216,7 @@ "dependencies": { "minimist": { "version": "1.2.0", - "resolved": "http://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=" } } diff --git a/packages/app/client/src/commands/electronCommands.ts b/packages/app/client/src/commands/electronCommands.ts index 64125a503..84992947d 100644 --- a/packages/app/client/src/commands/electronCommands.ts +++ b/packages/app/client/src/commands/electronCommands.ts @@ -57,12 +57,6 @@ export function registerCommands(commandRegistry: CommandRegistryImpl) { console.log('Application is up to date'); }); - // --------------------------------------------------------------------------- - // Open the link in the default browser - commandRegistry.registerCommand(Electron.OpenExternal, (url: string) => { - window.open(url); - }); - // --------------------------------------------------------------------------- // Open About dialog commandRegistry.registerCommand(Electron.ShowAboutDialog, () => { diff --git a/packages/app/client/src/data/sagas/servicesExplorerSagas.spec.ts b/packages/app/client/src/data/sagas/servicesExplorerSagas.spec.ts index ba41234e7..6e058b3a1 100644 --- a/packages/app/client/src/data/sagas/servicesExplorerSagas.spec.ts +++ b/packages/app/client/src/data/sagas/servicesExplorerSagas.spec.ts @@ -219,13 +219,13 @@ describe('The ServiceExplorerSagas', () => { const result = await it.next().value; expect(result.id).toBe('open'); - let link = ''; - CommandServiceImpl.remoteCall = async (type: string, ...args: any[]) => { - link = args[0]; - }; + window.open = jest.fn(); + await it.next(result).value; - expect(link).toBe(`https://luis.ai/applications/${mockService.appId}/versions/${mockService.version}/build`); + expect(window.open).toHaveBeenCalledWith( + `https://luis.ai/applications/${mockService.appId}/versions/${mockService.version}/build` + ); }); it('should open the luis editor when the "edit" item is selected', async () => { @@ -409,29 +409,29 @@ describe('The ServiceExplorerSagas', () => { }); it('should open the correct domain for luis models in the "westeurope" region', () => { - const spy = jest.spyOn(CommandServiceImpl, 'remoteCall'); + window.open = jest.fn(); const link = `https://eu.luis.ai/applications/1234/versions/0.1/build`; const action = openServiceDeepLink(mockModel as any); openConnectedServiceGen(action).next(); - expect(spy).toHaveBeenCalledWith('electron:open-external', link); + expect(window.open).toHaveBeenCalledWith(link); }); it('should open the correct domain for luis models in the "australiaeast" region', () => { + window.open = jest.fn(); mockModel.region = 'australiaeast'; - const spy = jest.spyOn(CommandServiceImpl, 'remoteCall'); const link = `https://au.luis.ai/applications/1234/versions/0.1/build`; const action = openServiceDeepLink(mockModel as any); openConnectedServiceGen(action).next(); - expect(spy).toHaveBeenCalledWith('electron:open-external', link); + expect(window.open).toHaveBeenCalledWith(link); }); it('should open the correct domain for luis models in the "westus" region', () => { + window.open = jest.fn(); mockModel.region = 'westus'; - const spy = jest.spyOn(CommandServiceImpl, 'remoteCall'); const link = `https://luis.ai/applications/1234/versions/0.1/build`; const action = openServiceDeepLink(mockModel as any); openConnectedServiceGen(action).next(); - expect(spy).toHaveBeenCalledWith('electron:open-external', link); + expect(window.open).toHaveBeenCalledWith(link); }); }); }); diff --git a/packages/app/client/src/data/sagas/servicesExplorerSagas.ts b/packages/app/client/src/data/sagas/servicesExplorerSagas.ts index e60f38047..6b423eadd 100644 --- a/packages/app/client/src/data/sagas/servicesExplorerSagas.ts +++ b/packages/app/client/src/data/sagas/servicesExplorerSagas.ts @@ -278,7 +278,7 @@ function* launchConnectedServiceEditor(action: ConnectedServiceAction { +function openLuisDeepLink(luisService: ILuisService) { const { appId, version, region } = luisService; let regionPrefix: string; switch (region) { @@ -297,23 +297,23 @@ function openLuisDeepLink(luisService: ILuisService): Promise { const linkArray = ['https://', `${ encodeURI(regionPrefix) }`, 'luis.ai/applications/']; linkArray.push(`${ encodeURI(appId) }`, '/versions/', `${ encodeURI(version) }`, '/build'); const link = linkArray.join(''); - return CommandServiceImpl.remoteCall(SharedConstants.Commands.Electron.OpenExternal, link); + window.open(link); } -function openQnaMakerDeepLink(service: IQnAService): Promise { +function openQnaMakerDeepLink(service: IQnAService) { const { kbId } = service; const link = `https://qnamaker.ai/Edit/KnowledgeBase?kbid=${ encodeURIComponent(kbId) }`; - return CommandServiceImpl.remoteCall(SharedConstants.Commands.Electron.OpenExternal, link); + window.open(link); } -function openAzureBotServiceDeepLink(service: IBotService): Promise { +function openAzureBotServiceDeepLink(service: IBotService) { const { tenantId, subscriptionId, resourceGroup, id } = service; const linkArray = [`https://ms.portal.azure.com/#@${ encodeURI(tenantId) }`]; linkArray.push(`/resource/subscriptions/${ encodeURI(subscriptionId) }`); linkArray.push(`/resourceGroups/${ encodeURI(resourceGroup) }`); linkArray.push(`/providers/Microsoft.BotService/botServices/${ encodeURI(id) }`); const link = linkArray.join(''); - return CommandServiceImpl.remoteCall(SharedConstants.Commands.Electron.OpenExternal, link + '/channels'); + window.open(link + '/channels'); } export function* servicesExplorerSagas(): IterableIterator { diff --git a/packages/app/client/src/platform/settings/settingsService.ts b/packages/app/client/src/platform/settings/settingsService.ts index 2ce07f098..ecbecdbe2 100644 --- a/packages/app/client/src/platform/settings/settingsService.ts +++ b/packages/app/client/src/platform/settings/settingsService.ts @@ -41,7 +41,7 @@ export function registerCommands(commandRegistry: CommandRegistryImpl) { url: string, cwd: string }): any => { - SettingsService.emulator.url = (settings.url || '').replace('[::]', '127.0.0.1'); + SettingsService.emulator.url = (settings.url || '').replace('[::]', 'localhost'); SettingsService.emulator.cwd = (settings.cwd || '').replace(/\\/g, '/'); }); } diff --git a/packages/app/client/src/ui/dialogs/azureLoginPromptDialog/azureLoginPromptDialog.tsx b/packages/app/client/src/ui/dialogs/azureLoginPromptDialog/azureLoginPromptDialog.tsx index 79174a61e..2220d9842 100644 --- a/packages/app/client/src/ui/dialogs/azureLoginPromptDialog/azureLoginPromptDialog.tsx +++ b/packages/app/client/src/ui/dialogs/azureLoginPromptDialog/azureLoginPromptDialog.tsx @@ -6,7 +6,6 @@ import * as styles from '../dialogStyles.scss'; export interface AzureLoginPromptDialogProps { cancel: () => void; confirm: () => void; - onAnchorClick: (url: string) => void; } export class AzureLoginPromptDialog extends Component { @@ -15,14 +14,14 @@ export class AzureLoginPromptDialog extends Component

{ 'Use your Azure account to sign in to all your Azure services, ' + 'such as Azure Bot Service, Dispatch, LUIS, and QnA Maker.' } - + Don't have an Azure Account? Sign up.

{ 'By signing in to your services, you can register any app in that ' + 'service with your bot without having to enter in credentials manually.' }

- + Learn more about registering services

@@ -33,12 +32,4 @@ export class AzureLoginPromptDialog extends Component ); } - - private onLearnMoreAzureAccount = () => { - this.props.onAnchorClick('https://azure.microsoft.com/en-us/services/bot-service'); - } - - private onLearnMoreRegister = () => { - this.props.onAnchorClick('https://aka.ms/about-bot-file'); - } } diff --git a/packages/app/client/src/ui/dialogs/azureLoginPromptDialog/azureLoginPromptDialogContainer.ts b/packages/app/client/src/ui/dialogs/azureLoginPromptDialog/azureLoginPromptDialogContainer.ts index a54c6f215..fcbe0a5b8 100644 --- a/packages/app/client/src/ui/dialogs/azureLoginPromptDialog/azureLoginPromptDialogContainer.ts +++ b/packages/app/client/src/ui/dialogs/azureLoginPromptDialog/azureLoginPromptDialogContainer.ts @@ -34,16 +34,11 @@ import { connect } from 'react-redux'; import { DialogService } from '../service'; import { AzureLoginPromptDialog, AzureLoginPromptDialogProps } from './azureLoginPromptDialog'; -import { SharedConstants } from '@bfemulator/app-shared'; -import { CommandServiceImpl } from '../../../platform/commands/commandServiceImpl'; const mapDispatchToProps = (_dispatch: () => void): AzureLoginPromptDialogProps => { return { cancel: () => DialogService.hideDialog(0), - confirm: () => DialogService.hideDialog(1), - onAnchorClick: (url) => { - CommandServiceImpl.remoteCall(SharedConstants.Commands.Electron.OpenExternal, url).catch(); - } + confirm: () => DialogService.hideDialog(1) }; }; diff --git a/packages/app/client/src/ui/dialogs/botCreationDialog/botCreationDialog.tsx b/packages/app/client/src/ui/dialogs/botCreationDialog/botCreationDialog.tsx index 380c9a9ac..0364111ed 100644 --- a/packages/app/client/src/ui/dialogs/botCreationDialog/botCreationDialog.tsx +++ b/packages/app/client/src/ui/dialogs/botCreationDialog/botCreationDialog.tsx @@ -145,9 +145,7 @@ export class BotCreationDialog extends React.Component<{}, BotCreationDialogStat label="Encrypt keys stored in your bot configuration." checked={ encryptKey } onChange={ this.onEncryptKeyChange }/> - +  Learn more. @@ -263,11 +261,6 @@ export class BotCreationDialog extends React.Component<{}, BotCreationDialogStat // this.setState({ secret: generatedSecret }); // } - private onLearnMoreEncryptionClick = (): void => { - const url = 'https://aka.ms/bot-framework-bot-file-encryption'; - CommandServiceImpl.remoteCall(SharedConstants.Commands.Electron.OpenExternal, url).catch(); - } - private onSaveAndConnect = async () => { try { const path = await this.showBotSaveDialog(); diff --git a/packages/app/client/src/ui/dialogs/botSettingsEditor/botSettingsEditor.scss b/packages/app/client/src/ui/dialogs/botSettingsEditor/botSettingsEditor.scss index d1f7af626..082b3a69d 100644 --- a/packages/app/client/src/ui/dialogs/botSettingsEditor/botSettingsEditor.scss +++ b/packages/app/client/src/ui/dialogs/botSettingsEditor/botSettingsEditor.scss @@ -19,7 +19,7 @@ .encrypt-key-check-box { margin-top: 30px; - + span { margin-right: 3px; } diff --git a/packages/app/client/src/ui/dialogs/connectServicePromptDialog/connectServicePromptDialog.tsx b/packages/app/client/src/ui/dialogs/connectServicePromptDialog/connectServicePromptDialog.tsx index d3529035a..2b790df37 100644 --- a/packages/app/client/src/ui/dialogs/connectServicePromptDialog/connectServicePromptDialog.tsx +++ b/packages/app/client/src/ui/dialogs/connectServicePromptDialog/connectServicePromptDialog.tsx @@ -1,14 +1,13 @@ import { DefaultButton, Dialog, DialogFooter, PrimaryButton } from '@bfemulator/ui-react'; import { ServiceTypes } from 'botframework-config/lib/schema'; import * as React from 'react'; -import { Component, MouseEvent, ReactNode } from 'react'; +import { Component, ReactNode } from 'react'; import * as styles from '../dialogStyles.scss'; export interface ConnectServicePromptDialogProps { cancel: () => void; confirm: () => void; addServiceManually: () => void; - onAnchorClick: (url: string) => void; serviceType?: ServiceTypes; } @@ -61,9 +60,7 @@ export class ConnectServicePromptDialog extends Component

{ `Sign in to your Azure account to select the LUIS applications you'd like to associate with this bot. ` } - Learn more about LUIS. +

@@ -81,9 +78,7 @@ export class ConnectServicePromptDialog extends Component { 'Sign in to your Azure account to select the QnA ' + 'Maker knowledge bases you\'d like to associate with this bot. ' } - Learn more about QnA Maker. +

@@ -101,9 +96,7 @@ export class ConnectServicePromptDialog extends Component

{ `Sign in to your Azure account to select the Dispatch model you'd like to associate with this bot. ` } - Learn more about Dispatch models. + Learn more about Dispatch models.

@@ -123,7 +116,7 @@ export class ConnectServicePromptDialog extends Component { 'Sign in to your Azure account to select the Azure Application ' + 'Insights you\'d like to associate with this bot. ' } - + Learn more about Azure Application Insights.

@@ -137,9 +130,4 @@ export class ConnectServicePromptDialog extends Component ); } - - private onAnchorClick = (event: MouseEvent) => { - const { href } = event.currentTarget.dataset; - this.props.onAnchorClick(href); - } } diff --git a/packages/app/client/src/ui/dialogs/connectServicePromptDialog/connectServicePromptDialogContainer.ts b/packages/app/client/src/ui/dialogs/connectServicePromptDialog/connectServicePromptDialogContainer.ts index 4d51f8be8..116a356c8 100644 --- a/packages/app/client/src/ui/dialogs/connectServicePromptDialog/connectServicePromptDialogContainer.ts +++ b/packages/app/client/src/ui/dialogs/connectServicePromptDialog/connectServicePromptDialogContainer.ts @@ -31,9 +31,7 @@ // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // -import { SharedConstants } from '@bfemulator/app-shared'; import { connect } from 'react-redux'; -import { CommandServiceImpl } from '../../../platform/commands/commandServiceImpl'; import { DialogService } from '../service'; import { ConnectServicePromptDialog, ConnectServicePromptDialogProps } from './connectServicePromptDialog'; @@ -44,10 +42,7 @@ const mapDispatchToProps = ( ...ownProps, cancel: () => DialogService.hideDialog(0), confirm: () => DialogService.hideDialog(1), - addServiceManually: () => DialogService.hideDialog(2), - onAnchorClick: (url) => { - CommandServiceImpl.remoteCall(SharedConstants.Commands.Electron.OpenExternal, url).catch(); - } + addServiceManually: () => DialogService.hideDialog(2) }; }; diff --git a/packages/app/client/src/ui/dialogs/getStartedWithCSDialog/getStartedWithCSDialog.tsx b/packages/app/client/src/ui/dialogs/getStartedWithCSDialog/getStartedWithCSDialog.tsx index 7d6585905..4d2b319d8 100644 --- a/packages/app/client/src/ui/dialogs/getStartedWithCSDialog/getStartedWithCSDialog.tsx +++ b/packages/app/client/src/ui/dialogs/getStartedWithCSDialog/getStartedWithCSDialog.tsx @@ -10,7 +10,6 @@ export interface GetStartedWithCSDialogProps { confirm: () => void; launchConnectedServiceEditor: () => void; authenticatedUser?: string; - onAnchorClick: (url: string) => void; serviceType?: ServiceTypes; showNoModelsFoundContent?: boolean; } @@ -72,7 +71,7 @@ export class GetStartedWithCSDialog extends Component

{ `You have not signed up for a LUIS account under ${this.props.authenticatedUser} ` } - + Learn more about LUIS

@@ -101,7 +100,7 @@ export class GetStartedWithCSDialog extends Component { 'You can link apps from a different {label} account to this Azure account by adding ' + 'yourself as a collaborator.' } - + Learn more about collaborating

@@ -119,13 +118,13 @@ export class GetStartedWithCSDialog extends Component { 'A Dispatch model is a LUIS model that enables your bot to dispatch intents across multiple LUIS ' + 'apps and QnAMaker knowledge bases. ' } - + Learn more about Dispatch models

{ `You have not signed up for a LUIS account under ${this.props.authenticatedUser} ` } - + Learn more about LUIS

@@ -152,12 +151,12 @@ export class GetStartedWithCSDialog extends Component

- Learn more about Dispatch models + Learn more about Dispatch models

{ 'You can link apps from a different Dispatch account to this Azure account by adding ' + 'yourself as a collaborator. ' } - + Learn more about collaborating

@@ -185,14 +184,4 @@ export class GetStartedWithCSDialog extends Component ); } - - private onLearnMoreCollaboration = () => { - this.props.onAnchorClick('http://aka.ms/bot-framework-emulator-luis-collaboration'); - } - private onLearnMoreLUIS = () => { - this.props.onAnchorClick('http://aka.ms/bot-framework-emulator-LUIS-docs-home'); - } - private onLearnMoreDispatch = () => { - this.props.onAnchorClick('https://aka.ms/bot-framework-emulator-create-dispatch'); - } } diff --git a/packages/app/client/src/ui/dialogs/getStartedWithCSDialog/getStartedWithCSDialogContainer.ts b/packages/app/client/src/ui/dialogs/getStartedWithCSDialog/getStartedWithCSDialogContainer.ts index 2535839ca..30eb651e0 100644 --- a/packages/app/client/src/ui/dialogs/getStartedWithCSDialog/getStartedWithCSDialogContainer.ts +++ b/packages/app/client/src/ui/dialogs/getStartedWithCSDialog/getStartedWithCSDialogContainer.ts @@ -35,17 +35,12 @@ import { connect } from 'react-redux'; import { DialogService } from '../service'; import { GetStartedWithCSDialog, GetStartedWithCSDialogProps } from './getStartedWithCSDialog'; import { RootState } from '../../../data/store'; -import { CommandServiceImpl } from '../../../platform/commands/commandServiceImpl'; -import { SharedConstants } from '@bfemulator/app-shared'; const mapDispatchToProps = (_dispatch: () => void): GetStartedWithCSDialogProps => ({ cancel: () => DialogService.hideDialog(0), confirm: () => DialogService.hideDialog(1), launchConnectedServiceEditor: () => { DialogService.hideDialog(2); - }, - onAnchorClick: (url) => { - CommandServiceImpl.remoteCall(SharedConstants.Commands.Electron.OpenExternal, url).catch(); } }); diff --git a/packages/app/client/src/ui/dialogs/postMigrationDialog/postMigrationDialog.spec.tsx b/packages/app/client/src/ui/dialogs/postMigrationDialog/postMigrationDialog.spec.tsx index f941685b7..da3280b67 100644 --- a/packages/app/client/src/ui/dialogs/postMigrationDialog/postMigrationDialog.spec.tsx +++ b/packages/app/client/src/ui/dialogs/postMigrationDialog/postMigrationDialog.spec.tsx @@ -4,8 +4,7 @@ import { createStore } from 'redux'; import { navBar } from '../../../data/reducer/navBar'; import { mount } from 'enzyme'; import { PostMigrationDialogContainer } from './postMigrationDialogContainer'; -import { PostMigrationDialog, } from './postMigrationDialog'; -import { CommandServiceImpl } from '../../../platform/commands/commandServiceImpl'; +import { PostMigrationDialog } from './postMigrationDialog'; jest.mock('../../dialogs', () => ({})); @@ -29,13 +28,4 @@ describe('The PostMigrationDialogContainer component', () => { it('should contain a close function in the props', () => { expect(typeof (node.props() as any).close).toBe('function'); }); - - it('should call the appropriate command when a link is clicked', () => { - const instance = node.instance(); - const spy = jest.spyOn(CommandServiceImpl, 'remoteCall'); - instance.onLearnMoreConfigAnchor(); - expect(spy).toHaveBeenCalledWith('electron:open-external', 'https://aka.ms/about-bot-file'); - instance.onLearnMoreNewFeaturesAnchor(); - expect(spy).toHaveBeenCalledWith('electron:open-external', 'https://aka.ms/bot-framework-emulator-v4-overview'); - }); }); diff --git a/packages/app/client/src/ui/dialogs/postMigrationDialog/postMigrationDialog.tsx b/packages/app/client/src/ui/dialogs/postMigrationDialog/postMigrationDialog.tsx index 3c5eaff87..18c6aa2f9 100644 --- a/packages/app/client/src/ui/dialogs/postMigrationDialog/postMigrationDialog.tsx +++ b/packages/app/client/src/ui/dialogs/postMigrationDialog/postMigrationDialog.tsx @@ -36,7 +36,6 @@ import { Dialog, DialogFooter, PrimaryButton } from '@bfemulator/ui-react'; export interface PostMigrationDialogProps { close: () => void; - onAnchorClick: (url: string) => void; } export class PostMigrationDialog extends React.Component { @@ -51,16 +50,12 @@ export class PostMigrationDialog extends React.Component.bot files. ' + 'A .bot file stores metadata about different services your bot consumes and enables you ' + 'to edit these services directly from the Emulator v4. ' } - - Learn more about bot configuration files. - + Learn more about bot configuration files.

You can move a bot to any location by right-clicking the bot's name under My Bots.

- - Learn more about new features in Bot Framework Emulator v4 + + Learn more about new features in Bot Framework Emulator v4

@@ -73,12 +68,4 @@ export class PostMigrationDialog extends React.Component { this.props.close(); } - - private onLearnMoreConfigAnchor = () => { - this.props.onAnchorClick('https://aka.ms/about-bot-file'); - } - - private onLearnMoreNewFeaturesAnchor = () => { - this.props.onAnchorClick('https://aka.ms/bot-framework-emulator-v4-overview'); - } } diff --git a/packages/app/client/src/ui/dialogs/postMigrationDialog/postMigrationDialogContainer.ts b/packages/app/client/src/ui/dialogs/postMigrationDialog/postMigrationDialogContainer.ts index a294e3040..e78cbc550 100644 --- a/packages/app/client/src/ui/dialogs/postMigrationDialog/postMigrationDialogContainer.ts +++ b/packages/app/client/src/ui/dialogs/postMigrationDialog/postMigrationDialogContainer.ts @@ -1,8 +1,6 @@ import { connect } from 'react-redux'; -import { CommandServiceImpl } from '../../../platform/commands/commandServiceImpl'; import { DialogService } from '../service'; import { PostMigrationDialog, PostMigrationDialogProps } from './postMigrationDialog'; -import { SharedConstants } from '@bfemulator/app-shared'; const mapStateToProps = (ownProps: PostMigrationDialogProps) => ownProps; @@ -10,9 +8,6 @@ function mapDispatchToProps(): PostMigrationDialogProps { return { close: () => { DialogService.hideDialog(); - }, - onAnchorClick: (url) => { - CommandServiceImpl.remoteCall(SharedConstants.Commands.Electron.OpenExternal, url).catch(); } }; } diff --git a/packages/app/client/src/ui/dialogs/secretPromptDialog/secretPromptDialog.spec.tsx b/packages/app/client/src/ui/dialogs/secretPromptDialog/secretPromptDialog.spec.tsx index 39c071c13..85fc7e127 100644 --- a/packages/app/client/src/ui/dialogs/secretPromptDialog/secretPromptDialog.spec.tsx +++ b/packages/app/client/src/ui/dialogs/secretPromptDialog/secretPromptDialog.spec.tsx @@ -8,8 +8,6 @@ import { setActive } from '../../../data/action/botActions'; import { SecretPromptDialogContainer } from './secretPromptDialogContainer'; import { SecretPromptDialog } from './secretPromptDialog'; import { DialogService } from '../service'; -import { CommandServiceImpl } from '../../../platform/commands/commandServiceImpl'; -import { SharedConstants } from '@bfemulator/app-shared'; const mockStore = createStore(combineReducers({ bot })); const mockBot = BotConfigWithPathImpl.fromJSON({}); @@ -42,7 +40,7 @@ jest.mock('../../../utils', () => ({ } })); -describe('The Secret prompt dialog should', () => { +describe('The Secret prompt dialog', () => { let parent; let node; beforeEach(() => { @@ -59,7 +57,6 @@ describe('The Secret prompt dialog should', () => { }); it('should contain the expected functions in the props', () => { - expect(typeof (node.props() as any).onAnchorClick).toBe('function'); expect(typeof (node.props() as any).onCancelClick).toBe('function'); expect(typeof (node.props() as any).onSaveClick).toBe('function'); }); @@ -97,12 +94,4 @@ describe('The Secret prompt dialog should', () => { expect(spy).toHaveBeenCalledWith(null); }); - - it('should make a remote command call when the learn more button is clicked', () => { - const spy = jest.spyOn(CommandServiceImpl, 'remoteCall'); - const instance = node.instance(); - instance.onLearnMoreClick(); - const url = 'https://github.com/Microsoft/botbuilder-tools/tree/master/packages/MSBot'; - expect(spy).toHaveBeenCalledWith(SharedConstants.Commands.Electron.OpenExternal, url); - }); }); diff --git a/packages/app/client/src/ui/dialogs/secretPromptDialog/secretPromptDialog.tsx b/packages/app/client/src/ui/dialogs/secretPromptDialog/secretPromptDialog.tsx index 777a3b03e..2b4e9df0f 100644 --- a/packages/app/client/src/ui/dialogs/secretPromptDialog/secretPromptDialog.tsx +++ b/packages/app/client/src/ui/dialogs/secretPromptDialog/secretPromptDialog.tsx @@ -44,7 +44,6 @@ interface SecretPromptDialogState { } export interface SecretPromptDialogProps { - onAnchorClick: (url: string) => void; onCancelClick: () => void; onSaveClick: (newSecret: string) => void; } @@ -69,7 +68,7 @@ export class SecretPromptDialog extends React.Component { 'If you encrypted your bot file with the MsBot command-line tool, your bot file secret was displayed ' + 'when you ran MsBot. ' } - Learn more about MsBot. + Learn more about MsBot.

{ - this.props.onAnchorClick('https://github.com/Microsoft/botbuilder-tools/tree/master/packages/MSBot'); - } - private onRevealSecretClick = () => { this.setState({ revealSecret: !this.state.revealSecret }); } diff --git a/packages/app/client/src/ui/dialogs/secretPromptDialog/secretPromptDialogContainer.ts b/packages/app/client/src/ui/dialogs/secretPromptDialog/secretPromptDialogContainer.ts index bc5519246..f9fef80ac 100644 --- a/packages/app/client/src/ui/dialogs/secretPromptDialog/secretPromptDialogContainer.ts +++ b/packages/app/client/src/ui/dialogs/secretPromptDialog/secretPromptDialogContainer.ts @@ -1,13 +1,9 @@ import { connect } from 'react-redux'; import { SecretPromptDialog, SecretPromptDialogProps } from './secretPromptDialog'; -import { CommandServiceImpl } from '../../../platform/commands/commandServiceImpl'; -import { SharedConstants } from '@bfemulator/app-shared'; import { DialogService } from '../service'; const mapStateToProps = (): SecretPromptDialogProps => ({ - onAnchorClick: (url: string) => - CommandServiceImpl.remoteCall(SharedConstants.Commands.Electron.OpenExternal, url).catch(), onCancelClick: () => DialogService.hideDialog(null), onSaveClick: (newSecret: string) => DialogService.hideDialog(newSecret) }); diff --git a/packages/app/client/src/ui/editor/welcomePage/welcomePage.spec.tsx b/packages/app/client/src/ui/editor/welcomePage/welcomePage.spec.tsx index a366246a5..c3fe11944 100644 --- a/packages/app/client/src/ui/editor/welcomePage/welcomePage.spec.tsx +++ b/packages/app/client/src/ui/editor/welcomePage/welcomePage.spec.tsx @@ -57,17 +57,6 @@ describe('The AzureLoginFailedDialogContainer component should', () => { expect(parent.find(WelcomePage)).not.toBe(null); }); - it('should call the appropriate command when a link is clicked', () => { - const mockEvent = { - currentTarget: { - dataset: { href: 'https://aka.ms/' }, - }, - }; - const spy = jest.spyOn(CommandServiceImpl, 'remoteCall'); - instance.onAnchorClick(mockEvent); - expect(spy).toHaveBeenCalledWith(SharedConstants.Commands.Electron.OpenExternal, 'https://aka.ms/'); - }); - it('should call the appropriate command when a recent bot is clicked', () => { const spy = jest.spyOn(CommandServiceImpl, 'call'); instance.onBotClick({ diff --git a/packages/app/client/src/ui/editor/welcomePage/welcomePage.tsx b/packages/app/client/src/ui/editor/welcomePage/welcomePage.tsx index c029179c5..52665045b 100644 --- a/packages/app/client/src/ui/editor/welcomePage/welcomePage.tsx +++ b/packages/app/client/src/ui/editor/welcomePage/welcomePage.tsx @@ -31,7 +31,6 @@ // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // -import { MouseEvent } from 'react'; import * as React from 'react'; import { BotInfo } from '@bfemulator/app-shared'; import * as styles from './welcomePage.scss'; @@ -41,7 +40,6 @@ import { GenericDocument } from '../../layout'; export interface WelcomePageProps { accessToken?: string; documentId?: string; - onAnchorClick: (url: string) => void; onNewBotClick?: () => void; onOpenBotClick?: () => void; onBotClick?: (_e: any, path: string) => void; @@ -90,12 +88,6 @@ export class WelcomePage extends React.Component { this.props.showContextMenuForBot(bot); } - private onAnchorClick = (event: MouseEvent): void => { - const { currentTarget: link } = event; - const { href } = link.dataset; - this.props.onAnchorClick(href); - } - private onDeleteBotClick = (event: React.MouseEvent) => { const { index } = event.currentTarget.dataset; const bot = this.props.recentBots[index]; @@ -110,11 +102,8 @@ export class WelcomePage extends React.Component { Start by testing your bot Start talking to your bot by connecting to an endpoint or by opening a bot saved locally.
- More about working locally with a bot. + + More about working locally with a bot.
@@ -192,14 +181,9 @@ export class WelcomePage extends React.Component {
Plan:
Review the bot  - + design guidelines -   - for best practices  + for best practices 
@@ -210,49 +194,23 @@ export class WelcomePage extends React.Component {
Build:
- + Download Command Line tools
Create a bot  - + from Azure or  - + locally
Add services such as
- + Language Understanding (LUIS) ,  - - QnAMaker -   - and  - + QnAMaker +  and  + Dispatch
@@ -266,19 +224,11 @@ export class WelcomePage extends React.Component {
Test:
Test with the  - + Emulator
Test online in  - + Web Chat
@@ -291,11 +241,10 @@ export class WelcomePage extends React.Component {
Publish:
Publish directly to Azure or
- Use + Use +   Continuous Deployment   @@ -310,11 +259,7 @@ export class WelcomePage extends React.Component {
Connect:
Connect to  - + channels   @@ -328,11 +273,7 @@ export class WelcomePage extends React.Component {
Evaluate:
- + View analytics
diff --git a/packages/app/client/src/ui/editor/welcomePage/welcomePageContainer.ts b/packages/app/client/src/ui/editor/welcomePage/welcomePageContainer.ts index cffa7ee3f..9bdf12460 100644 --- a/packages/app/client/src/ui/editor/welcomePage/welcomePageContainer.ts +++ b/packages/app/client/src/ui/editor/welcomePage/welcomePageContainer.ts @@ -51,9 +51,6 @@ function mapStateToProps(state: RootState, ownProps: WelcomePageProps): WelcomeP function mapDispatchToProps(dispatch: (action: Action) => void): WelcomePageProps { const { Commands } = SharedConstants; return { - onAnchorClick: (url) => { - CommandServiceImpl.remoteCall(Commands.Electron.OpenExternal, url).catch(); - }, onNewBotClick: () => { CommandServiceImpl.call(Commands.UI.ShowBotCreationDialog).catch(); }, diff --git a/packages/app/client/src/ui/shell/explorer/servicesExplorer/connectedServiceEditor/connectedServiceEditor.spec.tsx b/packages/app/client/src/ui/shell/explorer/servicesExplorer/connectedServiceEditor/connectedServiceEditor.spec.tsx index c350e9e5a..5b4ce16c2 100644 --- a/packages/app/client/src/ui/shell/explorer/servicesExplorer/connectedServiceEditor/connectedServiceEditor.spec.tsx +++ b/packages/app/client/src/ui/shell/explorer/servicesExplorer/connectedServiceEditor/connectedServiceEditor.spec.tsx @@ -1,4 +1,3 @@ -import { SharedConstants } from '@bfemulator/app-shared'; import { PrimaryButton } from '@bfemulator/ui-react'; import { ServiceTypes } from 'botframework-config'; import { LuisService } from 'botframework-config/lib/models'; @@ -7,9 +6,8 @@ import * as React from 'react'; import { Provider } from 'react-redux'; import { combineReducers, createStore } from 'redux'; import { azureAuth } from '../../../../../data/reducer/azureAuthReducer'; -import { CommandServiceImpl } from '../../../../../platform/commands/commandServiceImpl'; import { DialogService } from '../../../../dialogs/service'; -import { ConnectedServiceEditor } from './connectedServiceEditor'; +import { ConnectedServiceEditor, getLearnMoreLink } from './connectedServiceEditor'; import { ConnectedServiceEditorContainer } from './connectedServiceEditorContainer'; jest.mock('../../../../dialogs/service', () => ({ @@ -29,7 +27,7 @@ jest.mock('../../../../dialogs/', () => ({ jest.mock('./connectedServiceEditor.scss', () => ({})); -describe('The ConnectedServiceEditor component should', () => { +describe('The ConnectedServiceEditor component ', () => { let parent; let node; let mockService; @@ -104,24 +102,17 @@ describe('The ConnectedServiceEditor component should', () => { expect(submitBtn.props.disabled).toBeFalsy(); }); - it('should request to open a url when the learn more anchor is clicked based on the service type', async () => { - const remoteCallSpy = jest.spyOn(CommandServiceImpl, 'remoteCall'); - const instance = node.instance(); - expect(() => instance.onLearnMoreClick()).toThrow(); - instance.props = {...instance.props, serviceType: ServiceTypes.Luis}; - - instance.onLearnMoreClick(); - expect(remoteCallSpy).toHaveBeenCalledWith(SharedConstants.Commands.Electron.OpenExternal, - 'http://aka.ms/bot-framework-emulator-LUIS-docs-home'); - - instance.props = {...instance.props, serviceType: ServiceTypes.QnA}; - instance.onLearnMoreClick(); - expect(remoteCallSpy).toHaveBeenCalledWith(SharedConstants.Commands.Electron.OpenExternal, - 'http://aka.ms/bot-framework-emulator-qna-keys'); - - instance.props = {...instance.props, serviceType: ServiceTypes.Dispatch}; - instance.onLearnMoreClick(); - expect(remoteCallSpy).toHaveBeenCalledWith(SharedConstants.Commands.Electron.OpenExternal, - 'https://aka.ms/bot-framework-emulator-create-dispatch'); + it('should return the correct url according to service type.', () => { + let serviceType = ServiceTypes.QnA; + let returnedHref = getLearnMoreLink(serviceType); + expect(returnedHref).toBe('http://aka.ms/bot-framework-emulator-qna-keys'); + + serviceType = ServiceTypes.Luis; + returnedHref = getLearnMoreLink(serviceType); + expect(returnedHref).toBe('http://aka.ms/bot-framework-emulator-LUIS-docs-home'); + + serviceType = ServiceTypes.Dispatch; + returnedHref = getLearnMoreLink(serviceType); + expect(returnedHref).toBe('https://aka.ms/bot-framework-emulator-create-dispatch'); }); }); diff --git a/packages/app/client/src/ui/shell/explorer/servicesExplorer/connectedServiceEditor/connectedServiceEditor.tsx b/packages/app/client/src/ui/shell/explorer/servicesExplorer/connectedServiceEditor/connectedServiceEditor.tsx index 6c482b679..e71afca9d 100644 --- a/packages/app/client/src/ui/shell/explorer/servicesExplorer/connectedServiceEditor/connectedServiceEditor.tsx +++ b/packages/app/client/src/ui/shell/explorer/servicesExplorer/connectedServiceEditor/connectedServiceEditor.tsx @@ -111,6 +111,22 @@ const getEditableFields = (service: IConnectedService): string[] => { } }; +export function getLearnMoreLink(serviceType?: ServiceTypes): (string | void) { + switch (serviceType) { + case ServiceTypes.Luis: + return 'http://aka.ms/bot-framework-emulator-LUIS-docs-home'; + + case ServiceTypes.QnA: + return 'http://aka.ms/bot-framework-emulator-qna-keys'; + + case ServiceTypes.Dispatch: + return 'https://aka.ms/bot-framework-emulator-create-dispatch'; + + default: + return; + } +} + export class ConnectedServiceEditor extends Component { public state: ConnectedServiceEditorState = {} as ConnectedServiceEditorState; @@ -158,7 +174,7 @@ export class ConnectedServiceEditor extends Component

You can find your knowledge base ID and subscription key in { portalMap[type] }  - + Learn more about keys in { labelMap[type] }

@@ -190,27 +206,6 @@ export class ConnectedServiceEditor extends Component { - let url; - switch (this.props.serviceType) { - case ServiceTypes.Luis: - url = 'http://aka.ms/bot-framework-emulator-LUIS-docs-home'; - break; - - case ServiceTypes.QnA: - url = 'http://aka.ms/bot-framework-emulator-qna-keys'; - break; - - case ServiceTypes.Dispatch: - url = 'https://aka.ms/bot-framework-emulator-create-dispatch'; - break; - - default: - throw new Error(`${this.props.serviceType} is not a known service.`); - } - this.props.onAnchorClick(url); - } - private onSubmitClick = (): void => { this.props.updateConnectedService(this.state.connectedServiceCopy); } diff --git a/packages/app/client/src/ui/shell/explorer/servicesExplorer/connectedServiceEditor/connectedServiceEditorContainer.ts b/packages/app/client/src/ui/shell/explorer/servicesExplorer/connectedServiceEditor/connectedServiceEditorContainer.ts index 655055095..9196188f8 100644 --- a/packages/app/client/src/ui/shell/explorer/servicesExplorer/connectedServiceEditor/connectedServiceEditorContainer.ts +++ b/packages/app/client/src/ui/shell/explorer/servicesExplorer/connectedServiceEditor/connectedServiceEditorContainer.ts @@ -35,8 +35,6 @@ import { connect } from 'react-redux'; import { RootState } from '../../../../../data/store'; import { DialogService } from '../../../../dialogs/service'; import { ConnectedServiceEditor } from './connectedServiceEditor'; -import { CommandServiceImpl } from '../../../../../platform/commands/commandServiceImpl'; -import { SharedConstants } from '@bfemulator/app-shared'; const mapStateToProps = (_state: RootState, ownProps: { [propName: string]: any }) => { return { @@ -48,9 +46,6 @@ const mapDispatchToProps = (_dispatch: () => void) => { return { updateConnectedService: updatedLuisService => DialogService.hideDialog([updatedLuisService]), cancel: () => DialogService.hideDialog(0), - onAnchorClick: (url) => { - CommandServiceImpl.remoteCall(SharedConstants.Commands.Electron.OpenExternal, url).catch(); - } }; }; diff --git a/packages/app/client/src/ui/shell/explorer/servicesExplorer/connectedServicePicker/connectedServicePicker.tsx b/packages/app/client/src/ui/shell/explorer/servicesExplorer/connectedServicePicker/connectedServicePicker.tsx index ca9e0fb49..98038e96a 100644 --- a/packages/app/client/src/ui/shell/explorer/servicesExplorer/connectedServicePicker/connectedServicePicker.tsx +++ b/packages/app/client/src/ui/shell/explorer/servicesExplorer/connectedServicePicker/connectedServicePicker.tsx @@ -57,7 +57,6 @@ interface ConnectedServicesPickerProps { launchServiceEditor: () => void; connectServices: (models: IConnectedService[]) => void; cancel: () => void; - onAnchorClick: (url: string) => void; } interface ConnectedServicesPickerState { @@ -170,22 +169,6 @@ export class ConnectedServicePicker extends Component { - this.props.onAnchorClick('http://aka.ms/bot-framework-emulator-create-luis-app'); - } - - private onCreateKB = () => { - this.props.onAnchorClick('http://aka.ms/bot-framework-emulator-create-qna-kb'); - } - - private onLearnMoreCollaboration = () => { - this.props.onAnchorClick('http://aka.ms/bot-framework-emulator-luis-collaboration'); - } - - private onLearnMoreDispatch = () => { - this.props.onAnchorClick('https://aka.ms/bot-framework-emulator-create-dispatch'); - } - private get selectAllCheckbox(): JSX.Element { if (this.props.availableServices.length < 2) { return null; @@ -274,13 +257,13 @@ export class ConnectedServicePicker extends Component - + Create a new LUIS app

Signed in as { this.props.authenticatedUser }. You can link apps from a different LUIS account to this Azure account by adding yourself as a collaborator.  - Learn more about collaborating. + Learn more about collaborating.

); @@ -289,7 +272,7 @@ export class ConnectedServicePicker extends Component - + Create a new knowledge base

@@ -302,13 +285,13 @@ export class ConnectedServicePicker extends Component - + Learn more about using Dispatch apps

Signed in as { this.props.authenticatedUser }. You can link apps from a different LUIS account to this Azure account by adding yourself as a collaborator.  - Learn more about collaborating. + Learn more about collaborating.

); diff --git a/packages/app/client/src/ui/shell/explorer/servicesExplorer/connectedServicePicker/connectedServicePickerContainer.ts b/packages/app/client/src/ui/shell/explorer/servicesExplorer/connectedServicePicker/connectedServicePickerContainer.ts index fb8f65315..f21512992 100644 --- a/packages/app/client/src/ui/shell/explorer/servicesExplorer/connectedServicePicker/connectedServicePickerContainer.ts +++ b/packages/app/client/src/ui/shell/explorer/servicesExplorer/connectedServicePicker/connectedServicePickerContainer.ts @@ -35,8 +35,6 @@ import { ServiceTypes } from 'botframework-config/lib/schema'; import { RootState } from '../../../../../data/store'; import { DialogService } from '../../../../dialogs/service'; import { ConnectedServicePicker } from './connectedServicePicker'; -import { CommandServiceImpl } from '../../../../../platform/commands/commandServiceImpl'; -import { SharedConstants } from '@bfemulator/app-shared'; const mapStateToProps = (state: RootState, ownProps: { [propName: string]: any }) => { const { services } = state.bot.activeBot; @@ -51,9 +49,6 @@ const mapDispatchToProps = (_dispatch: () => void) => { launchServiceEditor: () => DialogService.hideDialog(1), connectServices: servicesToConnect => DialogService.hideDialog(servicesToConnect), cancel: () => DialogService.hideDialog(0), - onAnchorClick: (url) => { - CommandServiceImpl.remoteCall(SharedConstants.Commands.Electron.OpenExternal, url).catch(); - } }; }; diff --git a/packages/app/client/src/ui/shell/explorer/servicesExplorer/servicesExplorer.spec.tsx b/packages/app/client/src/ui/shell/explorer/servicesExplorer/servicesExplorer.spec.tsx index 6016b5b7c..f893b357d 100644 --- a/packages/app/client/src/ui/shell/explorer/servicesExplorer/servicesExplorer.spec.tsx +++ b/packages/app/client/src/ui/shell/explorer/servicesExplorer/servicesExplorer.spec.tsx @@ -1,4 +1,3 @@ -import { SharedConstants } from '@bfemulator/app-shared'; import { LuisService } from 'botframework-config/lib/models'; import { mount } from 'enzyme'; import * as React from 'react'; @@ -13,7 +12,6 @@ import { } from '../../../../data/action/connectedServiceActions'; import { bot } from '../../../../data/reducer/bot'; import { explorer } from '../../../../data/reducer/explorer'; -import { CommandServiceImpl } from '../../../../platform/commands/commandServiceImpl'; import { AzureLoginFailedDialogContainer, AzureLoginSuccessDialogContainer, @@ -106,13 +104,6 @@ describe('The ServicesExplorer component should', () => { })); }); - it('should dispatch a request to open a link when an anchor is clicked', () => { - const instance = node.instance(); - const remoteCallSpy = jest.spyOn(CommandServiceImpl, 'remoteCall'); - instance.onAnchorClick({ currentTarget: { dataset: { href: 'http://someurl' } } }); - expect(remoteCallSpy).toHaveBeenCalledWith(SharedConstants.Commands.Electron.OpenExternal, 'http://someurl'); - }); - it('should dispatch to the store when a request to open the sort context menu is made', () => { const instance = node.instance(); instance.onSortClick(); diff --git a/packages/app/client/src/ui/shell/explorer/servicesExplorer/servicesExplorer.tsx b/packages/app/client/src/ui/shell/explorer/servicesExplorer/servicesExplorer.tsx index 3eca160d3..7c49bfab8 100644 --- a/packages/app/client/src/ui/shell/explorer/servicesExplorer/servicesExplorer.tsx +++ b/packages/app/client/src/ui/shell/explorer/servicesExplorer/servicesExplorer.tsx @@ -33,7 +33,7 @@ import { IConnectedService } from 'botframework-config/lib/schema'; import * as React from 'react'; -import { MouseEvent, MouseEventHandler, SyntheticEvent } from 'react'; +import { MouseEventHandler, SyntheticEvent } from 'react'; import { ServicePane, ServicePaneProps } from '../servicePane/servicePane'; import { ConnectedServiceEditorContainer } from './connectedServiceEditor'; import { ConnectedServicePickerPayload } from '../../../../data/action/connectedServiceActions'; @@ -51,7 +51,6 @@ import { serviceTypeLabels } from '../../../../utils/serviceTypeLables'; export interface ServicesExplorerProps extends ServicePaneProps { services?: IConnectedService[]; toAnimate?: { [serviceId: string]: boolean }; - onAnchorClick: (url: string) => void; openAddServiceContextMenu: (payload: ConnectedServicePickerPayload) => void; openSortContextMenu: () => void; openServiceDeepLink: (service: IConnectedService) => void; @@ -97,31 +96,12 @@ export class ServicesExplorer extends ServicePane { ); @@ -191,8 +171,4 @@ export class ServicesExplorer extends ServicePane { progressIndicatorComponent: ProgressIndicatorContainer }); } - - private onAnchorClick = (event: MouseEvent): void => { - this.props.onAnchorClick(event.currentTarget.dataset.href); - } } diff --git a/packages/app/client/src/ui/shell/explorer/servicesExplorer/servicesExplorerContainer.ts b/packages/app/client/src/ui/shell/explorer/servicesExplorer/servicesExplorerContainer.ts index 77d520d71..9f1220129 100644 --- a/packages/app/client/src/ui/shell/explorer/servicesExplorer/servicesExplorerContainer.ts +++ b/packages/app/client/src/ui/shell/explorer/servicesExplorer/servicesExplorerContainer.ts @@ -31,7 +31,6 @@ // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // -import { SharedConstants } from '@bfemulator/app-shared'; import { IConnectedService, ServiceTypes } from 'botframework-config/lib/schema'; import { ComponentClass } from 'react'; import { connect } from 'react-redux'; @@ -44,7 +43,6 @@ import { } from '../../../../data/action/connectedServiceActions'; import { CONNECTED_SERVICES_PANEL_ID } from '../../../../data/action/explorerActions'; import { RootState } from '../../../../data/store'; -import { CommandServiceImpl } from '../../../../platform/commands/commandServiceImpl'; import { ConnectedServiceEditor } from './connectedServiceEditor/connectedServiceEditor'; import { ServicesExplorer, ServicesExplorerProps } from './servicesExplorer'; @@ -63,9 +61,6 @@ const mapStateToProps = (state: RootState): Partial => { const mapDispatchToProps = (dispatch): Partial => { return { - onAnchorClick: (url) => { - return CommandServiceImpl.remoteCall(SharedConstants.Commands.Electron.OpenExternal, url); - }, openAddServiceContextMenu: (payload: ConnectedServicePickerPayload) => dispatch(openAddServiceContextMenu(payload)), diff --git a/packages/app/main/src/appMenuBuilder.ts b/packages/app/main/src/appMenuBuilder.ts index e51f23eca..231d778fb 100644 --- a/packages/app/main/src/appMenuBuilder.ts +++ b/packages/app/main/src/appMenuBuilder.ts @@ -415,33 +415,25 @@ export const AppMenuBuilder = new class AppMenuBuilderImpl implements AppMenuBui { type: 'separator' }, { label: 'Privacy', - click: () => mainWindow.commandService.remoteCall( - SharedConstants.Commands.Electron.OpenExternal, - 'https://go.microsoft.com/fwlink/?LinkId=512132' - ) + click: () => + Electron.shell.openExternal('https://go.microsoft.com/fwlink/?LinkId=512132', { activate: true }) }, { // TODO: Proper link for the license instead of third party credits label: 'License', - click: () => mainWindow.commandService.remoteCall( - SharedConstants.Commands.Electron.OpenExternal, - 'https://aka.ms/O10ww2' - ) + click: () => + Electron.shell.openExternal('https://aka.ms/O10ww2', { activate: true }) }, { label: 'Credits', - click: () => mainWindow.commandService.remoteCall( - SharedConstants.Commands.Electron.OpenExternal, - 'https://aka.ms/Ud5ga6' - ) + click: () => + Electron.shell.openExternal('https://aka.ms/Ud5ga6', { activate: true }) }, { type: 'separator' }, { label: 'Report an issue', - click: () => mainWindow.commandService.remoteCall( - SharedConstants.Commands.Electron.OpenExternal, - 'https://aka.ms/cy106f' - ) + click: () => + Electron.shell.openExternal('https://aka.ms/cy106f', { activate: true }) }, { type: 'separator' }, this.getUpdateMenuItem(), diff --git a/packages/app/main/src/commands/botCommands.spec.ts b/packages/app/main/src/commands/botCommands.spec.ts index d637fda60..f8299e80b 100644 --- a/packages/app/main/src/commands/botCommands.spec.ts +++ b/packages/app/main/src/commands/botCommands.spec.ts @@ -56,7 +56,7 @@ jest.mock('../emulator', () => ({ })); const mockCommandRegistry = new CommandRegistryImpl(); const mockBot = BotConfigWithPathImpl.fromJSON({ - 'path': 'some/path.bot', + 'path': path.normalize('some/path.bot'), 'name': 'AuthBot', 'description': '', 'padlock': '', @@ -98,11 +98,11 @@ describe('The botCommands', () => { const saveBotSpy = jest.spyOn((helpers as any).default, 'saveBot'); const mockBotInfo = { - path: botToSave.path, + path: path.normalize(botToSave.path), displayName: 'AuthBot', secret: 'secret', - chatsPath: 'some/dialogs', - transcriptsPath: 'some/transcripts' + chatsPath: path.normalize('some/dialogs'), + transcriptsPath: path.normalize('some/transcripts') }; const command = mockCommandRegistry.getCommand(Bot.Create); const result = await command.handler(botToSave, 'secret'); @@ -234,7 +234,7 @@ describe('The botCommands', () => { it('should patch the bots list and watch for chat and transcript changes', async () => { const mockBotInfo = { - path: 'this/is/my.json', + path: path.normalize('this/is/my.json'), displayName: 'AuthBot', secret: 'secret' }; @@ -243,8 +243,8 @@ describe('The botCommands', () => { const { handler } = mockCommandRegistry.getCommand(SharedConstants.Commands.Bot.PatchBotList); await handler(mockBotInfo.path, mockBotInfo); - expect(transcriptWatchSpy).toHaveBeenCalledWith('this/is/transcripts'); - expect(chatWatcherSpy).toHaveBeenCalledWith('this/is/dialogs'); + expect(transcriptWatchSpy).toHaveBeenCalledWith(path.normalize('this/is/transcripts')); + expect(chatWatcherSpy).toHaveBeenCalledWith(path.normalize('this/is/dialogs')); }); it('should remove a bot from the list', async () => { diff --git a/packages/app/main/src/commands/clientInitCommands.ts b/packages/app/main/src/commands/clientInitCommands.ts index 06e917803..be8b7de43 100644 --- a/packages/app/main/src/commands/clientInitCommands.ts +++ b/packages/app/main/src/commands/clientInitCommands.ts @@ -77,7 +77,7 @@ export function registerCommands(commandRegistry: CommandRegistryImpl) { const settingsStore: Store = getSettingsStore(); const settingsState = settingsStore.getState(); await mainWindow.commandService.remoteCall(Commands.Settings.ReceiveGlobalSettings, { - serverUrl: (emulator.framework.serverUrl || '').replace('[::]', '127.0.0.1'), + serverUrl: (emulator.framework.serverUrl || '').replace('[::]', 'localhost'), cwd: (__dirname || '').replace(/\\/g, '/'), users: settingsState.users, locale: settingsState.framework.locale diff --git a/packages/extensions/debug/client/public/qna.js b/packages/extensions/debug/client/public/qna.js index b8d0188b8..d8ce17d06 100644 --- a/packages/extensions/debug/client/public/qna.js +++ b/packages/extensions/debug/client/public/qna.js @@ -3,7 +3,7 @@ object-assign (c) Sindre Sorhus @license MIT -*/var r=Object.getOwnPropertySymbols,o=Object.prototype.hasOwnProperty,a=Object.prototype.propertyIsEnumerable;e.exports=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},n=0;n<10;n++)t["_"+String.fromCharCode(n)]=n;if("0123456789"!==Object.getOwnPropertyNames(t).map(function(e){return t[e]}).join(""))return!1;var r={};return"abcdefghijklmnopqrst".split("").forEach(function(e){r[e]=e}),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},r)).join("")}catch(e){return!1}}()?Object.assign:function(e,t){for(var n,i,l=function(e){if(null===e||void 0===e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}(e),u=1;u=0&&u.splice(t,1)}function h(e){var t=document.createElement("style");return void 0===e.attrs.type&&(e.attrs.type="text/css"),m(t,e.attrs),p(e,t),t}function m(e,t){Object.keys(t).forEach(function(n){e.setAttribute(n,t[n])})}function g(e,t){var n,r,o,a;if(t.transform&&e.css){if(!(a=t.transform(e.css)))return function(){};e.css=a}if(t.singleton){var u=l++;n=i||(i=h(t)),r=v.bind(null,n,u,!1),o=v.bind(null,n,u,!0)}else e.sourceMap&&"function"==typeof URL&&"function"==typeof URL.createObjectURL&&"function"==typeof URL.revokeObjectURL&&"function"==typeof Blob&&"function"==typeof btoa?(n=function(e){var t=document.createElement("link");return void 0===e.attrs.type&&(e.attrs.type="text/css"),e.attrs.rel="stylesheet",m(t,e.attrs),p(e,t),t}(t),r=function(e,t,n){var r=n.css,o=n.sourceMap,a=void 0===t.convertToAbsoluteUrls&&o;(t.convertToAbsoluteUrls||a)&&(r=c(r));o&&(r+="\n/*# sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(o))))+" */");var i=new Blob([r],{type:"text/css"}),l=e.href;e.href=URL.createObjectURL(i),l&&URL.revokeObjectURL(l)}.bind(null,n,t),o=function(){d(n),n.href&&URL.revokeObjectURL(n.href)}):(n=h(t),r=function(e,t){var n=t.css,r=t.media;r&&e.setAttribute("media",r);if(e.styleSheet)e.styleSheet.cssText=n;else{for(;e.firstChild;)e.removeChild(e.firstChild);e.appendChild(document.createTextNode(n))}}.bind(null,n),o=function(){d(n)});return r(e),function(t){if(t){if(t.css===e.css&&t.media===e.media&&t.sourceMap===e.sourceMap)return;r(e=t)}else o()}}e.exports=function(e,t){if("undefined"!=typeof DEBUG&&DEBUG&&"object"!=typeof document)throw new Error("The style-loader cannot be used in a non-browser environment");(t=t||{}).attrs="object"==typeof t.attrs?t.attrs:{},t.singleton||"boolean"==typeof t.singleton||(t.singleton=o()),t.insertInto||(t.insertInto="head"),t.insertAt||(t.insertAt="bottom");var n=f(e,t);return s(n,t),function(e){for(var o=[],a=0;a=0&&u.splice(t,1)}function h(e){var t=document.createElement("style");return void 0===e.attrs.type&&(e.attrs.type="text/css"),m(t,e.attrs),p(e,t),t}function m(e,t){Object.keys(t).forEach(function(n){e.setAttribute(n,t[n])})}function g(e,t){var n,r,o,a;if(t.transform&&e.css){if(!(a=t.transform(e.css)))return function(){};e.css=a}if(t.singleton){var u=l++;n=i||(i=h(t)),r=v.bind(null,n,u,!1),o=v.bind(null,n,u,!0)}else e.sourceMap&&"function"==typeof URL&&"function"==typeof URL.createObjectURL&&"function"==typeof URL.revokeObjectURL&&"function"==typeof Blob&&"function"==typeof btoa?(n=function(e){var t=document.createElement("link");return void 0===e.attrs.type&&(e.attrs.type="text/css"),e.attrs.rel="stylesheet",m(t,e.attrs),p(e,t),t}(t),r=function(e,t,n){var r=n.css,o=n.sourceMap,a=void 0===t.convertToAbsoluteUrls&&o;(t.convertToAbsoluteUrls||a)&&(r=c(r));o&&(r+="\n/*# sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(o))))+" */");var i=new Blob([r],{type:"text/css"}),l=e.href;e.href=URL.createObjectURL(i),l&&URL.revokeObjectURL(l)}.bind(null,n,t),o=function(){d(n),n.href&&URL.revokeObjectURL(n.href)}):(n=h(t),r=function(e,t){var n=t.css,r=t.media;r&&e.setAttribute("media",r);if(e.styleSheet)e.styleSheet.cssText=n;else{for(;e.firstChild;)e.removeChild(e.firstChild);e.appendChild(document.createTextNode(n))}}.bind(null,n),o=function(){d(n)});return r(e),function(t){if(t){if(t.css===e.css&&t.media===e.media&&t.sourceMap===e.sourceMap)return;r(e=t)}else o()}}e.exports=function(e,t){if("undefined"!=typeof DEBUG&&DEBUG&&"object"!=typeof document)throw new Error("The style-loader cannot be used in a non-browser environment");(t=t||{}).attrs="object"==typeof t.attrs?t.attrs:{},t.singleton||"boolean"==typeof t.singleton||(t.singleton=o()),t.insertInto||(t.insertInto="head"),t.insertAt||(t.insertAt="bottom");var n=f(e,t);return s(n,t),function(e){for(var o=[],a=0;aI.length&&I.push(e)}function j(e,t,n,r){var o=typeof e;"undefined"!==o&&"boolean"!==o||(e=null);var a=!1;if(null===e)a=!0;else switch(o){case"string":case"number":a=!0;break;case"object":switch(e.$$typeof){case u:case c:a=!0}}if(a)return n(r,e,""===t?"."+D(e,0):t),1;if(a=0,t=""===t?".":t+":",Array.isArray(e))for(var i=0;iL.length&&L.push(e)}function _(e,t,n,r){var o=typeof e;"undefined"!==o&&"boolean"!==o||(e=null);var a=!1;if(null===e)a=!0;else switch(o){case"string":case"number":a=!0;break;case"object":switch(e.$$typeof){case u:case c:a=!0}}if(a)return n(r,e,""===t?"."+P(e,0):t),1;if(a=0,t=""===t?".":t+":",Array.isArray(e))for(var i=0;ithis.eventPool.length&&this.eventPool.push(e)}function de(e){e.eventPool=[],e.getPooled=fe,e.release=pe}i(se.prototype,{preventDefault:function(){this.defaultPrevented=!0;var e=this.nativeEvent;e&&(e.preventDefault?e.preventDefault():"unknown"!=typeof e.returnValue&&(e.returnValue=!1),this.isDefaultPrevented=l.thatReturnsTrue)},stopPropagation:function(){var e=this.nativeEvent;e&&(e.stopPropagation?e.stopPropagation():"unknown"!=typeof e.cancelBubble&&(e.cancelBubble=!0),this.isPropagationStopped=l.thatReturnsTrue)},persist:function(){this.isPersistent=l.thatReturnsTrue},isPersistent:l.thatReturnsFalse,destructor:function(){var e,t=this.constructor.Interface;for(e in t)this[e]=null;for(t=0;t=ve),xe=String.fromCharCode(32),Te={beforeInput:{phasedRegistrationNames:{bubbled:"onBeforeInput",captured:"onBeforeInputCapture"},dependencies:["topCompositionEnd","topKeyPress","topTextInput","topPaste"]},compositionEnd:{phasedRegistrationNames:{bubbled:"onCompositionEnd",captured:"onCompositionEndCapture"},dependencies:"topBlur topCompositionEnd topKeyDown topKeyPress topKeyUp topMouseDown".split(" ")},compositionStart:{phasedRegistrationNames:{bubbled:"onCompositionStart",captured:"onCompositionStartCapture"},dependencies:"topBlur topCompositionStart topKeyDown topKeyPress topKeyUp topMouseDown".split(" ")},compositionUpdate:{phasedRegistrationNames:{bubbled:"onCompositionUpdate",captured:"onCompositionUpdateCapture"},dependencies:"topBlur topCompositionUpdate topKeyDown topKeyPress topKeyUp topMouseDown".split(" ")}},Me=!1;function we(e,t){switch(e){case"topKeyUp":return-1!==ge.indexOf(t.keyCode);case"topKeyDown":return 229!==t.keyCode;case"topKeyPress":case"topMouseDown":case"topBlur":return!0;default:return!1}}function ke(e){return"object"==typeof(e=e.detail)&&"data"in e?e.data:null}var Se=!1;var Ee={eventTypes:Te,extractEvents:function(e,t,n,r){var o=void 0,a=void 0;if(ye)e:{switch(e){case"topCompositionStart":o=Te.compositionStart;break e;case"topCompositionEnd":o=Te.compositionEnd;break e;case"topCompositionUpdate":o=Te.compositionUpdate;break e}o=void 0}else Se?we(e,n)&&(o=Te.compositionEnd):"topKeyDown"===e&&229===n.keyCode&&(o=Te.compositionStart);return o?(Ce&&(Se||o!==Te.compositionStart?o===Te.compositionEnd&&Se&&(a=ie()):(ae._root=r,ae._startText=le(),Se=!0)),o=he.getPooled(o,t,n,r),a?o.data=a:null!==(a=ke(n))&&(o.data=a),ee(o),a=o):a=null,(e=be?function(e,t){switch(e){case"topCompositionEnd":return ke(t);case"topKeyPress":return 32!==t.which?null:(Me=!0,xe);case"topTextInput":return(e=t.data)===xe&&Me?null:e;default:return null}}(e,n):function(e,t){if(Se)return"topCompositionEnd"===e||!ye&&we(e,t)?(e=ie(),ae._root=null,ae._startText=null,ae._fallbackText=null,Se=!1,e):null;switch(e){case"topPaste":return null;case"topKeyPress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1