diff --git a/CODING_GUIDELINES.md b/CODING_GUIDELINES.md index bad2583ab..1014cae8e 100644 --- a/CODING_GUIDELINES.md +++ b/CODING_GUIDELINES.md @@ -188,7 +188,3 @@ Cosmos Explorer has been under constant development for over 5 years. As a resul ✅ DO - Support all [browsers supported by the Azure Portal](https://docs.microsoft.com/en-us/azure/azure-portal/azure-portal-supported-browsers-devices) -- Support IE11 - - In practice, this should not need to be considered as part of a normal development workflow - - Polyfills and transpilation are already provided by our engineering systems. - - This requirement will be removed on March 30th, 2021 when Azure drops IE11 support. diff --git a/package-lock.json b/package-lock.json index bea697655..9eba97ef4 100644 --- a/package-lock.json +++ b/package-lock.json @@ -37172,16 +37172,182 @@ } } }, - "@uifabric/variants": { - "version": "7.2.35", - "resolved": "https://registry.npmjs.org/@uifabric/variants/-/variants-7.2.35.tgz", - "integrity": "sha512-pK9n0QM3wYuE/f7scOhkW0jsSx1BPU6RePeuMJcoriCgK6zeN66p5ySwh+UhjuEtoGaSfVxeFve02hWNTfO8vg==", + "@uifabric/icons": { + "version": "7.5.23", + "resolved": "https://registry.npmjs.org/@uifabric/icons/-/icons-7.5.23.tgz", + "integrity": "sha512-eIvUbH0EWgFgdfgFfINgqS2ZVZTyJ/9n5nR4bmcyAe75wsKxm4ser4WIT9IvaBF6+HFVfjUF/v6+VMD7y2LBng==", "requires": { - "@fluentui/theme": "^1.7.4", "@uifabric/set-version": "^7.0.24", + "@uifabric/styling": "^7.19.0", "tslib": "^1.10.0" }, "dependencies": { + "@fluentui/theme": { + "version": "1.7.4", + "resolved": "https://registry.npmjs.org/@fluentui/theme/-/theme-1.7.4.tgz", + "integrity": "sha512-o4eo7lstLxxXl1g2RR9yz18Yt8yjQO/LbQuZjsiAfv/4Bf0CRnb+3j1F7gxIdBWAchKj9gzaMpIFijfI98pvYQ==", + "requires": { + "@uifabric/merge-styles": "^7.19.2", + "@uifabric/set-version": "^7.0.24", + "@uifabric/utilities": "^7.33.5", + "tslib": "^1.10.0" + } + }, + "@uifabric/styling": { + "version": "7.19.0", + "resolved": "https://registry.npmjs.org/@uifabric/styling/-/styling-7.19.0.tgz", + "integrity": "sha512-fXComDtGV7dHF4rP4cLHwI6fC+1f/nvPavpMBz4IQdySwixta9TVMKbzt0OA6i0mJztqZCVAd27F/sl9R/JmcQ==", + "requires": { + "@fluentui/theme": "^1.7.4", + "@microsoft/load-themed-styles": "^1.10.26", + "@uifabric/merge-styles": "^7.19.2", + "@uifabric/set-version": "^7.0.24", + "@uifabric/utilities": "^7.33.5", + "tslib": "^1.10.0" + } + }, + "@uifabric/utilities": { + "version": "7.33.5", + "resolved": "https://registry.npmjs.org/@uifabric/utilities/-/utilities-7.33.5.tgz", + "integrity": "sha512-I+Oi0deD/xltSluFY8l2EVd/J4mvOaMljxKO2knSD9/KoGDlo/o5GN4gbnVo8nIt76HWHLAk3KtlJKJm6BhbIQ==", + "requires": { + "@fluentui/dom-utilities": "^1.1.2", + "@uifabric/merge-styles": "^7.19.2", + "@uifabric/set-version": "^7.0.24", + "prop-types": "^15.7.2", + "tslib": "^1.10.0" + } + } + } + }, + "@uifabric/merge-styles": { + "version": "7.19.2", + "resolved": "https://registry.npmjs.org/@uifabric/merge-styles/-/merge-styles-7.19.2.tgz", + "integrity": "sha512-kTlhwglDqwVgIaJq+0yXgzi65plGhmFcPrfme/rXUGMJZoU+qlGT5jXj5d3kuI59p6VB8jWEg9DAxHozhYeu0g==", + "requires": { + "@uifabric/set-version": "^7.0.24", + "tslib": "^1.10.0" + } + }, + "@uifabric/react-cards": { + "version": "0.109.110", + "resolved": "https://registry.npmjs.org/@uifabric/react-cards/-/react-cards-0.109.110.tgz", + "integrity": "sha512-x/X0+u7uWr/fv98HxLzI9K0eC0LXnzGV4PjspnMqj48r7Bkbzm6qNorXxWQDeq9LPuhHCuf0DyHrIn+umvGG4Q==", + "requires": { + "@microsoft/load-themed-styles": "^1.10.26", + "@uifabric/azure-themes": "^7.1.37", + "@uifabric/file-type-icons": "^7.3.13", + "@uifabric/foundation": "^7.7.33", + "@uifabric/set-version": "^7.0.15", + "@uifabric/styling": "^7.13.7", + "@uifabric/theme-samples": "^7.0.102", + "@uifabric/utilities": "^7.23.0", + "office-ui-fabric-react": "^7.121.10", + "tslib": "^1.10.0" + }, + "dependencies": { + "@fluentui/theme": { + "version": "1.7.4", + "resolved": "https://registry.npmjs.org/@fluentui/theme/-/theme-1.7.4.tgz", + "integrity": "sha512-o4eo7lstLxxXl1g2RR9yz18Yt8yjQO/LbQuZjsiAfv/4Bf0CRnb+3j1F7gxIdBWAchKj9gzaMpIFijfI98pvYQ==", + "requires": { + "@uifabric/merge-styles": "^7.19.2", + "@uifabric/set-version": "^7.0.24", + "@uifabric/utilities": "^7.33.5", + "tslib": "^1.10.0" + } + }, + "@uifabric/file-type-icons": { + "version": "7.6.30", + "resolved": "https://registry.npmjs.org/@uifabric/file-type-icons/-/file-type-icons-7.6.30.tgz", + "integrity": "sha512-NpZ5kKFxmT60EvHzKSD9XpKYDLBCJDZw3ae3WhW4k2z67RKo5yOZ76hzN9y3UWW3E0qMw9r2+zFF7JukjQYHtw==", + "requires": { + "@uifabric/set-version": "^7.0.24", + "@uifabric/styling": "^7.19.0", + "tslib": "^1.10.0" + } + }, + "@uifabric/foundation": { + "version": "7.9.26", + "resolved": "https://registry.npmjs.org/@uifabric/foundation/-/foundation-7.9.26.tgz", + "integrity": "sha512-1FLTb+jlH/Tuel2L9wT/zLl5ZW6W4Lbjrs5VUVjv81vWxzznvPnTf8+Ew0qkzaH7xDuMNMl7okswhV0IfJyheg==", + "requires": { + "@uifabric/merge-styles": "^7.19.2", + "@uifabric/set-version": "^7.0.24", + "@uifabric/styling": "^7.19.0", + "@uifabric/utilities": "^7.33.5", + "tslib": "^1.10.0" + } + }, + "@uifabric/styling": { + "version": "7.19.0", + "resolved": "https://registry.npmjs.org/@uifabric/styling/-/styling-7.19.0.tgz", + "integrity": "sha512-fXComDtGV7dHF4rP4cLHwI6fC+1f/nvPavpMBz4IQdySwixta9TVMKbzt0OA6i0mJztqZCVAd27F/sl9R/JmcQ==", + "requires": { + "@fluentui/theme": "^1.7.4", + "@microsoft/load-themed-styles": "^1.10.26", + "@uifabric/merge-styles": "^7.19.2", + "@uifabric/set-version": "^7.0.24", + "@uifabric/utilities": "^7.33.5", + "tslib": "^1.10.0" + } + }, + "@uifabric/utilities": { + "version": "7.33.5", + "resolved": "https://registry.npmjs.org/@uifabric/utilities/-/utilities-7.33.5.tgz", + "integrity": "sha512-I+Oi0deD/xltSluFY8l2EVd/J4mvOaMljxKO2knSD9/KoGDlo/o5GN4gbnVo8nIt76HWHLAk3KtlJKJm6BhbIQ==", + "requires": { + "@fluentui/dom-utilities": "^1.1.2", + "@uifabric/merge-styles": "^7.19.2", + "@uifabric/set-version": "^7.0.24", + "prop-types": "^15.7.2", + "tslib": "^1.10.0" + } + } + } + }, + "@uifabric/set-version": { + "version": "7.0.24", + "resolved": "https://registry.npmjs.org/@uifabric/set-version/-/set-version-7.0.24.tgz", + "integrity": "sha512-t0Pt21dRqdC707/ConVJC0WvcQ/KF7tKLU8AZY7YdjgJpMHi1c0C427DB4jfUY19I92f60LOQyhJ4efH+KpFEg==", + "requires": { + "tslib": "^1.10.0" + } + }, + "@uifabric/theme-samples": { + "version": "7.2.34", + "resolved": "https://registry.npmjs.org/@uifabric/theme-samples/-/theme-samples-7.2.34.tgz", + "integrity": "sha512-olraurYMgXOA3ytPcm8oBcXj/eWZ04pAtpENkHQVujR6Ok4qqka1neVchTW7IBUgw+X+Rl/ampT7sqq77h2JYw==", + "requires": { + "@fluentui/theme": "^1.7.4", + "@uifabric/set-version": "^7.0.24", + "@uifabric/variants": "^7.2.35", + "office-ui-fabric-react": "^7.168.2", + "tslib": "^1.10.0" + }, + "dependencies": { + "@fluentui/react-focus": { + "version": "7.17.6", + "resolved": "https://registry.npmjs.org/@fluentui/react-focus/-/react-focus-7.17.6.tgz", + "integrity": "sha512-JkLWNDe567lhvbnIhbYv9nUWYDIVN06utc3krs0UZBI+A0YZtQmftBtY0ghXo4PSjgozZocdu9sYkkgZOgyRLg==", + "requires": { + "@fluentui/keyboard-key": "^0.2.12", + "@uifabric/merge-styles": "^7.19.2", + "@uifabric/set-version": "^7.0.24", + "@uifabric/styling": "^7.19.0", + "@uifabric/utilities": "^7.33.5", + "tslib": "^1.10.0" + } + }, + "@fluentui/react-window-provider": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/@fluentui/react-window-provider/-/react-window-provider-1.0.2.tgz", + "integrity": "sha512-fGSgL3Vp/+6t1Ysfz21FWZmqsU+iFVxOigvHnm5uKVyyRPwtaabv/F6kQ2y5isLMI2YmJaUd2i0cDJKu8ggrvw==", + "requires": { + "@uifabric/set-version": "^7.0.24", + "tslib": "^1.10.0" + } + }, "@fluentui/theme": { "version": "1.7.4", "resolved": "https://registry.npmjs.org/@fluentui/theme/-/theme-1.7.4.tgz", diff --git a/src/Explorer/Graph/GraphExplorerComponent/D3ForceGraph.ts b/src/Explorer/Graph/GraphExplorerComponent/D3ForceGraph.ts index 393e92b84..05825bf98 100644 --- a/src/Explorer/Graph/GraphExplorerComponent/D3ForceGraph.ts +++ b/src/Explorer/Graph/GraphExplorerComponent/D3ForceGraph.ts @@ -733,15 +733,16 @@ export class D3ForceGraph implements GraphRenderer { .attr("aria-label", (d: D3Node) => { return this.retrieveNodeCaption(d); }) - .on("dblclick", function (_: MouseEvent, d: D3Node) { + .on("dblclick", function (this: Element, _: MouseEvent, d: D3Node) { + // https://stackoverflow.com/a/41945742 ('this' implicitly has type 'any' because it does not have a type annotation) // this is the element self.onNodeClicked(this.parentNode, d); }) - .on("click", function (_: MouseEvent, d: D3Node) { + .on("click", function (this: Element, _: MouseEvent, d: D3Node) { // this is the element self.onNodeClicked(this.parentNode, d); }) - .on("keypress", function (event: KeyboardEvent, d: D3Node) { + .on("keypress", function (this: Element, event: KeyboardEvent, d: D3Node) { if (event.charCode === Constants.KeyCodes.Space || event.charCode === Constants.KeyCodes.Enter) { event.stopPropagation(); // this is the element diff --git a/src/Explorer/Panes/RightPaneForm/RightPaneForm.test.tsx b/src/Explorer/Panes/RightPaneForm/RightPaneForm.test.tsx index 3b8f5c022..11e80e546 100644 --- a/src/Explorer/Panes/RightPaneForm/RightPaneForm.test.tsx +++ b/src/Explorer/Panes/RightPaneForm/RightPaneForm.test.tsx @@ -22,7 +22,6 @@ describe("Load Query Pane", () => { wrapper = mount(); expect(wrapper).toMatchSnapshot(); }); - it("should call submit method enter in form", () => { render(); fireEvent.click(screen.getByTestId("submit")); diff --git a/src/Explorer/Panes/RightPaneForm/RightPaneForm.tsx b/src/Explorer/Panes/RightPaneForm/RightPaneForm.tsx index 774399b23..a244110a7 100644 --- a/src/Explorer/Panes/RightPaneForm/RightPaneForm.tsx +++ b/src/Explorer/Panes/RightPaneForm/RightPaneForm.tsx @@ -1,15 +1,30 @@ +<<<<<<< HEAD import React, { FunctionComponent, ReactNode } from "react"; import { PanelFooterComponent } from "../PanelFooterComponent"; import { PanelInfoErrorComponent, PanelInfoErrorProps } from "../PanelInfoErrorComponent"; import { PanelLoadingScreen } from "../PanelLoadingScreen"; +======= +import { IconButton } from "@fluentui/react"; +import React, { FunctionComponent, ReactNode } from "react"; +import { KeyCodes } from "../../../Common/Constants"; +>>>>>>> 487fbf207299bfd3b7d6404bf0307a8de29ac987 export interface RightPaneFormProps { expandConsole: () => void; formError: string; formErrorDetail: string; +<<<<<<< HEAD isExecuting: boolean; onSubmit: () => void; submitButtonText: string; +======= + id: string; + isExecuting: boolean; + onClose: () => void; + onSubmit: () => void; + submitButtonText: string; + title: string; +>>>>>>> 487fbf207299bfd3b7d6404bf0307a8de29ac987 isSubmitButtonHidden?: boolean; children?: ReactNode; } diff --git a/src/Explorer/Panes/__snapshots__/DeleteDatabaseConfirmationPanel.test.tsx.snap b/src/Explorer/Panes/__snapshots__/DeleteDatabaseConfirmationPanel.test.tsx.snap index 33994e3b1..d55fbdbfb 100644 --- a/src/Explorer/Panes/__snapshots__/DeleteDatabaseConfirmationPanel.test.tsx.snap +++ b/src/Explorer/Panes/__snapshots__/DeleteDatabaseConfirmationPanel.test.tsx.snap @@ -1288,7 +1288,7 @@ exports[`Delete Database Confirmation Pane submit() Should call delete database
>>>>>> 487fbf207299bfd3b7d6404bf0307a8de29ac987 >  @@ -1595,11 +1601,13 @@ exports[`Delete Database Confirmation Pane submit() Should call delete database Warning! The action you are about to take cannot be undone. Continuing will permanently delete this resource and all of its children resources. diff --git a/tsconfig.json b/tsconfig.json index a21625007..29814265e 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -3,6 +3,7 @@ "allowJs": true, "sourceMap": false, "noImplicitAny": true, + "noImplicitThis": true, "noImplicitReturns": true, "noFallthroughCasesInSwitch": true, "allowUnreachableCode": false, @@ -14,13 +15,24 @@ "target": "es2017", "experimentalDecorators": true, "emitDecoratorMetadata": true, - "lib": ["es5", "es6", "dom"], + "lib": [ + "es5", + "es6", + "dom" + ], "jsx": "react", "moduleResolution": "node", "resolveJsonModule": true, "noEmit": true, - "types": ["jest"] + "types": [ + "jest" + ] }, - "include": ["./src/**/*", "./utils/**/*"], - "exclude": ["./src/**/__mocks__/**/*"] -} + "include": [ + "./src/**/*", + "./utils/**/*" + ], + "exclude": [ + "./src/**/__mocks__/**/*" + ] +} \ No newline at end of file