diff --git a/apps/chart-docsite/.eslintrc.json b/apps/chart-docsite/.eslintrc.json index 45462ffe5954dc..a75719fd243047 100644 --- a/apps/chart-docsite/.eslintrc.json +++ b/apps/chart-docsite/.eslintrc.json @@ -4,7 +4,7 @@ "rules": { "@typescript-eslint/no-explicit-any": "off", "@typescript-eslint/jsx-no-bind": "off", - "deprecation/deprecation": "off", + "@typescript-eslint/no-deprecated": "off", "import/no-extraneous-dependencies": ["error", { "packageDir": [".", "../.."] }] } } diff --git a/apps/public-docsite-resources/.eslintrc.json b/apps/public-docsite-resources/.eslintrc.json index b9cc959897e9b2..9fc74280fa19bb 100644 --- a/apps/public-docsite-resources/.eslintrc.json +++ b/apps/public-docsite-resources/.eslintrc.json @@ -5,7 +5,7 @@ "@typescript-eslint/no-explicit-any": "off", "@typescript-eslint/explicit-member-accessibility": "off", "@typescript-eslint/member-ordering": "off", - "deprecation/deprecation": "off", - "no-restricted-globals": "off" + "no-restricted-globals": "off", + "@typescript-eslint/no-deprecated": "off" } } diff --git a/apps/public-docsite-v9/.eslintrc.json b/apps/public-docsite-v9/.eslintrc.json index 45462ffe5954dc..21b3d1e6a45479 100644 --- a/apps/public-docsite-v9/.eslintrc.json +++ b/apps/public-docsite-v9/.eslintrc.json @@ -4,7 +4,7 @@ "rules": { "@typescript-eslint/no-explicit-any": "off", "@typescript-eslint/jsx-no-bind": "off", - "deprecation/deprecation": "off", - "import/no-extraneous-dependencies": ["error", { "packageDir": [".", "../.."] }] + "import/no-extraneous-dependencies": ["error", { "packageDir": [".", "../.."] }], + "@typescript-eslint/no-deprecated": "off" } } diff --git a/apps/public-docsite-v9/src/Concepts/Theming.stories.mdx b/apps/public-docsite-v9/src/Concepts/Theming.stories.mdx index c79f39c86363bf..aae124ac7f8146 100644 --- a/apps/public-docsite-v9/src/Concepts/Theming.stories.mdx +++ b/apps/public-docsite-v9/src/Concepts/Theming.stories.mdx @@ -22,7 +22,7 @@ No matter what theme is used, the component styles are always the same. The only Those tokens are resolved to CSS variables. The `FluentProvider` component is responsible for setting the values of the CSS variables in DOM and changing them when the theme changes. When the theme is switched, only the variables are changed, all styles remain the same. -Place a `` at the root of your app and pass a theme to the `theme` prop. The provider will render a `div` and set all tokens as CSS variables on that element. The provider also propagates CCS variables to React portals created with [Portal component](?path=/docs/components-portal--default). +Place a `` at the root of your app and pass a theme to the `theme` prop. The provider will render a `div` and set all tokens as CSS variables on that element. The provider also propagates CSS variables to React portals created with [Portal component](?path=/docs/components-portal--default). ```jsx import { FluentProvider, teamsLightTheme } from '@fluentui/react-components'; diff --git a/apps/public-docsite/.eslintrc.json b/apps/public-docsite/.eslintrc.json index 4a1010d7c11d98..6a0ccc21bb36a8 100644 --- a/apps/public-docsite/.eslintrc.json +++ b/apps/public-docsite/.eslintrc.json @@ -3,10 +3,10 @@ "root": true, "rules": { "@typescript-eslint/no-explicit-any": "off", - "deprecation/deprecation": "off", "import/no-webpack-loader-syntax": "off", // ok in this project "prefer-const": "off", "react/jsx-no-bind": "off", - "no-restricted-globals": "off" + "no-restricted-globals": "off", + "@typescript-eslint/no-deprecated": "off" } } diff --git a/apps/theming-designer/.eslintrc.json b/apps/theming-designer/.eslintrc.json index 0d9ca4c10f823d..5ad87795c4a5b2 100644 --- a/apps/theming-designer/.eslintrc.json +++ b/apps/theming-designer/.eslintrc.json @@ -3,8 +3,8 @@ "root": true, "rules": { "@typescript-eslint/no-explicit-any": "off", - "deprecation/deprecation": "off", "prefer-const": "off", - "no-restricted-globals": "off" + "no-restricted-globals": "off", + "@typescript-eslint/no-deprecated": "off" } } diff --git a/apps/vr-tests-react-components/.eslintrc.json b/apps/vr-tests-react-components/.eslintrc.json index 3301180702eb44..deda75964dbfd1 100644 --- a/apps/vr-tests-react-components/.eslintrc.json +++ b/apps/vr-tests-react-components/.eslintrc.json @@ -7,8 +7,8 @@ "@typescript-eslint/no-explicit-any": "off", "@typescript-eslint/naming-convention": "off", "@typescript-eslint/jsx-no-bind": "off", - "deprecation/deprecation": "off", "import/no-extraneous-dependencies": ["error", { "packageDir": [".", "../.."] }], - "@nx/workspace-no-restricted-globals": "off" + "@nx/workspace-no-restricted-globals": "off", + "@typescript-eslint/no-deprecated": "off" } } diff --git a/apps/vr-tests/.eslintrc.json b/apps/vr-tests/.eslintrc.json index 54ac641d7b3bfc..5f50754feeb77e 100644 --- a/apps/vr-tests/.eslintrc.json +++ b/apps/vr-tests/.eslintrc.json @@ -4,8 +4,8 @@ "rules": { "@typescript-eslint/no-explicit-any": "off", "@typescript-eslint/jsx-no-bind": "off", - "deprecation/deprecation": "off", "import/no-extraneous-dependencies": ["error", { "packageDir": [".", "../.."] }], - "no-restricted-globals": "off" + "no-restricted-globals": "off", + "@typescript-eslint/no-deprecated": "off" } } diff --git a/change/@fluentui-chart-web-components-cfdeb418-e440-4904-9a73-4b8291c7c99d.json b/change/@fluentui-chart-web-components-cfdeb418-e440-4904-9a73-4b8291c7c99d.json deleted file mode 100644 index cad856081e15fb..00000000000000 --- a/change/@fluentui-chart-web-components-cfdeb418-e440-4904-9a73-4b8291c7c99d.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "type": "none", - "comment": "chore: sync failed release pipeline with git", - "packageName": "@fluentui/chart-web-components", - "email": "martinhochel@microsoft.com", - "dependentChangeType": "none" -} diff --git a/change/@fluentui-codemods-af108562-5adb-43f5-b0f2-06358f95ab65.json b/change/@fluentui-codemods-af108562-5adb-43f5-b0f2-06358f95ab65.json new file mode 100644 index 00000000000000..e59c56d1811400 --- /dev/null +++ b/change/@fluentui-codemods-af108562-5adb-43f5-b0f2-06358f95ab65.json @@ -0,0 +1,7 @@ +{ + "type": "none", + "comment": "chore: migrate from deprecation plugin to ts-eslint/no-deprecated rule", + "packageName": "@fluentui/codemods", + "email": "vgenaev@gmail.com", + "dependentChangeType": "none" +} diff --git a/change/@fluentui-eslint-plugin-fa5bccc0-99d9-46ae-8cc6-5fbdd18360cb.json b/change/@fluentui-eslint-plugin-fa5bccc0-99d9-46ae-8cc6-5fbdd18360cb.json new file mode 100644 index 00000000000000..ddfba557f6a9a4 --- /dev/null +++ b/change/@fluentui-eslint-plugin-fa5bccc0-99d9-46ae-8cc6-5fbdd18360cb.json @@ -0,0 +1,7 @@ +{ + "type": "patch", + "comment": "chore: migrate from deprecation plugin to ts-eslint/no-deprecated rule", + "packageName": "@fluentui/eslint-plugin", + "email": "vgenaev@gmail.com", + "dependentChangeType": "none" +} diff --git a/change/@fluentui-font-icons-mdl2-db6b5e91-90e1-4d29-8a79-ac0f0c0ee232.json b/change/@fluentui-font-icons-mdl2-db6b5e91-90e1-4d29-8a79-ac0f0c0ee232.json new file mode 100644 index 00000000000000..6ac801eaac0088 --- /dev/null +++ b/change/@fluentui-font-icons-mdl2-db6b5e91-90e1-4d29-8a79-ac0f0c0ee232.json @@ -0,0 +1,7 @@ +{ + "type": "none", + "comment": "chore: migrate from deprecation plugin to ts-eslint/no-deprecated rule", + "packageName": "@fluentui/font-icons-mdl2", + "email": "vgenaev@gmail.com", + "dependentChangeType": "none" +} diff --git a/change/@fluentui-foundation-legacy-05901292-a3b8-4d34-834a-8f5d74736e99.json b/change/@fluentui-foundation-legacy-05901292-a3b8-4d34-834a-8f5d74736e99.json new file mode 100644 index 00000000000000..b7ada786f9ef0a --- /dev/null +++ b/change/@fluentui-foundation-legacy-05901292-a3b8-4d34-834a-8f5d74736e99.json @@ -0,0 +1,7 @@ +{ + "type": "none", + "comment": "chore: migrate from deprecation plugin to ts-eslint/no-deprecated rule", + "packageName": "@fluentui/foundation-legacy", + "email": "vgenaev@gmail.com", + "dependentChangeType": "none" +} diff --git a/change/@fluentui-keyboard-key-def9b0a9-f2af-4ae3-aaaf-210eb1cc7663.json b/change/@fluentui-keyboard-key-def9b0a9-f2af-4ae3-aaaf-210eb1cc7663.json new file mode 100644 index 00000000000000..34089c5205b9cf --- /dev/null +++ b/change/@fluentui-keyboard-key-def9b0a9-f2af-4ae3-aaaf-210eb1cc7663.json @@ -0,0 +1,7 @@ +{ + "type": "none", + "comment": "chore: migrate from deprecation plugin to ts-eslint/no-deprecated rule", + "packageName": "@fluentui/keyboard-key", + "email": "vgenaev@gmail.com", + "dependentChangeType": "none" +} diff --git a/change/@fluentui-merge-styles-f28e7eb2-d3a4-4060-95af-0c74756f900d.json b/change/@fluentui-merge-styles-f28e7eb2-d3a4-4060-95af-0c74756f900d.json new file mode 100644 index 00000000000000..252227e0745e4d --- /dev/null +++ b/change/@fluentui-merge-styles-f28e7eb2-d3a4-4060-95af-0c74756f900d.json @@ -0,0 +1,7 @@ +{ + "type": "none", + "comment": "chore: migrate from deprecation plugin to ts-eslint/no-deprecated rule", + "packageName": "@fluentui/merge-styles", + "email": "vgenaev@gmail.com", + "dependentChangeType": "none" +} diff --git a/change/@fluentui-react-8e31bacb-5949-4ddf-a561-b2e8eb9365b9.json b/change/@fluentui-react-8e31bacb-5949-4ddf-a561-b2e8eb9365b9.json new file mode 100644 index 00000000000000..31063dd50b8723 --- /dev/null +++ b/change/@fluentui-react-8e31bacb-5949-4ddf-a561-b2e8eb9365b9.json @@ -0,0 +1,7 @@ +{ + "type": "none", + "comment": "chore: migrate from deprecation plugin to ts-eslint/no-deprecated rule", + "packageName": "@fluentui/react", + "email": "vgenaev@gmail.com", + "dependentChangeType": "none" +} diff --git a/change/@fluentui-react-accordion-b082df99-c014-4ba8-8523-fdc134b25bcb.json b/change/@fluentui-react-accordion-b082df99-c014-4ba8-8523-fdc134b25bcb.json new file mode 100644 index 00000000000000..ae55ba19bba18f --- /dev/null +++ b/change/@fluentui-react-accordion-b082df99-c014-4ba8-8523-fdc134b25bcb.json @@ -0,0 +1,7 @@ +{ + "type": "none", + "comment": "chore: migrate from deprecation plugin to ts-eslint/no-deprecated rule", + "packageName": "@fluentui/react-accordion", + "email": "vgenaev@gmail.com", + "dependentChangeType": "none" +} diff --git a/change/@fluentui-react-aeee29c3-70b1-47de-a1a6-ee1ec2c0597d.json b/change/@fluentui-react-aeee29c3-70b1-47de-a1a6-ee1ec2c0597d.json deleted file mode 100644 index a14b5ba95b418d..00000000000000 --- a/change/@fluentui-react-aeee29c3-70b1-47de-a1a6-ee1ec2c0597d.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "type": "patch", - "comment": "add missing data-id attribute to close button in TagItem", - "packageName": "@fluentui/react", - "email": "kmatejka@microsoft.com", - "dependentChangeType": "patch" -} diff --git a/change/@fluentui-react-aria-ece4e8b8-ef6f-487c-a209-1a55c9dc6bfb.json b/change/@fluentui-react-aria-ece4e8b8-ef6f-487c-a209-1a55c9dc6bfb.json new file mode 100644 index 00000000000000..dc9f1971ad978a --- /dev/null +++ b/change/@fluentui-react-aria-ece4e8b8-ef6f-487c-a209-1a55c9dc6bfb.json @@ -0,0 +1,7 @@ +{ + "type": "none", + "comment": "chore: migrate from deprecation plugin to ts-eslint/no-deprecated rule", + "packageName": "@fluentui/react-aria", + "email": "vgenaev@gmail.com", + "dependentChangeType": "none" +} diff --git a/change/@fluentui-react-avatar-9cab8d3a-1bcd-4c03-8138-82520de36649.json b/change/@fluentui-react-avatar-9cab8d3a-1bcd-4c03-8138-82520de36649.json new file mode 100644 index 00000000000000..9d3bbebf5cb5e1 --- /dev/null +++ b/change/@fluentui-react-avatar-9cab8d3a-1bcd-4c03-8138-82520de36649.json @@ -0,0 +1,7 @@ +{ + "type": "none", + "comment": "chore: migrate from deprecation plugin to ts-eslint/no-deprecated rule", + "packageName": "@fluentui/react-avatar", + "email": "vgenaev@gmail.com", + "dependentChangeType": "none" +} diff --git a/change/@fluentui-react-charting-34dd50d3-d7cd-4354-9e9b-b8eeb44d4e19.json b/change/@fluentui-react-charting-34dd50d3-d7cd-4354-9e9b-b8eeb44d4e19.json new file mode 100644 index 00000000000000..c5392850b45987 --- /dev/null +++ b/change/@fluentui-react-charting-34dd50d3-d7cd-4354-9e9b-b8eeb44d4e19.json @@ -0,0 +1,7 @@ +{ + "type": "patch", + "comment": "Support tozeroy mode for Area Charts", + "packageName": "@fluentui/react-charting", + "email": "120183316+srmukher@users.noreply.github.com", + "dependentChangeType": "patch" +} diff --git a/change/@fluentui-react-charting-4aabb452-e7e3-47e3-9964-7a7c4814e759.json b/change/@fluentui-react-charting-4aabb452-e7e3-47e3-9964-7a7c4814e759.json new file mode 100644 index 00000000000000..157b74502e849c --- /dev/null +++ b/change/@fluentui-react-charting-4aabb452-e7e3-47e3-9964-7a7c4814e759.json @@ -0,0 +1,7 @@ +{ + "type": "patch", + "comment": "Declarative chart bug fixes", + "packageName": "@fluentui/react-charting", + "email": "74965306+Anush2303@users.noreply.github.com", + "dependentChangeType": "patch" +} diff --git a/change/@fluentui-react-charting-aa5b0252-40de-497c-88f5-377ada948719.json b/change/@fluentui-react-charting-aa5b0252-40de-497c-88f5-377ada948719.json new file mode 100644 index 00000000000000..cb303b57fb9e0b --- /dev/null +++ b/change/@fluentui-react-charting-aa5b0252-40de-497c-88f5-377ada948719.json @@ -0,0 +1,7 @@ +{ + "type": "none", + "comment": "chore: migrate from deprecation plugin to ts-eslint/no-deprecated rule", + "packageName": "@fluentui/react-charting", + "email": "vgenaev@gmail.com", + "dependentChangeType": "none" +} diff --git a/change/@fluentui-react-color-picker-preview-1411f212-27ea-4335-bcd3-b210359b0bd1.json b/change/@fluentui-react-color-picker-preview-1411f212-27ea-4335-bcd3-b210359b0bd1.json new file mode 100644 index 00000000000000..6e323e0af85625 --- /dev/null +++ b/change/@fluentui-react-color-picker-preview-1411f212-27ea-4335-bcd3-b210359b0bd1.json @@ -0,0 +1,7 @@ +{ + "type": "none", + "comment": "chore: migrate from deprecation plugin to ts-eslint/no-deprecated rule", + "packageName": "@fluentui/react-color-picker-preview", + "email": "vgenaev@gmail.com", + "dependentChangeType": "none" +} diff --git a/change/@fluentui-react-combobox-6b28f16b-50a6-4ea3-8afc-d21e6b99bc5e.json b/change/@fluentui-react-combobox-6b28f16b-50a6-4ea3-8afc-d21e6b99bc5e.json new file mode 100644 index 00000000000000..793132b08fa9f9 --- /dev/null +++ b/change/@fluentui-react-combobox-6b28f16b-50a6-4ea3-8afc-d21e6b99bc5e.json @@ -0,0 +1,7 @@ +{ + "type": "none", + "comment": "chore: migrate from deprecation plugin to ts-eslint/no-deprecated rule", + "packageName": "@fluentui/react-combobox", + "email": "vgenaev@gmail.com", + "dependentChangeType": "none" +} diff --git a/change/@fluentui-react-components-8e070f58-09e6-4a66-bd63-bbd13b27db88.json b/change/@fluentui-react-components-8e070f58-09e6-4a66-bd63-bbd13b27db88.json new file mode 100644 index 00000000000000..ddc6a6c41d1080 --- /dev/null +++ b/change/@fluentui-react-components-8e070f58-09e6-4a66-bd63-bbd13b27db88.json @@ -0,0 +1,7 @@ +{ + "type": "minor", + "comment": "feature: TreeRootReset component", + "packageName": "@fluentui/react-components", + "email": "bernardo.sunderhus@gmail.com", + "dependentChangeType": "patch" +} diff --git a/change/@fluentui-react-components-a1ed2f9c-dd8c-4d5c-82ae-295a90a26772.json b/change/@fluentui-react-components-a1ed2f9c-dd8c-4d5c-82ae-295a90a26772.json new file mode 100644 index 00000000000000..6c9209a8e0effa --- /dev/null +++ b/change/@fluentui-react-components-a1ed2f9c-dd8c-4d5c-82ae-295a90a26772.json @@ -0,0 +1,7 @@ +{ + "type": "none", + "comment": "chore: migrate from deprecation plugin to ts-eslint/no-deprecated rule", + "packageName": "@fluentui/react-components", + "email": "vgenaev@gmail.com", + "dependentChangeType": "none" +} diff --git a/change/@fluentui-react-conformance-4944bee5-948a-4649-87a1-8362f68d4635.json b/change/@fluentui-react-conformance-4944bee5-948a-4649-87a1-8362f68d4635.json new file mode 100644 index 00000000000000..58fe9ad666bf04 --- /dev/null +++ b/change/@fluentui-react-conformance-4944bee5-948a-4649-87a1-8362f68d4635.json @@ -0,0 +1,7 @@ +{ + "type": "none", + "comment": "chore: migrate from deprecation plugin to ts-eslint/no-deprecated rule", + "packageName": "@fluentui/react-conformance", + "email": "vgenaev@gmail.com", + "dependentChangeType": "none" +} diff --git a/change/@fluentui-react-date-time-14e136f0-eeb5-4113-8921-e732772e0a04.json b/change/@fluentui-react-date-time-14e136f0-eeb5-4113-8921-e732772e0a04.json new file mode 100644 index 00000000000000..62abe8ca9a7ab9 --- /dev/null +++ b/change/@fluentui-react-date-time-14e136f0-eeb5-4113-8921-e732772e0a04.json @@ -0,0 +1,7 @@ +{ + "type": "none", + "comment": "chore: migrate from deprecation plugin to ts-eslint/no-deprecated rule", + "packageName": "@fluentui/react-date-time", + "email": "vgenaev@gmail.com", + "dependentChangeType": "none" +} diff --git a/change/@fluentui-react-experiments-4f3c4b24-6a77-45ac-b7f8-fb04d982fd7b.json b/change/@fluentui-react-experiments-4f3c4b24-6a77-45ac-b7f8-fb04d982fd7b.json new file mode 100644 index 00000000000000..74c5f58ffe8cf0 --- /dev/null +++ b/change/@fluentui-react-experiments-4f3c4b24-6a77-45ac-b7f8-fb04d982fd7b.json @@ -0,0 +1,7 @@ +{ + "type": "none", + "comment": "chore: migrate from deprecation plugin to ts-eslint/no-deprecated rule", + "packageName": "@fluentui/react-experiments", + "email": "vgenaev@gmail.com", + "dependentChangeType": "none" +} diff --git a/change/@fluentui-react-focus-5e8ead15-c118-4dec-84e8-744d6bf63fcb.json b/change/@fluentui-react-focus-5e8ead15-c118-4dec-84e8-744d6bf63fcb.json new file mode 100644 index 00000000000000..2961f1f4a9d0ae --- /dev/null +++ b/change/@fluentui-react-focus-5e8ead15-c118-4dec-84e8-744d6bf63fcb.json @@ -0,0 +1,7 @@ +{ + "type": "none", + "comment": "chore: migrate from deprecation plugin to ts-eslint/no-deprecated rule", + "packageName": "@fluentui/react-focus", + "email": "vgenaev@gmail.com", + "dependentChangeType": "none" +} diff --git a/change/@fluentui-react-icons-compat-d79ea04c-0316-4c1e-9c1e-96710298947a.json b/change/@fluentui-react-icons-compat-d79ea04c-0316-4c1e-9c1e-96710298947a.json new file mode 100644 index 00000000000000..3fb672d36efa9b --- /dev/null +++ b/change/@fluentui-react-icons-compat-d79ea04c-0316-4c1e-9c1e-96710298947a.json @@ -0,0 +1,7 @@ +{ + "type": "none", + "comment": "chore: migrate from deprecation plugin to ts-eslint/no-deprecated rule", + "packageName": "@fluentui/react-icons-compat", + "email": "vgenaev@gmail.com", + "dependentChangeType": "none" +} diff --git a/change/@fluentui-react-link-3fcc87af-d93e-43d3-8c48-d38b192fd9ac.json b/change/@fluentui-react-link-3fcc87af-d93e-43d3-8c48-d38b192fd9ac.json new file mode 100644 index 00000000000000..c77906f88a7d1f --- /dev/null +++ b/change/@fluentui-react-link-3fcc87af-d93e-43d3-8c48-d38b192fd9ac.json @@ -0,0 +1,7 @@ +{ + "type": "patch", + "comment": "fix: support Enter and Space interaction, if rendered as span", + "packageName": "@fluentui/react-link", + "email": "vgenaev@gmail.com", + "dependentChangeType": "patch" +} diff --git a/change/@fluentui-react-menu-51e8bb80-2224-47a8-8a42-282214bcee42.json b/change/@fluentui-react-menu-51e8bb80-2224-47a8-8a42-282214bcee42.json new file mode 100644 index 00000000000000..369c63a243bb20 --- /dev/null +++ b/change/@fluentui-react-menu-51e8bb80-2224-47a8-8a42-282214bcee42.json @@ -0,0 +1,7 @@ +{ + "type": "none", + "comment": "chore: migrate from deprecation plugin to ts-eslint/no-deprecated rule", + "packageName": "@fluentui/react-menu", + "email": "vgenaev@gmail.com", + "dependentChangeType": "none" +} diff --git a/change/@fluentui-react-message-bar-045b67fd-ae48-4ed9-abbd-669235409ead.json b/change/@fluentui-react-message-bar-045b67fd-ae48-4ed9-abbd-669235409ead.json new file mode 100644 index 00000000000000..f62fce2bae66b0 --- /dev/null +++ b/change/@fluentui-react-message-bar-045b67fd-ae48-4ed9-abbd-669235409ead.json @@ -0,0 +1,7 @@ +{ + "type": "none", + "comment": "chore: migrate from deprecation plugin to ts-eslint/no-deprecated rule", + "packageName": "@fluentui/react-message-bar", + "email": "vgenaev@gmail.com", + "dependentChangeType": "none" +} diff --git a/change/@fluentui-react-monaco-editor-946876fa-b8f4-4e15-bf15-54f86a508654.json b/change/@fluentui-react-monaco-editor-946876fa-b8f4-4e15-bf15-54f86a508654.json new file mode 100644 index 00000000000000..cce342d863249c --- /dev/null +++ b/change/@fluentui-react-monaco-editor-946876fa-b8f4-4e15-bf15-54f86a508654.json @@ -0,0 +1,7 @@ +{ + "type": "none", + "comment": "chore: migrate from deprecation plugin to ts-eslint/no-deprecated rule", + "packageName": "@fluentui/react-monaco-editor", + "email": "vgenaev@gmail.com", + "dependentChangeType": "none" +} diff --git a/change/@fluentui-react-motion-32b72aa4-8d6a-42e7-8adc-3d0eb8162c7a.json b/change/@fluentui-react-motion-32b72aa4-8d6a-42e7-8adc-3d0eb8162c7a.json new file mode 100644 index 00000000000000..57cfdd1c1b62b2 --- /dev/null +++ b/change/@fluentui-react-motion-32b72aa4-8d6a-42e7-8adc-3d0eb8162c7a.json @@ -0,0 +1,7 @@ +{ + "type": "none", + "comment": "chore: migrate from deprecation plugin to ts-eslint/no-deprecated rule", + "packageName": "@fluentui/react-motion", + "email": "vgenaev@gmail.com", + "dependentChangeType": "none" +} diff --git a/change/@fluentui-react-motion-components-preview-67537ce1-b461-4bec-bbcb-61d9202e6632.json b/change/@fluentui-react-motion-components-preview-67537ce1-b461-4bec-bbcb-61d9202e6632.json new file mode 100644 index 00000000000000..970d564c51cda6 --- /dev/null +++ b/change/@fluentui-react-motion-components-preview-67537ce1-b461-4bec-bbcb-61d9202e6632.json @@ -0,0 +1,7 @@ +{ + "type": "patch", + "comment": "refactor(Collapse): streamline motion atom functions", + "packageName": "@fluentui/react-motion-components-preview", + "email": "robertpenner@microsoft.com", + "dependentChangeType": "patch" +} diff --git a/change/@fluentui-react-motion-components-preview-7795f18a-df86-480a-8546-efca47ef6069.json b/change/@fluentui-react-motion-components-preview-7795f18a-df86-480a-8546-efca47ef6069.json new file mode 100644 index 00000000000000..36a3d3b7e344cc --- /dev/null +++ b/change/@fluentui-react-motion-components-preview-7795f18a-df86-480a-8546-efca47ef6069.json @@ -0,0 +1,7 @@ +{ + "type": "none", + "comment": "chore: migrate from deprecation plugin to ts-eslint/no-deprecated rule", + "packageName": "@fluentui/react-motion-components-preview", + "email": "vgenaev@gmail.com", + "dependentChangeType": "none" +} diff --git a/change/@fluentui-react-popover-02147114-2b1f-427d-a369-c495dcc060f7.json b/change/@fluentui-react-popover-02147114-2b1f-427d-a369-c495dcc060f7.json new file mode 100644 index 00000000000000..7c818960694aea --- /dev/null +++ b/change/@fluentui-react-popover-02147114-2b1f-427d-a369-c495dcc060f7.json @@ -0,0 +1,7 @@ +{ + "type": "none", + "comment": "chore: migrate from deprecation plugin to ts-eslint/no-deprecated rule", + "packageName": "@fluentui/react-popover", + "email": "vgenaev@gmail.com", + "dependentChangeType": "none" +} diff --git a/change/@fluentui-react-positioning-7ff1890e-77cb-4078-be01-2673bb29a80b.json b/change/@fluentui-react-positioning-7ff1890e-77cb-4078-be01-2673bb29a80b.json new file mode 100644 index 00000000000000..fa917f363eb6e0 --- /dev/null +++ b/change/@fluentui-react-positioning-7ff1890e-77cb-4078-be01-2673bb29a80b.json @@ -0,0 +1,7 @@ +{ + "type": "none", + "comment": "chore: migrate from deprecation plugin to ts-eslint/no-deprecated rule", + "packageName": "@fluentui/react-positioning", + "email": "vgenaev@gmail.com", + "dependentChangeType": "none" +} diff --git a/change/@fluentui-react-radio-59106324-2e52-43e5-b407-87f41706faa5.json b/change/@fluentui-react-radio-59106324-2e52-43e5-b407-87f41706faa5.json new file mode 100644 index 00000000000000..85b8c6c078c718 --- /dev/null +++ b/change/@fluentui-react-radio-59106324-2e52-43e5-b407-87f41706faa5.json @@ -0,0 +1,7 @@ +{ + "type": "none", + "comment": "chore: migrate from deprecation plugin to ts-eslint/no-deprecated rule", + "packageName": "@fluentui/react-radio", + "email": "vgenaev@gmail.com", + "dependentChangeType": "none" +} diff --git a/change/@fluentui-react-switch-eef105b5-30ee-4c92-bac3-3eb2f1db9980.json b/change/@fluentui-react-switch-eef105b5-30ee-4c92-bac3-3eb2f1db9980.json new file mode 100644 index 00000000000000..e6327946c49fac --- /dev/null +++ b/change/@fluentui-react-switch-eef105b5-30ee-4c92-bac3-3eb2f1db9980.json @@ -0,0 +1,7 @@ +{ + "type": "none", + "comment": "chore: migrate from deprecation plugin to ts-eslint/no-deprecated rule", + "packageName": "@fluentui/react-switch", + "email": "vgenaev@gmail.com", + "dependentChangeType": "none" +} diff --git a/change/@fluentui-react-table-041ffd34-f086-4af7-a72a-66dbbd56617b.json b/change/@fluentui-react-table-041ffd34-f086-4af7-a72a-66dbbd56617b.json new file mode 100644 index 00000000000000..9855003d9f9cca --- /dev/null +++ b/change/@fluentui-react-table-041ffd34-f086-4af7-a72a-66dbbd56617b.json @@ -0,0 +1,7 @@ +{ + "type": "none", + "comment": "chore: migrate from deprecation plugin to ts-eslint/no-deprecated rule", + "packageName": "@fluentui/react-table", + "email": "vgenaev@gmail.com", + "dependentChangeType": "none" +} diff --git a/change/@fluentui-react-tabs-c489edef-c7ee-4bf0-8f32-8565edccb381.json b/change/@fluentui-react-tabs-c489edef-c7ee-4bf0-8f32-8565edccb381.json new file mode 100644 index 00000000000000..add9f9f3024781 --- /dev/null +++ b/change/@fluentui-react-tabs-c489edef-c7ee-4bf0-8f32-8565edccb381.json @@ -0,0 +1,7 @@ +{ + "type": "none", + "comment": "chore: migrate from deprecation plugin to ts-eslint/no-deprecated rule", + "packageName": "@fluentui/react-tabs", + "email": "vgenaev@gmail.com", + "dependentChangeType": "none" +} diff --git a/change/@fluentui-react-tabster-a4a177a3-0514-4657-9fdd-a0e90d44e813.json b/change/@fluentui-react-tabster-a4a177a3-0514-4657-9fdd-a0e90d44e813.json new file mode 100644 index 00000000000000..8e5d56c1248819 --- /dev/null +++ b/change/@fluentui-react-tabster-a4a177a3-0514-4657-9fdd-a0e90d44e813.json @@ -0,0 +1,7 @@ +{ + "type": "none", + "comment": "chore: migrate from deprecation plugin to ts-eslint/no-deprecated rule", + "packageName": "@fluentui/react-tabster", + "email": "vgenaev@gmail.com", + "dependentChangeType": "none" +} diff --git a/change/@fluentui-react-tooltip-058754b5-d9ec-459a-acc5-ba9ff587c4e3.json b/change/@fluentui-react-tooltip-058754b5-d9ec-459a-acc5-ba9ff587c4e3.json new file mode 100644 index 00000000000000..c1ea720b6a9e45 --- /dev/null +++ b/change/@fluentui-react-tooltip-058754b5-d9ec-459a-acc5-ba9ff587c4e3.json @@ -0,0 +1,7 @@ +{ + "type": "none", + "comment": "chore: migrate from deprecation plugin to ts-eslint/no-deprecated rule", + "packageName": "@fluentui/react-tooltip", + "email": "vgenaev@gmail.com", + "dependentChangeType": "none" +} diff --git a/change/@fluentui-react-tooltip-4088de96-b20d-4c18-9567-9987be622dbf.json b/change/@fluentui-react-tooltip-4088de96-b20d-4c18-9567-9987be622dbf.json new file mode 100644 index 00000000000000..d8e0b5362d896c --- /dev/null +++ b/change/@fluentui-react-tooltip-4088de96-b20d-4c18-9567-9987be622dbf.json @@ -0,0 +1,7 @@ +{ + "type": "patch", + "comment": "fix: wrong call of useIsNavigatingWithKeyboard", + "packageName": "@fluentui/react-tooltip", + "email": "viktorgenaev@microsoft.com", + "dependentChangeType": "patch" +} diff --git a/change/@fluentui-react-tree-287da350-699b-410f-bd97-7cb590731302.json b/change/@fluentui-react-tree-287da350-699b-410f-bd97-7cb590731302.json new file mode 100644 index 00000000000000..712df07693df6e --- /dev/null +++ b/change/@fluentui-react-tree-287da350-699b-410f-bd97-7cb590731302.json @@ -0,0 +1,7 @@ +{ + "type": "none", + "comment": "chore: migrate from deprecation plugin to ts-eslint/no-deprecated rule", + "packageName": "@fluentui/react-tree", + "email": "vgenaev@gmail.com", + "dependentChangeType": "none" +} diff --git a/change/@fluentui-react-tree-b452026f-0282-4a88-a922-34c2a983c77c.json b/change/@fluentui-react-tree-b452026f-0282-4a88-a922-34c2a983c77c.json new file mode 100644 index 00000000000000..7e09b55e865d5d --- /dev/null +++ b/change/@fluentui-react-tree-b452026f-0282-4a88-a922-34c2a983c77c.json @@ -0,0 +1,7 @@ +{ + "type": "minor", + "comment": "feature: TreeRootReset component", + "packageName": "@fluentui/react-tree", + "email": "bernardo.sunderhus@gmail.com", + "dependentChangeType": "patch" +} diff --git a/change/@fluentui-react-utilities-82544042-02b6-4262-91cd-e7f9fe24bad2.json b/change/@fluentui-react-utilities-82544042-02b6-4262-91cd-e7f9fe24bad2.json new file mode 100644 index 00000000000000..6b1ae1f1853dd9 --- /dev/null +++ b/change/@fluentui-react-utilities-82544042-02b6-4262-91cd-e7f9fe24bad2.json @@ -0,0 +1,7 @@ +{ + "type": "none", + "comment": "chore: migrate from deprecation plugin to ts-eslint/no-deprecated rule", + "packageName": "@fluentui/react-utilities", + "email": "vgenaev@gmail.com", + "dependentChangeType": "none" +} diff --git a/change/@fluentui-react-virtualizer-00dd23f0-89d0-486d-844f-30a880feb0f5.json b/change/@fluentui-react-virtualizer-00dd23f0-89d0-486d-844f-30a880feb0f5.json new file mode 100644 index 00000000000000..556a8a1950726c --- /dev/null +++ b/change/@fluentui-react-virtualizer-00dd23f0-89d0-486d-844f-30a880feb0f5.json @@ -0,0 +1,7 @@ +{ + "type": "none", + "comment": "chore: migrate from deprecation plugin to ts-eslint/no-deprecated rule", + "packageName": "@fluentui/react-virtualizer", + "email": "vgenaev@gmail.com", + "dependentChangeType": "none" +} diff --git a/change/@fluentui-style-utilities-1e695416-a364-41c7-98b1-5cc336ce40ed.json b/change/@fluentui-style-utilities-1e695416-a364-41c7-98b1-5cc336ce40ed.json new file mode 100644 index 00000000000000..56b5682720cded --- /dev/null +++ b/change/@fluentui-style-utilities-1e695416-a364-41c7-98b1-5cc336ce40ed.json @@ -0,0 +1,7 @@ +{ + "type": "none", + "comment": "chore: migrate from deprecation plugin to ts-eslint/no-deprecated rule", + "packageName": "@fluentui/style-utilities", + "email": "vgenaev@gmail.com", + "dependentChangeType": "none" +} diff --git a/change/@fluentui-theme-9d03e3c6-0e57-491d-bbb2-ff84af746057.json b/change/@fluentui-theme-9d03e3c6-0e57-491d-bbb2-ff84af746057.json new file mode 100644 index 00000000000000..1afa956ec2955e --- /dev/null +++ b/change/@fluentui-theme-9d03e3c6-0e57-491d-bbb2-ff84af746057.json @@ -0,0 +1,7 @@ +{ + "type": "none", + "comment": "chore: migrate from deprecation plugin to ts-eslint/no-deprecated rule", + "packageName": "@fluentui/theme", + "email": "vgenaev@gmail.com", + "dependentChangeType": "none" +} diff --git a/change/@fluentui-utilities-e4d8572c-17af-41f6-8d5c-e84d6038d6bd.json b/change/@fluentui-utilities-e4d8572c-17af-41f6-8d5c-e84d6038d6bd.json new file mode 100644 index 00000000000000..463e5c9a6e8735 --- /dev/null +++ b/change/@fluentui-utilities-e4d8572c-17af-41f6-8d5c-e84d6038d6bd.json @@ -0,0 +1,7 @@ +{ + "type": "none", + "comment": "chore: migrate from deprecation plugin to ts-eslint/no-deprecated rule", + "packageName": "@fluentui/utilities", + "email": "vgenaev@gmail.com", + "dependentChangeType": "none" +} diff --git a/change/@fluentui-web-components-49fd3f00-10b9-4573-a6ac-bce95c8f2fe5.json b/change/@fluentui-web-components-49fd3f00-10b9-4573-a6ac-bce95c8f2fe5.json deleted file mode 100644 index 99a9e9c5639d0d..00000000000000 --- a/change/@fluentui-web-components-49fd3f00-10b9-4573-a6ac-bce95c8f2fe5.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "type": "prerelease", - "comment": "fix: revert logical properties in spinner to support rtl\"", - "packageName": "@fluentui/web-components", - "email": "rupertdavid@microsoft.com", - "dependentChangeType": "patch" -} diff --git a/change/@fluentui-web-components-674e26a9-57d5-4147-bda1-e4a467529eaf.json b/change/@fluentui-web-components-674e26a9-57d5-4147-bda1-e4a467529eaf.json deleted file mode 100644 index 812ad60eb4fcee..00000000000000 --- a/change/@fluentui-web-components-674e26a9-57d5-4147-bda1-e4a467529eaf.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "type": "none", - "comment": "build tokens package before running e2e tests", - "packageName": "@fluentui/web-components", - "email": "863023+radium-v@users.noreply.github.com", - "dependentChangeType": "none" -} diff --git a/change/@fluentui-web-components-a03312db-25ed-42ac-8259-b9754b5afdd9.json b/change/@fluentui-web-components-a03312db-25ed-42ac-8259-b9754b5afdd9.json deleted file mode 100644 index df9f992ebe5ced..00000000000000 --- a/change/@fluentui-web-components-a03312db-25ed-42ac-8259-b9754b5afdd9.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "type": "prerelease", - "comment": "fix: update disabled switch styles to GrayText for high-contrast mode", - "packageName": "@fluentui/web-components", - "email": "rupertdavid@microsoft.com", - "dependentChangeType": "patch" -} diff --git a/docs/react-v9/contributing/rfcs/react-components/styles-handbook.md b/docs/react-v9/contributing/rfcs/react-components/styles-handbook.md index 749b39684ef147..2b9cf9e008790c 100644 --- a/docs/react-v9/contributing/rfcs/react-components/styles-handbook.md +++ b/docs/react-v9/contributing/rfcs/react-components/styles-handbook.md @@ -962,7 +962,7 @@ function Checkbox(props) { } ``` -[fluent-colors]: https://react.fluentui.dev/?path=/docs/theme-colors--page +[fluent-colors]: https://react.fluentui.dev/?path=/docs/theme-colors--docs [griffel]: https://griffel.js.org [griffel-aot]: https://griffel.js.org/react/ahead-of-time-compilation/introduction [griffel-atomic-css]: https://griffel.js.org/react/guides/atomic-css diff --git a/package.json b/package.json index 77c06c19c1c95f..b05c90218db7e1 100644 --- a/package.json +++ b/package.json @@ -231,7 +231,6 @@ "eslint-config-airbnb": "18.2.1", "eslint-config-prettier": "8.3.0", "eslint-import-resolver-typescript": "3.6.1", - "eslint-plugin-deprecation": "3.0.0", "eslint-plugin-es": "4.1.0", "eslint-plugin-import": "2.29.1", "eslint-plugin-jest": "28.8.0", diff --git a/packages/azure-themes/CHANGELOG.json b/packages/azure-themes/CHANGELOG.json index 4aaf5704766b85..d422a264bc9375 100644 --- a/packages/azure-themes/CHANGELOG.json +++ b/packages/azure-themes/CHANGELOG.json @@ -1,6 +1,21 @@ { "name": "@fluentui/azure-themes", "entries": [ + { + "date": "Fri, 17 Jan 2025 07:21:32 GMT", + "tag": "@fluentui/azure-themes_v8.6.120", + "version": "8.6.120", + "comments": { + "patch": [ + { + "author": "beachball", + "package": "@fluentui/azure-themes", + "comment": "Bump @fluentui/react to v8.122.7", + "commit": "baf887d95f91874c814a7cae749c20e797f828be" + } + ] + } + }, { "date": "Mon, 13 Jan 2025 07:21:23 GMT", "tag": "@fluentui/azure-themes_v8.6.119", diff --git a/packages/azure-themes/CHANGELOG.md b/packages/azure-themes/CHANGELOG.md index c5e0dc641af2fe..5599d162f0a4ee 100644 --- a/packages/azure-themes/CHANGELOG.md +++ b/packages/azure-themes/CHANGELOG.md @@ -1,9 +1,18 @@ # Change Log - @fluentui/azure-themes -This log was last generated on Mon, 13 Jan 2025 07:21:23 GMT and should not be manually modified. +This log was last generated on Fri, 17 Jan 2025 07:21:32 GMT and should not be manually modified. +## [8.6.120](https://github.com/microsoft/fluentui/tree/@fluentui/azure-themes_v8.6.120) + +Fri, 17 Jan 2025 07:21:32 GMT +[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/azure-themes_v8.6.119..@fluentui/azure-themes_v8.6.120) + +### Patches + +- Bump @fluentui/react to v8.122.7 ([commit](https://github.com/microsoft/fluentui/commit/baf887d95f91874c814a7cae749c20e797f828be) by beachball) + ## [8.6.119](https://github.com/microsoft/fluentui/tree/@fluentui/azure-themes_v8.6.119) Mon, 13 Jan 2025 07:21:23 GMT diff --git a/packages/azure-themes/package.json b/packages/azure-themes/package.json index 49ed3c4f1ba138..b6a061aef01ccc 100644 --- a/packages/azure-themes/package.json +++ b/packages/azure-themes/package.json @@ -1,6 +1,6 @@ { "name": "@fluentui/azure-themes", - "version": "8.6.119", + "version": "8.6.120", "description": "Azure themes for Fluent UI React", "main": "lib-commonjs/index.js", "module": "lib/index.js", @@ -27,7 +27,7 @@ "@fluentui/scripts-webpack": "*" }, "dependencies": { - "@fluentui/react": "^8.122.6", + "@fluentui/react": "^8.122.7", "@fluentui/set-version": "^8.2.23", "tslib": "^2.1.0" } diff --git a/packages/charts/chart-web-components/CHANGELOG.json b/packages/charts/chart-web-components/CHANGELOG.json index 083c48da4b8382..0824e940714c8e 100644 --- a/packages/charts/chart-web-components/CHANGELOG.json +++ b/packages/charts/chart-web-components/CHANGELOG.json @@ -1,6 +1,29 @@ { "name": "@fluentui/chart-web-components", "entries": [ + { + "date": "Fri, 17 Jan 2025 04:07:40 GMT", + "tag": "@fluentui/chart-web-components_v0.0.0", + "version": "0.0.0", + "comments": { + "none": [ + { + "author": "martinhochel@microsoft.com", + "package": "@fluentui/chart-web-components", + "commit": "408fe44060b746844a9c76c67391b18d76d1f26e", + "comment": "chore: sync failed release pipeline with git" + } + ], + "patch": [ + { + "author": "beachball", + "package": "@fluentui/chart-web-components", + "comment": "Bump @fluentui/web-components to v3.0.0-beta.77", + "commit": "24bd1b2e8063db6c121ee02425db564fbb762f5a" + } + ] + } + }, { "date": "Tue, 14 Jan 2025 14:42:14 GMT", "tag": "@fluentui/chart-web-components_v0.0.0-alpha.2", diff --git a/packages/charts/chart-web-components/CHANGELOG.md b/packages/charts/chart-web-components/CHANGELOG.md index 19eff92c0072a1..c5f2184dfb5e5b 100644 --- a/packages/charts/chart-web-components/CHANGELOG.md +++ b/packages/charts/chart-web-components/CHANGELOG.md @@ -1,9 +1,18 @@ # Change Log - @fluentui/chart-web-components -This log was last generated on Tue, 14 Jan 2025 14:42:14 GMT and should not be manually modified. +This log was last generated on Fri, 17 Jan 2025 04:07:40 GMT and should not be manually modified. +## [0.0.0](https://github.com/microsoft/fluentui/tree/@fluentui/chart-web-components_v0.0.0) + +Fri, 17 Jan 2025 04:07:40 GMT +[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/chart-web-components_v0.0.0-alpha.2..@fluentui/chart-web-components_v0.0.0) + +### Patches + +- Bump @fluentui/web-components to v3.0.0-beta.77 ([PR #33679](https://github.com/microsoft/fluentui/pull/33679) by beachball) + ## [0.0.0-alpha.2](https://github.com/microsoft/fluentui/tree/@fluentui/chart-web-components_v0.0.0-alpha.2) Tue, 14 Jan 2025 14:42:14 GMT diff --git a/packages/charts/chart-web-components/package.json b/packages/charts/chart-web-components/package.json index 280ff647ca39fa..1ad8f593736763 100644 --- a/packages/charts/chart-web-components/package.json +++ b/packages/charts/chart-web-components/package.json @@ -1,7 +1,7 @@ { "name": "@fluentui/chart-web-components", "description": "A library of Fluent Chart Web Components", - "version": "0.0.0-alpha.2", + "version": "0.0.0", "author": { "name": "Microsoft" }, @@ -98,7 +98,7 @@ "dependencies": { "@microsoft/fast-web-utilities": "^6.0.0", "@fluentui/tokens": "^1.0.0-alpha.21", - "@fluentui/web-components": "^3.0.0-beta.76", + "@fluentui/web-components": "^3.0.0-beta.77", "@types/d3-selection": "^3.0.0", "@types/d3-shape": "^3.0.0", "d3-selection": "^3.0.0", diff --git a/packages/charts/react-charting/CHANGELOG.json b/packages/charts/react-charting/CHANGELOG.json index 39fddc4b97a2dc..3865d8a3ef769e 100644 --- a/packages/charts/react-charting/CHANGELOG.json +++ b/packages/charts/react-charting/CHANGELOG.json @@ -1,6 +1,33 @@ { "name": "@fluentui/react-charting", "entries": [ + { + "date": "Fri, 17 Jan 2025 07:21:32 GMT", + "tag": "@fluentui/react-charting_v5.23.41", + "version": "5.23.41", + "comments": { + "patch": [ + { + "author": "74965306+Anush2303@users.noreply.github.com", + "package": "@fluentui/react-charting", + "commit": "c26be3e3a85258c61111cf2dd5c19798d3a4e936", + "comment": "Make Dark mode text visible" + }, + { + "author": "beachball", + "package": "@fluentui/react-charting", + "comment": "Bump @fluentui/theme-samples to v8.7.196", + "commit": "baf887d95f91874c814a7cae749c20e797f828be" + }, + { + "author": "beachball", + "package": "@fluentui/react-charting", + "comment": "Bump @fluentui/react to v8.122.7", + "commit": "baf887d95f91874c814a7cae749c20e797f828be" + } + ] + } + }, { "date": "Mon, 13 Jan 2025 07:21:22 GMT", "tag": "@fluentui/react-charting_v5.23.40", diff --git a/packages/charts/react-charting/CHANGELOG.md b/packages/charts/react-charting/CHANGELOG.md index 42e32365cd9654..b3da0add0090fb 100644 --- a/packages/charts/react-charting/CHANGELOG.md +++ b/packages/charts/react-charting/CHANGELOG.md @@ -1,9 +1,20 @@ # Change Log - @fluentui/react-charting -This log was last generated on Mon, 13 Jan 2025 07:21:22 GMT and should not be manually modified. +This log was last generated on Fri, 17 Jan 2025 07:21:32 GMT and should not be manually modified. +## [5.23.41](https://github.com/microsoft/fluentui/tree/@fluentui/react-charting_v5.23.41) + +Fri, 17 Jan 2025 07:21:32 GMT +[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-charting_v5.23.40..@fluentui/react-charting_v5.23.41) + +### Patches + +- Make Dark mode text visible ([PR #33671](https://github.com/microsoft/fluentui/pull/33671) by 74965306+Anush2303@users.noreply.github.com) +- Bump @fluentui/theme-samples to v8.7.196 ([commit](https://github.com/microsoft/fluentui/commit/baf887d95f91874c814a7cae749c20e797f828be) by beachball) +- Bump @fluentui/react to v8.122.7 ([commit](https://github.com/microsoft/fluentui/commit/baf887d95f91874c814a7cae749c20e797f828be) by beachball) + ## [5.23.40](https://github.com/microsoft/fluentui/tree/@fluentui/react-charting_v5.23.40) Mon, 13 Jan 2025 07:21:22 GMT diff --git a/packages/charts/react-charting/etc/react-charting.api.md b/packages/charts/react-charting/etc/react-charting.api.md index 3d1c49be07983f..207610b95c35a0 100644 --- a/packages/charts/react-charting/etc/react-charting.api.md +++ b/packages/charts/react-charting/etc/react-charting.api.md @@ -200,6 +200,7 @@ export interface IAreaChartProps extends ICartesianChartProps { data: IChartProps; enableGradient?: boolean; enablePerfOptimization?: boolean; + mode?: 'tozeroy' | 'tonexty'; onRenderCalloutPerDataPoint?: IRenderFunction; onRenderCalloutPerStack?: IRenderFunction; // (undocumented) diff --git a/packages/charts/react-charting/package.json b/packages/charts/react-charting/package.json index 80f4f6edff1ebd..808b802f2c80ab 100644 --- a/packages/charts/react-charting/package.json +++ b/packages/charts/react-charting/package.json @@ -1,6 +1,6 @@ { "name": "@fluentui/react-charting", - "version": "5.23.40", + "version": "5.23.41", "description": "React web charting controls for Microsoft fluentui system.", "main": "lib-commonjs/index.js", "module": "lib/index.js", @@ -40,7 +40,7 @@ }, "dependencies": { "@fluentui/react-focus": "^8.9.20", - "@fluentui/theme-samples": "^8.7.195", + "@fluentui/theme-samples": "^8.7.196", "@microsoft/load-themed-styles": "^1.10.26", "@types/d3-array": "^3.0.0", "@types/d3-axis": "^3.0.0", @@ -66,7 +66,7 @@ "tslib": "^2.1.0" }, "peerDependencies": { - "@fluentui/react": "^8.122.6", + "@fluentui/react": "^8.122.7", "@types/react": ">=16.8.0 <19.0.0", "@types/react-dom": ">=16.8.0 <19.0.0", "react": ">=16.8.0 <19.0.0", diff --git a/packages/charts/react-charting/src/Styling.ts b/packages/charts/react-charting/src/Styling.ts index 31e6ed2005a051..563a5a90452e3b 100644 --- a/packages/charts/react-charting/src/Styling.ts +++ b/packages/charts/react-charting/src/Styling.ts @@ -6,7 +6,7 @@ export { DefaultEffects, DefaultFontStyles, DefaultPalette, - // eslint-disable-next-line deprecation/deprecation + // eslint-disable-next-line @typescript-eslint/no-deprecated EdgeChromiumHighContrastSelector, FontClassNames, FontSizes, @@ -39,11 +39,11 @@ export { createTheme, focusClear, fontFace, - // eslint-disable-next-line deprecation/deprecation + // eslint-disable-next-line @typescript-eslint/no-deprecated getEdgeChromiumNoHighContrastAdjustSelector, getFadedOverflowStyle, getFocusOutlineStyle, - // eslint-disable-next-line deprecation/deprecation + // eslint-disable-next-line @typescript-eslint/no-deprecated getFocusStyle, getGlobalClassNames, getHighContrastNoAdjustStyle, diff --git a/packages/charts/react-charting/src/Utilities.ts b/packages/charts/react-charting/src/Utilities.ts index 0850eaa19b0634..82dae884afcb13 100644 --- a/packages/charts/react-charting/src/Utilities.ts +++ b/packages/charts/react-charting/src/Utilities.ts @@ -1,10 +1,8 @@ export { Async, AutoScroll, - // eslint-disable-next-line deprecation/deprecation BaseComponent, Customizations, - // eslint-disable-next-line deprecation/deprecation Customizer, CustomizerContext, DATA_IS_SCROLLABLE_ATTRIBUTE, @@ -87,7 +85,6 @@ export { getRTL, getRTLSafeKeyCode, getRect, - // eslint-disable-next-line deprecation/deprecation getResourceUrl, getScrollbarWidth, getVirtualParent, @@ -99,11 +96,9 @@ export { hoistStatics, htmlElementProperties, iframeProperties, - // eslint-disable-next-line deprecation/deprecation imageProperties, imgProperties, initializeComponentRef, - // eslint-disable-next-line deprecation/deprecation initializeFocusRects, inputProperties, isControlled, @@ -135,7 +130,6 @@ export { optionProperties, portalContainsElement, precisionRound, - // eslint-disable-next-line deprecation/deprecation raiseClick, removeIndex, replaceElement, @@ -145,15 +139,12 @@ export { safeRequestAnimationFrame, safeSetTimeout, selectProperties, - // eslint-disable-next-line deprecation/deprecation setBaseUrl, setFocusVisibility, - // eslint-disable-next-line deprecation/deprecation setLanguage, setMemoizeWeakMap, setPortalAttribute, setRTL, - // eslint-disable-next-line deprecation/deprecation setSSR, setVirtualParent, setWarningCallback, @@ -184,7 +175,6 @@ export type { ICancelable, IChangeDescription, IChangeEventCallback, - // eslint-disable-next-line deprecation/deprecation IClassNames, IClassNamesFunctionOptions, IComponentAs, @@ -207,7 +197,6 @@ export type { IPerfData, IPerfMeasurement, IPerfSummary, - // eslint-disable-next-line deprecation/deprecation IPoint, IPropsWithStyles, IRectangle, @@ -226,13 +215,10 @@ export type { IStyleFunctionOrObject, IVirtualElement, IWarnControlledUsageParams, - // eslint-disable-next-line deprecation/deprecation Omit, Point, RefObject, - // eslint-disable-next-line deprecation/deprecation Settings, - // eslint-disable-next-line deprecation/deprecation SettingsFunction, StyleFunction, } from '@fluentui/react/lib/Utilities'; diff --git a/packages/charts/react-charting/src/components/AreaChart/AreaChart.base.tsx b/packages/charts/react-charting/src/components/AreaChart/AreaChart.base.tsx index 300ef5a45656be..d4411e51c3d674 100644 --- a/packages/charts/react-charting/src/components/AreaChart/AreaChart.base.tsx +++ b/packages/charts/react-charting/src/components/AreaChart/AreaChart.base.tsx @@ -64,7 +64,7 @@ export interface IAreaChartAreaPoint { values: IAreaChartDataSetPoint; } export interface IAreaChartDataSetPoint { - [key: string]: number | string; + [key: string]: number | string | number[]; } export interface IDPointType { values: { 0: number; 1: number; data: {} }; @@ -102,7 +102,7 @@ export class AreaChartBase extends React.Component { - const stackedValues = d3Stack().keys(keys)(dataSet); - const maxOfYVal = d3Max(stackedValues[stackedValues.length - 1], dp => dp[1])!; - const stackedData: Array = []; - // eslint-disable-next-line @typescript-eslint/no-explicit-any - stackedValues.forEach((layer: any) => { - const currentStack: IAreaChartDataSetPoint[] = []; + private _getDataPoints = (keys: string[], dataSet: any) => { + const renderPoints: Array = []; + let maxOfYVal = 0; + + if (this.props.mode === 'tozeroy') { + keys.forEach((key, index) => { + const currentLayer: IAreaChartDataSetPoint[] = []; + // eslint-disable-next-line @typescript-eslint/no-explicit-any + dataSet.forEach((d: any) => { + currentLayer.push({ + values: [0, d[key]], // Start from zero for "tozeroy" mode + xVal: d.xVal, + }); + if (d[key] > maxOfYVal) { + maxOfYVal = d[key]; + } + }); + renderPoints.push(currentLayer); + }); + } else { + const dataValues = d3Stack().keys(keys)(dataSet); + maxOfYVal = d3Max(dataValues[dataValues.length - 1], dp => dp[1])!; // eslint-disable-next-line @typescript-eslint/no-explicit-any - layer.forEach((d: any) => { - currentStack.push({ - values: d, - xVal: d.data.xVal, + dataValues.forEach((layer: any) => { + const currentLayer: IAreaChartDataSetPoint[] = []; + // eslint-disable-next-line @typescript-eslint/no-explicit-any + layer.forEach((d: any) => { + currentLayer.push({ + values: d, + xVal: d.data.xVal, + }); }); + renderPoints.push(currentLayer); }); - stackedData.push(currentStack); - }); - this._isMultiStackChart = stackedData && stackedData.length > 1 ? true : false; + } + + this._isMultiStackChart = !!(this.props.legendProps?.selectedLegends + ? renderPoints?.length >= 1 + : renderPoints?.length > 1); return { - stackedData, + renderData: renderPoints, maxOfYVal, }; }; @@ -496,7 +518,7 @@ export class AreaChartBase extends React.Component, index: number) => { + this._data.forEach((singleStackedData: Array, index: number) => { + const layerOpacity = this.props.mode === 'tozeroy' ? 0.8 : this._opacity[index]; graph.push( {this.props.enableGradient && ( @@ -755,7 +778,7 @@ export class AreaChartBase extends React.Component, index: number) => { + this._data.forEach((singleStackedData: Array, index: number) => { if (points.length === index) { return; } @@ -804,7 +827,7 @@ export class AreaChartBase extends React.Component {singleStackedData.map((singlePoint: IDPointType, pointIndex: number) => { - const circleId = `${this._circleId}_${index * this._stackedData[0].length + pointIndex}`; + const circleId = `${this._circleId}_${index * this._data[0].length + pointIndex}`; const xDataPoint = singlePoint.xVal instanceof Date ? singlePoint.xVal.getTime() : singlePoint.xVal; lineColor = points[index]!.color!; const legend = points[index]!.legend; @@ -837,7 +860,7 @@ export class AreaChartBase extends React.Component { const xDataPoint = singlePoint.xVal instanceof Date ? singlePoint.xVal.getTime() : singlePoint.xVal; if (this.state.nearestCircleToHighlight === xDataPoint) { - const circleId = `${this._circleId}_${index * this._stackedData[0].length + pointIndex}`; + const circleId = `${this._circleId}_${index * this._data[0].length + pointIndex}`; lineColor = points[index]!.color!; const legend = points[index]!.legend; graph.push( diff --git a/packages/charts/react-charting/src/components/AreaChart/AreaChart.types.ts b/packages/charts/react-charting/src/components/AreaChart/AreaChart.types.ts index f0aa8a6e77eaf9..b0ff53bf52f3c5 100644 --- a/packages/charts/react-charting/src/components/AreaChart/AreaChart.types.ts +++ b/packages/charts/react-charting/src/components/AreaChart/AreaChart.types.ts @@ -70,6 +70,12 @@ export interface IAreaChartProps extends ICartesianChartProps { * The prop used to enable gradient fill color for the chart. */ enableGradient?: boolean; + + /** + * @default tonexty + * The prop used to define the Y axis mode (tonexty or tozeroy) + */ + mode?: 'tozeroy' | 'tonexty'; } /** diff --git a/packages/charts/react-charting/src/components/AreaChart/AreaChartRTL.test.tsx b/packages/charts/react-charting/src/components/AreaChart/AreaChartRTL.test.tsx index f054dd4a1ceb71..12977fac2432d6 100644 --- a/packages/charts/react-charting/src/components/AreaChart/AreaChartRTL.test.tsx +++ b/packages/charts/react-charting/src/components/AreaChart/AreaChartRTL.test.tsx @@ -512,6 +512,16 @@ describe('Area chart rendering', () => { expect(container).toMatchSnapshot(); }, ); + + testWithoutWait( + 'Should render the Area Chart with tozeroy mode', + AreaChart, + { data: chartData, mode: 'tozeroy' }, + container => { + //Asset + expect(container).toMatchSnapshot(); + }, + ); }); describe('Area chart - Subcomponent Area', () => { diff --git a/packages/charts/react-charting/src/components/AreaChart/__snapshots__/AreaChartRTL.test.tsx.snap b/packages/charts/react-charting/src/components/AreaChart/__snapshots__/AreaChartRTL.test.tsx.snap index 83e1e7b66fa1e9..d151a2c1ec4583 100644 --- a/packages/charts/react-charting/src/components/AreaChart/__snapshots__/AreaChartRTL.test.tsx.snap +++ b/packages/charts/react-charting/src/components/AreaChart/__snapshots__/AreaChartRTL.test.tsx.snap @@ -1142,6 +1142,1148 @@ exports[`Area chart rendering Should render the Area Chart with negative y value `; +exports[`Area chart rendering Should render the Area Chart with tozeroy mode 1`] = ` +
+
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+
+
+
+
+
+
+
+ +
+
+ +
+
+ +
+
+
+
+
+
+
+
+
+
+`; + exports[`Area chart rendering Should render the Area chart with date x-axis data when tick Values given and tick format is %d 1`] = `
{ expect(container).toMatchSnapshot(); }); - test.skip('Should render gaugechart in DeclarativeChart', () => { + test('Should render gaugechart in DeclarativeChart', () => { // Arrange const plotlySchema = require('./tests/schema/fluent_gauge_test.json'); const { container } = render(); @@ -51,24 +51,38 @@ describe('DeclarativeChart', () => { expect(container).toMatchSnapshot(); }); - test.skip('Should render piechart in DeclarativeChart', () => { + test('Should render piechart in DeclarativeChart', () => { // Arrange const plotlySchema = require('./tests/schema/fluent_pie_test.json'); const { container } = render(); expect(container).toMatchSnapshot(); }); - test.skip('Should render sankeychart in DeclarativeChart', () => { + test('Should render sankeychart in DeclarativeChart', () => { // Arrange const plotlySchema = require('./tests/schema/fluent_sankey_test.json'); const { container } = render(); expect(container).toMatchSnapshot(); }); - test('Should render verticalbarchart in DeclarativeChart', () => { + test.skip('Should render verticalbarchart in DeclarativeChart', () => { // Arrange const plotlySchema = require('./tests/schema/fluent_verticalbar_test.json'); const { container } = render(); expect(container).toMatchSnapshot(); }); + + test.skip('Should render histogram chart in DeclarativeChart', () => { + // Arrange + const plotlySchema = require('./tests/schema/fluent_verticalbar_histogram_test.json'); + const { container } = render(); + expect(container).toMatchSnapshot(); + }); + + test.skip('Should render horizontalbar chart in DeclarativeChart', () => { + // Arrange + const plotlySchema = require('./tests/schema/fluent_horizontalbar_test.json'); + const { container } = render(); + expect(container).toMatchSnapshot(); + }); }); diff --git a/packages/charts/react-charting/src/components/DeclarativeChart/PlotlySchemaAdapter.ts b/packages/charts/react-charting/src/components/DeclarativeChart/PlotlySchemaAdapter.ts index d570f55a927c4e..be544d55d72cc8 100644 --- a/packages/charts/react-charting/src/components/DeclarativeChart/PlotlySchemaAdapter.ts +++ b/packages/charts/react-charting/src/components/DeclarativeChart/PlotlySchemaAdapter.ts @@ -24,10 +24,11 @@ import { IHorizontalBarChartWithAxisProps } from '../HorizontalBarChartWithAxis/ import { ILineChartProps } from '../LineChart/index'; import { IAreaChartProps } from '../AreaChart/index'; import { IHeatMapChartProps } from '../HeatMapChart/index'; -import { DataVizPalette, getNextColor } from '../../utilities/colors'; +import { DataVizPalette, getColorFromToken, getNextColor } from '../../utilities/colors'; import { GaugeChartVariant, IGaugeChartProps, IGaugeChartSegment } from '../GaugeChart/index'; import { IGroupedVerticalBarChartProps } from '../GroupedVerticalBarChart/index'; import { IVerticalBarChartProps } from '../VerticalBarChart/index'; +import { timeParse } from 'd3-time-format'; const isDate = (value: any): boolean => !isNaN(Date.parse(value)); const isNumber = (value: any): boolean => !isNaN(parseFloat(value)) && isFinite(value); @@ -35,9 +36,10 @@ export const isDateArray = (array: any[]): boolean => isArrayOrTypedArray(array) export const isNumberArray = (array: any[]): boolean => isArrayOrTypedArray(array) && array.every(isNumber); export const isMonthArray = (array: any[]): boolean => { if (array && array.length > 0) { - const presentYear = new Date().getFullYear(); + const parseFullMonth = timeParse('%B'); + const parseShortMonth = timeParse('%b'); return array.every(possiblyMonthValue => { - return isDate(`${possiblyMonthValue} 01, ${presentYear}`); + return parseFullMonth(possiblyMonthValue) !== null || parseShortMonth(possiblyMonthValue) !== null; }); } return false; @@ -147,7 +149,7 @@ export const transformPlotlyJsonToDonutProps = ( height, innerRadius, hideLabels, - showLabelsInPercent: firstData.textinfo ? firstData.textinfo === 'percent' : true, + showLabelsInPercent: firstData.textinfo ? ['percent', 'label+percent'].includes(firstData.textinfo) : true, styles, }; }; @@ -342,6 +344,7 @@ export const transformPlotlyJsonToScatterChartProps = ( isDarkTheme?: boolean, ): ILineChartProps | IAreaChartProps => { const { data, layout } = jsonObj; + let mode: string = 'tonexty'; const chartData: ILineChartPoints[] = data.map((series: any, index: number) => { const xValues = series.x; @@ -350,6 +353,7 @@ export const transformPlotlyJsonToScatterChartProps = ( const isXNumber = isNumberArray(xValues); const legend: string = series.name || `Series ${index + 1}`; const lineColor = getColor(legend, colorMap, isDarkTheme); + mode = series.fill === 'tozeroy' ? 'tozeroy' : 'tonexty'; return { legend, @@ -374,6 +378,7 @@ export const transformPlotlyJsonToScatterChartProps = ( supportNegativeData: true, xAxisTitle, yAxisTitle, + mode, } as IAreaChartProps; } else { return { @@ -404,7 +409,9 @@ export const transformPlotlyJsonToHorizontalBarWithAxisProps = ( }; }); }) - .flat(); + .flat() + //reversing the order to invert the Y bars order as required by plotly. + .reverse(); const chartHeight: number = typeof layout.height === 'number' ? layout.height : 450; const margin: number = typeof layout.margin?.l === 'number' ? layout.margin?.l : 0; @@ -579,11 +586,11 @@ export const transformPlotlyJsonToGaugeProps = ( const diff = firstData.value - firstData.delta.reference; if (diff >= 0) { sublabel = `\u25B2 ${diff}`; - const color = getColor(firstData.delta.increasing?.color || '', colorMap, isDarkTheme); + const color = getColorFromToken(DataVizPalette.success, isDarkTheme); sublabelColor = color; } else { sublabel = `\u25BC ${Math.abs(diff)}`; - const color = getColor(firstData.delta.decreasing?.color || '', colorMap, isDarkTheme); + const color = getColorFromToken(DataVizPalette.error, isDarkTheme); sublabelColor = color; } } diff --git a/packages/charts/react-charting/src/components/DeclarativeChart/PlotlySchemaAdapterUT.test.tsx b/packages/charts/react-charting/src/components/DeclarativeChart/PlotlySchemaAdapterUT.test.tsx new file mode 100644 index 00000000000000..b0764953469fac --- /dev/null +++ b/packages/charts/react-charting/src/components/DeclarativeChart/PlotlySchemaAdapterUT.test.tsx @@ -0,0 +1,343 @@ +import { + isDateArray, + isNumberArray, + isMonthArray, + updateXValues, + getColor, + transformPlotlyJsonToDonutProps, + transformPlotlyJsonToVSBCProps, + transformPlotlyJsonToGVBCProps, + transformPlotlyJsonToVBCProps, + transformPlotlyJsonToScatterChartProps, + transformPlotlyJsonToHorizontalBarWithAxisProps, + transformPlotlyJsonToHeatmapProps, + transformPlotlyJsonToSankeyProps, + transformPlotlyJsonToGaugeProps, + sanitizeJson, +} from './PlotlySchemaAdapter'; + +const date = new Date(); +const colorMap = new Map(); + +describe('isDate', () => { + test('Should return true when input array contains Date objects', () => { + const nextDay = new Date(date); + nextDay.setDate(date.getDate() + 1); + expect(isDateArray([date, nextDay])).toBe(true); + }); + + test('Should return false when input array contains numeric data', () => { + expect(isDateArray([20, 30, 40])).toBe(false); + }); + + test('Should return false when input array contains string data', () => { + expect(isDateArray(['twenty', 'thirty', 'forty'])).toBe(false); + }); + + test('Should return false when input array contains different data type objects', () => { + expect(isDateArray(['twenty', 20, date])).toBe(false); + }); + + test('Should return true when input array contains string date objects which contains month in short format', () => { + expect(isDateArray(['20 Jan 2025', '10 Feb 2025'])).toBe(true); + }); + + test('Should return true when input array contains string date objects', () => { + expect(isDateArray(['20 January 2025', '10 February 2025'])).toBe(true); + }); + + test('Should return true when input array contains date in different data types and formats', () => { + expect(isDateArray([date, '10 February 2025', '10 Feb 2025'])).toBe(true); + }); + + test('Should return true when input array contains date in DD/MM/YYYY format(string)', () => { + expect(isDateArray(['10/11/2025', '10/10/2025'])).toBe(true); + }); + + test('Should return false when input array contains date in DD/MM/YYYY format with invalid date objects', () => { + expect(isDateArray(['14/14/2025', '10/14/2025'])).toBe(false); + }); + + test('Should return true when input array contains date in MM/DD/YYYY format', () => { + expect(isDateArray(['12/1/2025', '12/11/2025'])).toBe(true); + }); + + test.skip('Should return true when input array contains date in simple date Object format', () => { + expect(isDateArray([11 / 2 / 2025, 10 / 2 / 2025])).toBe(true); + }); + + test.skip('Should return false when input array is empty', () => { + expect(isDateArray([])).toBe(false); + }); + + test('Should return false when input array contains only month(MMM)', () => { + expect(isDateArray(['January', 'February'])).toBe(false); + }); + + test('Should return false when input array contains only month(MM)', () => { + expect(isDateArray(['Jan', 'Feb'])).toBe(false); + }); +}); + +describe('isNumberArray', () => { + test('Should return false when input array contains Date objects', () => { + expect(isNumberArray([date, date.getDate() + 1, date.getDate() + 2])).toBe(false); + }); + + test('Should return true when input array contains numeric data', () => { + expect(isNumberArray([20, 30, 40])).toBe(true); + }); + + test('Should return true when input array contains numaric data in string formatt', () => { + expect(isNumberArray(['20', '30', '40'])).toBe(true); + }); + + test('Should return false when input array contains string data', () => { + expect(isNumberArray(['twenty', 'thirty', 'forty'])).toBe(false); + }); +}); + +describe('isMonthArray', () => { + test('Should return false when input array contains Date objects', () => { + expect(isMonthArray([date, date.getDate() + 1, date.getDate() + 2])).toBe(false); + }); + + test('Should return false when input array contains numeric data', () => { + expect(isMonthArray([20, 30, 40])).toBe(false); + }); + + test('Should return false when input array contains numaric data in string formatt', () => { + expect(isMonthArray(['20', '30', '40'])).toBe(false); + }); + + test('Should return false when input array contains numbers in string data', () => { + expect(isMonthArray(['One', 'Two', 'Three'])).toBe(false); + }); + + test('Should return true when input array contains only months in string formatt(MMM)', () => { + expect(isMonthArray(['January', 'February'])).toBe(true); + }); + + test('Should return true when input array contains only months in string formatt(MM)', () => { + expect(isMonthArray(['Jan', 'Feb'])).toBe(true); + }); + + test('Should return false when input array is empty', () => { + expect(isMonthArray([])).toBe(false); + }); + + test.skip('Should return true when input array contains only months in string formatt(MMM) in spanish', () => { + expect(isMonthArray(['Enero', 'Febrero'])).toBe(true); + }); + + test.skip('Should return true when input array contains only months in string formatt(MM) in spanish', () => { + expect(isMonthArray(['Ene', 'Feb'])).toBe(true); + }); + + test.skip('Should return true when input array contains only months in string format(MMM) in italian', () => { + expect(isMonthArray(['Gennaio', 'Febbraio'])).toBe(true); + }); +}); + +describe('updateXValues', () => { + test('Should return dates array when input array contains months data', () => { + expect(updateXValues([10, 11, 1])).toStrictEqual(['10 01, 2024', '11 01, 2024', '1 01, 2025']); + }); + + test('Should return error when input array contains invalid months', () => { + try { + expect(updateXValues([10, 11, 16])).toStrictEqual([]); + } catch (e) { + expect(e).toStrictEqual(TypeError("Cannot read properties of null (reading 'getMonth')")); + } + }); + + test('Should return dates array when input array contains months data in MMM format', () => { + expect(updateXValues(['January', 'February'])).toStrictEqual(['January 01, 2025', 'February 01, 2025']); + }); + + test('Should return dates array when input array contains months data in MM format', () => { + expect(updateXValues(['Jan', 'Feb'])).toStrictEqual(['Jan 01, 2025', 'Feb 01, 2025']); + }); + + test('Should return dates array when input array is empty', () => { + expect(updateXValues([])).toStrictEqual([]); + }); +}); + +describe('getColor', () => { + test('Should return color code when we had legend title', () => { + expect(getColor('test', { current: colorMap }, true)).toBe('#e3008c'); + }); + + test('Should return color code when we had legend title', () => { + expect(getColor('test', { current: colorMap }, false)).toBe('#e3008c'); + }); + + test('Should return color code when we had legend title is empty', () => { + expect(getColor('', { current: colorMap }, false)).toBe('#2aa0a4'); + }); +}); + +describe('transform Plotly Json To chart Props', () => { + test('transformPlotlyJsonToDonutProps - Should return donut chart props', () => { + const plotlySchema = require('./tests/schema/fluent_donut_test.json'); + expect(transformPlotlyJsonToDonutProps(plotlySchema, { current: colorMap }, true)).toMatchSnapshot(); + }); + + test('transformPlotlyJsonToDonutProps - Should throw an error when we pass invalid data', () => { + const plotlySchema = require('./tests/schema/fluent_nesteddata_test.json'); + try { + expect(transformPlotlyJsonToDonutProps(plotlySchema, { current: colorMap }, true)).toMatchSnapshot(); + } catch (e) { + expect(e).toStrictEqual(TypeError("Cannot read properties of undefined (reading '0')")); + } + }); + + test('transformPlotlyJsonToDonutProps - Should return pie chart props', () => { + const plotlySchema = require('./tests/schema/fluent_pie_test.json'); + expect(transformPlotlyJsonToDonutProps(plotlySchema, { current: colorMap }, true)).toMatchSnapshot(); + }); + + test('transformPlotlyJsonToVSBCProps - Should return VSBC props', () => { + const plotlySchema = require('./tests/schema/fluent_verticalstackedbarchart_test.json'); + expect(transformPlotlyJsonToVSBCProps(plotlySchema, { current: colorMap }, true)).toMatchSnapshot(); + }); + + test('transformPlotlyJsonToVSBCProps - Should throw an error when we pass invalid data', () => { + const plotlySchema = require('./tests/schema/fluent_nesteddata_test.json'); + try { + expect(transformPlotlyJsonToVSBCProps(plotlySchema, { current: colorMap }, true)).toMatchSnapshot(); + } catch (e) { + expect(e).toStrictEqual(TypeError("Cannot read properties of undefined (reading 'forEach')")); + } + }); + + test('transformPlotlyJsonToGVBCProps - Should return GVBC props', () => { + const plotlySchema = require('./tests/schema/fluent_groupedverticalbarchart_test.json'); + expect(transformPlotlyJsonToGVBCProps(plotlySchema, { current: colorMap }, true)).toMatchSnapshot(); + }); + + test('transformPlotlyJsonToGVBCProps - Should throw an error when we pass invalid data', () => { + const plotlySchema = require('./tests/schema/fluent_nesteddata_test.json'); + try { + expect(transformPlotlyJsonToGVBCProps(plotlySchema, { current: colorMap }, true)).toMatchSnapshot(); + } catch (e) { + expect(e).toStrictEqual(TypeError("Cannot read properties of undefined (reading 'forEach')")); + } + }); + + test('transformPlotlyJsonToVBCProps - Should return VBC props', () => { + const plotlySchema = require('./tests/schema/fluent_verticalbar_histogram_test.json'); + expect(transformPlotlyJsonToVBCProps(plotlySchema, { current: colorMap }, true)).toMatchSnapshot(); + }); + + test('transformPlotlyJsonToVBCProps - Should throw an error when we pass invalid data', () => { + const plotlySchema = require('./tests/schema/fluent_nesteddata_test.json'); + try { + expect(transformPlotlyJsonToVBCProps(plotlySchema, { current: colorMap }, true)).toMatchSnapshot(); + } catch (e) { + expect(e).toStrictEqual(TypeError("Cannot read properties of undefined (reading 'forEach')")); + } + }); + + test('transformPlotlyJsonToScatterChartProps - Should return line chart props', () => { + const plotlySchema = require('./tests/schema/fluent_line_test.json'); + expect(transformPlotlyJsonToScatterChartProps(plotlySchema, true, { current: colorMap }, true)).toMatchSnapshot(); + }); + + test('transformPlotlyJsonToScatterChartProps - Should throw an error when we pass invalid data', () => { + const plotlySchema = require('./tests/schema/fluent_nesteddata_test.json'); + try { + expect(transformPlotlyJsonToScatterChartProps(plotlySchema, true, { current: colorMap }, true)).toMatchSnapshot(); + } catch (e) { + expect(e).toStrictEqual(TypeError("Cannot read properties of undefined (reading 'map')")); + } + }); + + test('transformPlotlyJsonToScatterChartProps - Should return area chart props', () => { + const plotlySchema = require('./tests/schema/fluent_area_test.json'); + expect(transformPlotlyJsonToScatterChartProps(plotlySchema, true, { current: colorMap }, true)).toMatchSnapshot(); + }); + + test('transformPlotlyJsonToHorizontalBarWithAxisProps - Should return HBC with axis chart props', () => { + const plotlySchema = require('./tests/schema/fluent_horizontalbar_test.json'); + expect( + transformPlotlyJsonToHorizontalBarWithAxisProps(plotlySchema, { current: colorMap }, true), + ).toMatchSnapshot(); + }); + + test('transformPlotlyJsonToHorizontalBarWithAxisProps - Should throw an error when we pass invalid data', () => { + const plotlySchema = require('./tests/schema/fluent_nesteddata_test.json'); + try { + expect( + transformPlotlyJsonToHorizontalBarWithAxisProps(plotlySchema, { current: colorMap }, true), + ).toMatchSnapshot(); + } catch (e) { + expect(e).toStrictEqual(TypeError("Cannot read properties of undefined (reading 'map')")); + } + }); + + test('transformPlotlyJsonToHeatmapProps - Should return heatmap chart props', () => { + const plotlySchema = require('./tests/schema/fluent_heatmap_test.json'); + expect(transformPlotlyJsonToHeatmapProps(plotlySchema)).toMatchSnapshot(); + }); + + test('transformPlotlyJsonToHeatmapProps - Should throw an error when we pass invalid data', () => { + const plotlySchema = require('./tests/schema/fluent_nesteddata_test.json'); + try { + expect(transformPlotlyJsonToHeatmapProps(plotlySchema)).toMatchSnapshot(); + } catch (e) { + expect(e).toStrictEqual(TypeError("Cannot read properties of undefined (reading '0')")); + } + }); + + test('transformPlotlyJsonToSankeyProps - Should return sankey chart props', () => { + const plotlySchema = require('./tests/schema/fluent_sankey_test.json'); + expect(transformPlotlyJsonToSankeyProps(plotlySchema, { current: colorMap }, true)).toMatchSnapshot(); + }); + + test('transformPlotlyJsonToSankeyProps - Should throw an error when we pass invalid data', () => { + const plotlySchema = require('./tests/schema/fluent_nesteddata_test.json'); + try { + expect(transformPlotlyJsonToSankeyProps(plotlySchema, { current: colorMap }, true)).toMatchSnapshot(); + } catch (e) { + expect(e).toStrictEqual(TypeError("Cannot read properties of undefined (reading '0')")); + } + }); + + test('transformPlotlyJsonToGaugeProps - Should return gauge chart props', () => { + const plotlySchema = require('./tests/schema/fluent_gauge_test.json'); + expect(transformPlotlyJsonToGaugeProps(plotlySchema, { current: colorMap }, true)).toMatchSnapshot(); + }); + + test('transformPlotlyJsonToGaugeProps - Should throw an error when we pass invalid data', () => { + const plotlySchema = require('./tests/schema/fluent_nesteddata_test.json'); + try { + expect(transformPlotlyJsonToGaugeProps(plotlySchema, { current: colorMap }, true)).toMatchSnapshot(); + } catch (e) { + expect(e).toStrictEqual(TypeError("Cannot read properties of undefined (reading '0')")); + } + }); +}); + +describe('sanitizeJson', () => { + test('Should return json object when depth inside the range', () => { + const plotlySchema = require('./tests/schema/fluent_gauge_test.json'); + expect(sanitizeJson(plotlySchema)).toMatchSnapshot(); + }); + + test('Should return empty json object when input schema is empty', () => { + const plotlySchema = {}; + expect(sanitizeJson(plotlySchema)).toStrictEqual({}); + }); + + test('Should return error when input schema has depth more than max limit', () => { + const plotlySchema = require('./tests/schema/fluent_nesteddata_test.json'); + try { + sanitizeJson(plotlySchema); + } catch (e) { + expect(e).toStrictEqual(Error('Maximum json depth exceeded')); + } + }); +}); diff --git a/packages/charts/react-charting/src/components/DeclarativeChart/__snapshots__/DeclarativeChartRTL.test.tsx.snap b/packages/charts/react-charting/src/components/DeclarativeChart/__snapshots__/DeclarativeChartRTL.test.tsx.snap index 2518fa0e844b78..bf5cdb41de7cbd 100644 --- a/packages/charts/react-charting/src/components/DeclarativeChart/__snapshots__/DeclarativeChartRTL.test.tsx.snap +++ b/packages/charts/react-charting/src/components/DeclarativeChart/__snapshots__/DeclarativeChartRTL.test.tsx.snap @@ -4043,7 +4043,7 @@ exports[`DeclarativeChart Should render gaugechart in DeclarativeChart 1`] = ` data-tabster="{\\"uncontrolled\\": {}}" > - +
+
@@ -25048,7 +25037,7 @@ exports[`DeclarativeChart Should render sankeychart in DeclarativeChart 1`] = ` { overflow: auto; } - data-focuszone-id="FocusZone33" + data-focuszone-id="FocusZone36" data-tabster="{\\"uncontrolled\\": {}}" > - Leave+No – 16 + Remain+No – 28 + 28 + + + + + + + + + + + + @@ -25143,14 +25207,14 @@ exports[`DeclarativeChart Should render sankeychart in DeclarativeChart 1`] = ` } > Remain+Yes – 21 @@ -25200,7 +25264,7 @@ exports[`DeclarativeChart Should render sankeychart in DeclarativeChart 1`] = ` font-weight="bold" text-anchor="start" x="48" - y="123.99999999999994" + y="208.15686274509804" > 22 @@ -25218,14 +25282,14 @@ exports[`DeclarativeChart Should render sankeychart in DeclarativeChart 1`] = ` } > Leave+Yes – 14 @@ -25275,7 +25339,7 @@ exports[`DeclarativeChart Should render sankeychart in DeclarativeChart 1`] = ` font-weight="bold" text-anchor="start" x="48" - y="241.99999999999994" + y="294.2352941176472" > 14 @@ -25293,14 +25357,14 @@ exports[`DeclarativeChart Should render sankeychart in DeclarativeChart 1`] = ` } > Didn’t vote in at least one referendum – 21 @@ -25350,7 +25414,7 @@ exports[`DeclarativeChart Should render sankeychart in DeclarativeChart 1`] = ` font-weight="bold" text-anchor="start" x="48" - y="320.00000000000006" + y="351.92156862745105" > 22 @@ -25381,7 +25445,7 @@ exports[`DeclarativeChart Should render sankeychart in DeclarativeChart 1`] = ` > - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -25950,14 +26122,14 @@ exports[`DeclarativeChart Should render sankeychart in DeclarativeChart 1`] = ` } > 46 – No @@ -26007,9 +26179,9 @@ exports[`DeclarativeChart Should render sankeychart in DeclarativeChart 1`] = ` font-weight="bold" text-anchor="start" x="739" - y="44" + y="47.48191060502646" > - 25 + 45 @@ -26025,14 +26197,14 @@ exports[`DeclarativeChart Should render sankeychart in DeclarativeChart 1`] = ` } > 39 – Yes @@ -26082,9 +26254,9 @@ exports[`DeclarativeChart Should render sankeychart in DeclarativeChart 1`] = ` font-weight="bold" text-anchor="start" x="739" - y="177.00000000000006" + y="215.1877929579676" > - 36 + 39 @@ -26100,14 +26272,14 @@ exports[`DeclarativeChart Should render sankeychart in DeclarativeChart 1`] = ` } > 14 – Don’t know / would not vote @@ -26157,9 +26329,9 @@ exports[`DeclarativeChart Should render sankeychart in DeclarativeChart 1`] = ` font-weight="bold" text-anchor="start" x="739" - y="365.0000000000002" + y="361.59955766384985" > - 13 + 18 diff --git a/packages/charts/react-charting/src/components/DeclarativeChart/__snapshots__/PlotlySchemaAdapterUT.test.tsx.snap b/packages/charts/react-charting/src/components/DeclarativeChart/__snapshots__/PlotlySchemaAdapterUT.test.tsx.snap new file mode 100644 index 00000000000000..85baf67c9f3528 --- /dev/null +++ b/packages/charts/react-charting/src/components/DeclarativeChart/__snapshots__/PlotlySchemaAdapterUT.test.tsx.snap @@ -0,0 +1,4936 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`sanitizeJson Should return json object when depth inside the range 1`] = ` +Object { + "data": Array [ + Object { + "delta": Object { + "increasing": Object { + "color": "RebeccaPurple", + }, + "reference": 400, + }, + "gauge": Object { + "axis": Object { + "range": Array [ + null, + 500, + ], + "tickcolor": "darkblue", + "tickwidth": 1, + }, + "bar": Object { + "color": "darkblue", + }, + "bgcolor": "white", + "bordercolor": "gray", + "borderwidth": 2, + "steps": Array [ + Object { + "color": "cyan", + "range": Array [ + 0, + 250, + ], + }, + Object { + "color": "royalblue", + "range": Array [ + 250, + 400, + ], + }, + ], + "threshold": Object { + "line": Object { + "color": "red", + "width": 4, + }, + "thickness": 0.75, + "value": 490, + }, + }, + "mode": "gauge+number+delta", + "title": Object { + "font": Object { + "size": 24, + }, + "text": "Speed", + }, + "type": "indicator", + "value": 420, + }, + ], + "frames": Array [], + "layout": Object { + "font": Object { + "color": "darkblue", + "family": "Arial", + }, + "height": 400, + "margin": Object { + "b": 25, + "l": 25, + "r": 25, + "t": 25, + }, + "paper_bgcolor": "lavender", + "width": 500, + }, + "visualizer": "plotly", +} +`; + +exports[`transform Plotly Json To chart Props transformPlotlyJsonToDonutProps - Should return donut chart props 1`] = ` +Object { + "data": Object { + "chartData": Array [ + Object { + "color": "#9373c0", + "data": 1, + "legend": "AMC", + }, + Object { + "color": "#13a10e", + "data": 1, + "legend": "Cadillac", + }, + Object { + "color": "#3a96dd", + "data": 1, + "legend": "Camaro", + }, + Object { + "color": "#ca5010", + "data": 1, + "legend": "Chrysler", + }, + Object { + "color": "#57811b", + "data": 1, + "legend": "Datsun", + }, + Object { + "color": "#b146c2", + "data": 1, + "legend": "Dodge", + }, + Object { + "color": "#ae8c00", + "data": 1, + "legend": "Duster", + }, + Object { + "color": "#93a4f4", + "data": 1, + "legend": "Ferrari", + }, + Object { + "color": "#ee5fb7", + "data": 2, + "legend": "Fiat", + }, + Object { + "color": "#4cb4b7", + "data": 1, + "legend": "Ford", + }, + Object { + "color": "#a083c9", + "data": 1, + "legend": "Honda", + }, + Object { + "color": "#27ac22", + "data": 2, + "legend": "Hornet", + }, + Object { + "color": "#4fa1e1", + "data": 1, + "legend": "Lincoln", + }, + Object { + "color": "#d77440", + "data": 1, + "legend": "Lotus", + }, + Object { + "color": "#73aa24", + "data": 1, + "legend": "Maserati", + }, + Object { + "color": "#c36bd1", + "data": 2, + "legend": "Mazda", + }, + Object { + "color": "#d0b232", + "data": 7, + "legend": "Merc", + }, + Object { + "color": "#4f6bed", + "data": 1, + "legend": "Pontiac", + }, + Object { + "color": "#ea38a6", + "data": 1, + "legend": "Porsche", + }, + Object { + "color": "#038387", + "data": 2, + "legend": "Toyota", + }, + Object { + "color": "#8764b8", + "data": 1, + "legend": "Valiant", + }, + Object { + "color": "#11910d", + "data": 1, + "legend": "Volvo", + }, + ], + "chartTitle": "Donut charts using Plotly", + }, + "height": 220, + "hideLabels": false, + "hideLegend": false, + "innerRadius": 42, + "showLabelsInPercent": true, + "styles": Object { + "root": Object { + "[class^=\\"arcLabel\\"]": Object {}, + }, + }, + "width": 440, +} +`; + +exports[`transform Plotly Json To chart Props transformPlotlyJsonToDonutProps - Should return pie chart props 1`] = ` +Object { + "data": Object { + "chartData": Array [ + Object { + "color": "#3487c7", + "data": 4500, + "legend": "Oxygen", + }, + Object { + "color": "#d06228", + "data": 2500, + "legend": "Hydrogen", + }, + Object { + "color": "#689920", + "data": 1053, + "legend": "Carbon_Dioxide", + }, + Object { + "color": "#ba58c9", + "data": 500, + "legend": "Nitrogen", + }, + ], + "chartTitle": "", + }, + "height": 220, + "hideLabels": false, + "hideLegend": false, + "innerRadius": 0, + "showLabelsInPercent": false, + "styles": Object { + "root": Object { + "[class^=\\"arcLabel\\"]": Object { + "fontSize": 20, + }, + }, + }, + "width": 440, +} +`; + +exports[`transform Plotly Json To chart Props transformPlotlyJsonToGVBCProps - Should return GVBC props 1`] = ` +Object { + "barwidth": "auto", + "chartTitle": "PHP Framework Popularity at Work - SitePoint, 2015", + "data": Array [ + Object { + "name": "Jan", + "series": Array [ + Object { + "color": "#c19c00", + "data": 2000, + "key": "Category A", + "legend": "Category A", + "xAxisCalloutData": "Jan", + }, + Object { + "color": "#c8d1fa", + "data": 3000, + "key": "Category B", + "legend": "Category B", + "xAxisCalloutData": "Jan", + }, + ], + }, + Object { + "name": "Feb", + "series": Array [ + Object { + "color": "#c19c00", + "data": 2100, + "key": "Category A", + "legend": "Category A", + "xAxisCalloutData": "Feb", + }, + Object { + "color": "#c8d1fa", + "data": 3100, + "key": "Category B", + "legend": "Category B", + "xAxisCalloutData": "Feb", + }, + ], + }, + Object { + "name": "Mar", + "series": Array [ + Object { + "color": "#c19c00", + "data": 2200, + "key": "Category A", + "legend": "Category A", + "xAxisCalloutData": "Mar", + }, + Object { + "color": "#c8d1fa", + "data": 3200, + "key": "Category B", + "legend": "Category B", + "xAxisCalloutData": "Mar", + }, + ], + }, + Object { + "name": "Apr", + "series": Array [ + Object { + "color": "#c19c00", + "data": 2300, + "key": "Category A", + "legend": "Category A", + "xAxisCalloutData": "Apr", + }, + Object { + "color": "#c8d1fa", + "data": 3300, + "key": "Category B", + "legend": "Category B", + "xAxisCalloutData": "Apr", + }, + ], + }, + Object { + "name": "May", + "series": Array [ + Object { + "color": "#c19c00", + "data": 2400, + "key": "Category A", + "legend": "Category A", + "xAxisCalloutData": "May", + }, + Object { + "color": "#c8d1fa", + "data": 3400, + "key": "Category B", + "legend": "Category B", + "xAxisCalloutData": "May", + }, + ], + }, + ], + "mode": "plotly", + "xAxisTitle": "Votes", + "yAxisTitle": "Framework", +} +`; + +exports[`transform Plotly Json To chart Props transformPlotlyJsonToGaugeProps - Should return gauge chart props 1`] = ` +Object { + "chartTitle": "", + "chartValue": 420, + "chartValueFormat": [Function], + "height": 400, + "maxValue": 500, + "minValue": undefined, + "segments": Array [ + Object { + "color": "#c19c00", + "legend": "Segment 1", + "size": 250, + }, + Object { + "color": "#c8d1fa", + "legend": "Segment 2", + "size": 150, + }, + ], + "styles": Object { + "sublabel": Object { + "fill": "#54b054", + }, + }, + "sublabel": "▲ 20", + "variant": "multiple-segments", + "width": 500, +} +`; + +exports[`transform Plotly Json To chart Props transformPlotlyJsonToHeatmapProps - Should return heatmap chart props 1`] = ` +Object { + "chartTitle": "", + "data": Array [ + Object { + "data": Array [ + Object { + "rectText": 12, + "value": 12, + "x": "x_0", + "y": "y_0", + }, + Object { + "rectText": 18.072596781382654, + "value": 18.072596781382654, + "x": "x_0", + "y": "y_1", + }, + Object { + "rectText": 16.104827483834423, + "value": 16.104827483834423, + "x": "x_0", + "y": "y_2", + }, + Object { + "rectText": 12.732656491556462, + "value": 12.732656491556462, + "x": "x_0", + "y": "y_3", + }, + Object { + "rectText": 10.424697200562369, + "value": 10.424697200562369, + "x": "x_0", + "y": "y_4", + }, + Object { + "rectText": 1.3848305486418013, + "value": 1.3848305486418013, + "x": "x_0", + "y": "y_5", + }, + Object { + "rectText": -6.877933971525136, + "value": -6.877933971525136, + "x": "x_0", + "y": "y_6", + }, + Object { + "rectText": -7.513284950652834, + "value": -7.513284950652834, + "x": "x_0", + "y": "y_7", + }, + Object { + "rectText": 0.02929945240777787, + "value": 0.02929945240777787, + "x": "x_0", + "y": "y_8", + }, + Object { + "rectText": 1.3315750803470996, + "value": 1.3315750803470996, + "x": "x_0", + "y": "y_9", + }, + Object { + "rectText": -0.34155835630595655, + "value": -0.34155835630595655, + "x": "x_0", + "y": "y_10", + }, + Object { + "rectText": -1.2496939708148902, + "value": -1.2496939708148902, + "x": "x_0", + "y": "y_11", + }, + Object { + "rectText": 3.673504371828866, + "value": 3.673504371828866, + "x": "x_0", + "y": "y_12", + }, + Object { + "rectText": 9.197351864496074, + "value": 9.197351864496074, + "x": "x_0", + "y": "y_13", + }, + Object { + "rectText": 17.878378279408615, + "value": 17.878378279408615, + "x": "x_0", + "y": "y_14", + }, + Object { + "rectText": 18.3594620989525, + "value": 18.3594620989525, + "x": "x_0", + "y": "y_15", + }, + Object { + "rectText": 9.52854140993721, + "value": 9.52854140993721, + "x": "x_0", + "y": "y_16", + }, + Object { + "rectText": 8.834804620855842, + "value": 8.834804620855842, + "x": "x_0", + "y": "y_17", + }, + Object { + "rectText": 2.008683713506029, + "value": 2.008683713506029, + "x": "x_0", + "y": "y_18", + }, + Object { + "rectText": 1.4746401926975559, + "value": 1.4746401926975559, + "x": "x_0", + "y": "y_19", + }, + Object { + "rectText": 11.697147742124411, + "value": 11.697147742124411, + "x": "x_1", + "y": "y_0", + }, + Object { + "rectText": 6.872368565119988, + "value": 6.872368565119988, + "x": "x_1", + "y": "y_1", + }, + Object { + "rectText": 16.816096580158092, + "value": 16.816096580158092, + "x": "x_1", + "y": "y_2", + }, + Object { + "rectText": 24.158612074358526, + "value": 24.158612074358526, + "x": "x_1", + "y": "y_3", + }, + Object { + "rectText": 28.78022939969912, + "value": 28.78022939969912, + "x": "x_1", + "y": "y_4", + }, + Object { + "rectText": 28.88858899620542, + "value": 28.88858899620542, + "x": "x_1", + "y": "y_5", + }, + Object { + "rectText": 44.04384439381119, + "value": 44.04384439381119, + "x": "x_1", + "y": "y_6", + }, + Object { + "rectText": 44.21182779048812, + "value": 44.21182779048812, + "x": "x_1", + "y": "y_7", + }, + Object { + "rectText": 47.8943258538308, + "value": 47.8943258538308, + "x": "x_1", + "y": "y_8", + }, + Object { + "rectText": 45.90255894008207, + "value": 45.90255894008207, + "x": "x_1", + "y": "y_9", + }, + Object { + "rectText": 52.257883472637104, + "value": 52.257883472637104, + "x": "x_1", + "y": "y_10", + }, + Object { + "rectText": 52.0753263525035, + "value": 52.0753263525035, + "x": "x_1", + "y": "y_11", + }, + Object { + "rectText": 55.66537870906952, + "value": 55.66537870906952, + "x": "x_1", + "y": "y_12", + }, + Object { + "rectText": 55.98556586180058, + "value": 55.98556586180058, + "x": "x_1", + "y": "y_13", + }, + Object { + "rectText": 65.61603877495548, + "value": 65.61603877495548, + "x": "x_1", + "y": "y_14", + }, + Object { + "rectText": 66.76755465163893, + "value": 66.76755465163893, + "x": "x_1", + "y": "y_15", + }, + Object { + "rectText": 66.15934256222516, + "value": 66.15934256222516, + "x": "x_1", + "y": "y_16", + }, + Object { + "rectText": 58.63396530456222, + "value": 58.63396530456222, + "x": "x_1", + "y": "y_17", + }, + Object { + "rectText": 68.77074374390875, + "value": 68.77074374390875, + "x": "x_1", + "y": "y_18", + }, + Object { + "rectText": 76.5710413276318, + "value": 76.5710413276318, + "x": "x_1", + "y": "y_19", + }, + Object { + "rectText": 7.1748009833505355, + "value": 7.1748009833505355, + "x": "x_2", + "y": "y_0", + }, + Object { + "rectText": 2.6331323456979367, + "value": 2.6331323456979367, + "x": "x_2", + "y": "y_1", + }, + Object { + "rectText": -1.0796033248100874, + "value": -1.0796033248100874, + "x": "x_2", + "y": "y_2", + }, + Object { + "rectText": 1.8639666906231516, + "value": 1.8639666906231516, + "x": "x_2", + "y": "y_3", + }, + Object { + "rectText": 3.274446200066722, + "value": 3.274446200066722, + "x": "x_2", + "y": "y_4", + }, + Object { + "rectText": 12.971410893817621, + "value": 12.971410893817621, + "x": "x_2", + "y": "y_5", + }, + Object { + "rectText": 13.548126342387011, + "value": 13.548126342387011, + "x": "x_2", + "y": "y_6", + }, + Object { + "rectText": 14.479713711226983, + "value": 14.479713711226983, + "x": "x_2", + "y": "y_7", + }, + Object { + "rectText": 13.4384038570412, + "value": 13.4384038570412, + "x": "x_2", + "y": "y_8", + }, + Object { + "rectText": 9.162060301209916, + "value": 9.162060301209916, + "x": "x_2", + "y": "y_9", + }, + Object { + "rectText": 14.63013635132661, + "value": 14.63013635132661, + "x": "x_2", + "y": "y_10", + }, + Object { + "rectText": 16.573843720560127, + "value": 16.573843720560127, + "x": "x_2", + "y": "y_11", + }, + Object { + "rectText": 22.222025244923273, + "value": 22.222025244923273, + "x": "x_2", + "y": "y_12", + }, + Object { + "rectText": 19.688495387348357, + "value": 19.688495387348357, + "x": "x_2", + "y": "y_13", + }, + Object { + "rectText": 21.1073514253479, + "value": 21.1073514253479, + "x": "x_2", + "y": "y_14", + }, + Object { + "rectText": 23.378561600159312, + "value": 23.378561600159312, + "x": "x_2", + "y": "y_15", + }, + Object { + "rectText": 25.727095609917317, + "value": 25.727095609917317, + "x": "x_2", + "y": "y_16", + }, + Object { + "rectText": 32.725737544844485, + "value": 32.725737544844485, + "x": "x_2", + "y": "y_17", + }, + Object { + "rectText": 27.561261630596558, + "value": 27.561261630596558, + "x": "x_2", + "y": "y_18", + }, + Object { + "rectText": 22.444170064560886, + "value": 22.444170064560886, + "x": "x_2", + "y": "y_19", + }, + Object { + "rectText": 11.443688379214382, + "value": 11.443688379214382, + "x": "x_3", + "y": "y_0", + }, + Object { + "rectText": 8.910260123844887, + "value": 8.910260123844887, + "x": "x_3", + "y": "y_1", + }, + Object { + "rectText": 13.037577162924944, + "value": 13.037577162924944, + "x": "x_3", + "y": "y_2", + }, + Object { + "rectText": 9.195075731494875, + "value": 9.195075731494875, + "x": "x_3", + "y": "y_3", + }, + Object { + "rectText": 8.669870516018236, + "value": 8.669870516018236, + "x": "x_3", + "y": "y_4", + }, + Object { + "rectText": 21.143305039916708, + "value": 21.143305039916708, + "x": "x_3", + "y": "y_5", + }, + Object { + "rectText": 17.74014481550033, + "value": 17.74014481550033, + "x": "x_3", + "y": "y_6", + }, + Object { + "rectText": 17.660499931671584, + "value": 17.660499931671584, + "x": "x_3", + "y": "y_7", + }, + Object { + "rectText": 17.917433759396193, + "value": 17.917433759396193, + "x": "x_3", + "y": "y_8", + }, + Object { + "rectText": -1.2943200134022526, + "value": -1.2943200134022526, + "x": "x_3", + "y": "y_9", + }, + Object { + "rectText": -1.1475310646451669, + "value": -1.1475310646451669, + "x": "x_3", + "y": "y_10", + }, + Object { + "rectText": 0.6254954059905691, + "value": 0.6254954059905691, + "x": "x_3", + "y": "y_11", + }, + Object { + "rectText": -2.1871046243479864, + "value": -2.1871046243479864, + "x": "x_3", + "y": "y_12", + }, + Object { + "rectText": -1.1757697666321, + "value": -1.1757697666321, + "x": "x_3", + "y": "y_13", + }, + Object { + "rectText": -9.253213203481765, + "value": -9.253213203481765, + "x": "x_3", + "y": "y_14", + }, + Object { + "rectText": -9.221557127656212, + "value": -9.221557127656212, + "x": "x_3", + "y": "y_15", + }, + Object { + "rectText": -16.01042996598902, + "value": -16.01042996598902, + "x": "x_3", + "y": "y_16", + }, + Object { + "rectText": -13.465901648481573, + "value": -13.465901648481573, + "x": "x_3", + "y": "y_17", + }, + Object { + "rectText": -11.972754232678293, + "value": -11.972754232678293, + "x": "x_3", + "y": "y_18", + }, + Object { + "rectText": -11.754560357801614, + "value": -11.754560357801614, + "x": "x_3", + "y": "y_19", + }, + Object { + "rectText": 23.648522429525176, + "value": 23.648522429525176, + "x": "x_4", + "y": "y_0", + }, + Object { + "rectText": 23.29825386450679, + "value": 23.29825386450679, + "x": "x_4", + "y": "y_1", + }, + Object { + "rectText": 25.071276081749808, + "value": 25.071276081749808, + "x": "x_4", + "y": "y_2", + }, + Object { + "rectText": 19.788944565361437, + "value": 19.788944565361437, + "x": "x_4", + "y": "y_3", + }, + Object { + "rectText": 17.75655781585482, + "value": 17.75655781585482, + "x": "x_4", + "y": "y_4", + }, + Object { + "rectText": 7.466382276034302, + "value": 7.466382276034302, + "x": "x_4", + "y": "y_5", + }, + Object { + "rectText": 15.7912983146064, + "value": 15.7912983146064, + "x": "x_4", + "y": "y_6", + }, + Object { + "rectText": 14.436062506263415, + "value": 14.436062506263415, + "x": "x_4", + "y": "y_7", + }, + Object { + "rectText": 17.039432522289083, + "value": 17.039432522289083, + "x": "x_4", + "y": "y_8", + }, + Object { + "rectText": 21.982396858443334, + "value": 21.982396858443334, + "x": "x_4", + "y": "y_9", + }, + Object { + "rectText": 19.815434611539906, + "value": 19.815434611539906, + "x": "x_4", + "y": "y_10", + }, + Object { + "rectText": 25.67070005332393, + "value": 25.67070005332393, + "x": "x_4", + "y": "y_11", + }, + Object { + "rectText": 28.014054309766728, + "value": 28.014054309766728, + "x": "x_4", + "y": "y_12", + }, + Object { + "rectText": 26.78831096366896, + "value": 26.78831096366896, + "x": "x_4", + "y": "y_13", + }, + Object { + "rectText": 27.879670681460908, + "value": 27.879670681460908, + "x": "x_4", + "y": "y_14", + }, + Object { + "rectText": 28.23165649899542, + "value": 28.23165649899542, + "x": "x_4", + "y": "y_15", + }, + Object { + "rectText": 24.77811171644336, + "value": 24.77811171644336, + "x": "x_4", + "y": "y_16", + }, + Object { + "rectText": 31.313375862796256, + "value": 31.313375862796256, + "x": "x_4", + "y": "y_17", + }, + Object { + "rectText": 27.652138241890253, + "value": 27.652138241890253, + "x": "x_4", + "y": "y_18", + }, + Object { + "rectText": 31.65020848831535, + "value": 31.65020848831535, + "x": "x_4", + "y": "y_19", + }, + Object { + "rectText": 10.040502684649338, + "value": 10.040502684649338, + "x": "x_5", + "y": "y_0", + }, + Object { + "rectText": 9.18418261775059, + "value": 9.18418261775059, + "x": "x_5", + "y": "y_1", + }, + Object { + "rectText": -6.016235615271988, + "value": -6.016235615271988, + "x": "x_5", + "y": "y_2", + }, + Object { + "rectText": -6.833645216204284, + "value": -6.833645216204284, + "x": "x_5", + "y": "y_3", + }, + Object { + "rectText": -6.896721183137775, + "value": -6.896721183137775, + "x": "x_5", + "y": "y_4", + }, + Object { + "rectText": -2.108394838355938, + "value": -2.108394838355938, + "x": "x_5", + "y": "y_5", + }, + Object { + "rectText": -6.563883600581922, + "value": -6.563883600581922, + "x": "x_5", + "y": "y_6", + }, + Object { + "rectText": -8.630753569571617, + "value": -8.630753569571617, + "x": "x_5", + "y": "y_7", + }, + Object { + "rectText": -4.774743239794282, + "value": -4.774743239794282, + "x": "x_5", + "y": "y_8", + }, + Object { + "rectText": -2.0046315173801657, + "value": -2.0046315173801657, + "x": "x_5", + "y": "y_9", + }, + Object { + "rectText": -0.3597615447940745, + "value": -0.3597615447940745, + "x": "x_5", + "y": "y_10", + }, + Object { + "rectText": 2.8833642841959586, + "value": 2.8833642841959586, + "x": "x_5", + "y": "y_11", + }, + Object { + "rectText": -1.9343227464152601, + "value": -1.9343227464152601, + "x": "x_5", + "y": "y_12", + }, + Object { + "rectText": -5.206570891432279, + "value": -5.206570891432279, + "x": "x_5", + "y": "y_13", + }, + Object { + "rectText": -2.8320537701090256, + "value": -2.8320537701090256, + "x": "x_5", + "y": "y_14", + }, + Object { + "rectText": -0.3620931039471351, + "value": -0.3620931039471351, + "x": "x_5", + "y": "y_15", + }, + Object { + "rectText": -1.2825355952790376, + "value": -1.2825355952790376, + "x": "x_5", + "y": "y_16", + }, + Object { + "rectText": -1.937020141351771, + "value": -1.937020141351771, + "x": "x_5", + "y": "y_17", + }, + Object { + "rectText": -8.994598412149836, + "value": -8.994598412149836, + "x": "x_5", + "y": "y_18", + }, + Object { + "rectText": -6.747073251084499, + "value": -6.747073251084499, + "x": "x_5", + "y": "y_19", + }, + Object { + "rectText": 10.819974608119614, + "value": 10.819974608119614, + "x": "x_6", + "y": "y_0", + }, + Object { + "rectText": 18.052236884018036, + "value": 18.052236884018036, + "x": "x_6", + "y": "y_1", + }, + Object { + "rectText": 12.248777535804365, + "value": 12.248777535804365, + "x": "x_6", + "y": "y_2", + }, + Object { + "rectText": 9.969142303073252, + "value": 9.969142303073252, + "x": "x_6", + "y": "y_3", + }, + Object { + "rectText": 17.337127681913973, + "value": 17.337127681913973, + "x": "x_6", + "y": "y_4", + }, + Object { + "rectText": 16.027000754389025, + "value": 16.027000754389025, + "x": "x_6", + "y": "y_5", + }, + Object { + "rectText": 21.49865383744765, + "value": 21.49865383744765, + "x": "x_6", + "y": "y_6", + }, + Object { + "rectText": 18.920515851612024, + "value": 18.920515851612024, + "x": "x_6", + "y": "y_7", + }, + Object { + "rectText": 12.169188113505435, + "value": 12.169188113505435, + "x": "x_6", + "y": "y_8", + }, + Object { + "rectText": 23.75776947991829, + "value": 23.75776947991829, + "x": "x_6", + "y": "y_9", + }, + Object { + "rectText": 22.773438522174473, + "value": 22.773438522174473, + "x": "x_6", + "y": "y_10", + }, + Object { + "rectText": 21.05489065711163, + "value": 21.05489065711163, + "x": "x_6", + "y": "y_11", + }, + Object { + "rectText": 29.16438526268995, + "value": 29.16438526268995, + "x": "x_6", + "y": "y_12", + }, + Object { + "rectText": 29.755041090905404, + "value": 29.755041090905404, + "x": "x_6", + "y": "y_13", + }, + Object { + "rectText": 26.13796211607032, + "value": 26.13796211607032, + "x": "x_6", + "y": "y_14", + }, + Object { + "rectText": 28.91643855216486, + "value": 28.91643855216486, + "x": "x_6", + "y": "y_15", + }, + Object { + "rectText": 19.064261874916085, + "value": 19.064261874916085, + "x": "x_6", + "y": "y_16", + }, + Object { + "rectText": 14.893297536987049, + "value": 14.893297536987049, + "x": "x_6", + "y": "y_17", + }, + Object { + "rectText": 16.01202612993778, + "value": 16.01202612993778, + "x": "x_6", + "y": "y_18", + }, + Object { + "rectText": 10.677375854561543, + "value": 10.677375854561543, + "x": "x_6", + "y": "y_19", + }, + Object { + "rectText": 20.83991840239746, + "value": 20.83991840239746, + "x": "x_7", + "y": "y_0", + }, + Object { + "rectText": 32.088269277118485, + "value": 32.088269277118485, + "x": "x_7", + "y": "y_1", + }, + Object { + "rectText": 35.617617939013286, + "value": 35.617617939013286, + "x": "x_7", + "y": "y_2", + }, + Object { + "rectText": 46.34145242145437, + "value": 46.34145242145437, + "x": "x_7", + "y": "y_3", + }, + Object { + "rectText": 42.70107878756259, + "value": 42.70107878756259, + "x": "x_7", + "y": "y_4", + }, + Object { + "rectText": 40.70844626018491, + "value": 40.70844626018491, + "x": "x_7", + "y": "y_5", + }, + Object { + "rectText": 38.24729505908534, + "value": 38.24729505908534, + "x": "x_7", + "y": "y_6", + }, + Object { + "rectText": 41.961872256649784, + "value": 41.961872256649784, + "x": "x_7", + "y": "y_7", + }, + Object { + "rectText": 40.42317097918186, + "value": 40.42317097918186, + "x": "x_7", + "y": "y_8", + }, + Object { + "rectText": 42.681396519281044, + "value": 42.681396519281044, + "x": "x_7", + "y": "y_9", + }, + Object { + "rectText": 45.16830973647258, + "value": 45.16830973647258, + "x": "x_7", + "y": "y_10", + }, + Object { + "rectText": 45.54977153406254, + "value": 45.54977153406254, + "x": "x_7", + "y": "y_11", + }, + Object { + "rectText": 44.051494895676456, + "value": 44.051494895676456, + "x": "x_7", + "y": "y_12", + }, + Object { + "rectText": 35.45913888587404, + "value": 35.45913888587404, + "x": "x_7", + "y": "y_13", + }, + Object { + "rectText": 24.926244822709098, + "value": 24.926244822709098, + "x": "x_7", + "y": "y_14", + }, + Object { + "rectText": 11.188848304771073, + "value": 11.188848304771073, + "x": "x_7", + "y": "y_15", + }, + Object { + "rectText": 14.509555473536986, + "value": 14.509555473536986, + "x": "x_7", + "y": "y_16", + }, + Object { + "rectText": 23.629750932895455, + "value": 23.629750932895455, + "x": "x_7", + "y": "y_17", + }, + Object { + "rectText": 27.496822437992087, + "value": 27.496822437992087, + "x": "x_7", + "y": "y_18", + }, + Object { + "rectText": 18.290237353501528, + "value": 18.290237353501528, + "x": "x_7", + "y": "y_19", + }, + Object { + "rectText": 14.378243279399832, + "value": 14.378243279399832, + "x": "x_8", + "y": "y_0", + }, + Object { + "rectText": 15.862814449470617, + "value": 15.862814449470617, + "x": "x_8", + "y": "y_1", + }, + Object { + "rectText": 20.621055215762404, + "value": 20.621055215762404, + "x": "x_8", + "y": "y_2", + }, + Object { + "rectText": 27.310374393715577, + "value": 27.310374393715577, + "x": "x_8", + "y": "y_3", + }, + Object { + "rectText": 27.376076996458107, + "value": 27.376076996458107, + "x": "x_8", + "y": "y_4", + }, + Object { + "rectText": 25.966261645863177, + "value": 25.966261645863177, + "x": "x_8", + "y": "y_5", + }, + Object { + "rectText": 25.710457133039732, + "value": 25.710457133039732, + "x": "x_8", + "y": "y_6", + }, + Object { + "rectText": 30.992785862263872, + "value": 30.992785862263872, + "x": "x_8", + "y": "y_7", + }, + Object { + "rectText": 37.22474246115934, + "value": 37.22474246115934, + "x": "x_8", + "y": "y_8", + }, + Object { + "rectText": 44.65189694360409, + "value": 44.65189694360409, + "x": "x_8", + "y": "y_9", + }, + Object { + "rectText": 50.90620858214391, + "value": 50.90620858214391, + "x": "x_8", + "y": "y_10", + }, + Object { + "rectText": 54.790476948309696, + "value": 54.790476948309696, + "x": "x_8", + "y": "y_11", + }, + Object { + "rectText": 47.138525452751004, + "value": 47.138525452751004, + "x": "x_8", + "y": "y_12", + }, + Object { + "rectText": 48.543398737558654, + "value": 48.543398737558654, + "x": "x_8", + "y": "y_13", + }, + Object { + "rectText": 41.22820882460708, + "value": 41.22820882460708, + "x": "x_8", + "y": "y_14", + }, + Object { + "rectText": 43.30138646653476, + "value": 43.30138646653476, + "x": "x_8", + "y": "y_15", + }, + Object { + "rectText": 43.57067434580797, + "value": 43.57067434580797, + "x": "x_8", + "y": "y_16", + }, + Object { + "rectText": 41.77269087492713, + "value": 41.77269087492713, + "x": "x_8", + "y": "y_17", + }, + Object { + "rectText": 42.223038572972655, + "value": 42.223038572972655, + "x": "x_8", + "y": "y_18", + }, + Object { + "rectText": 44.04246479548906, + "value": 44.04246479548906, + "x": "x_8", + "y": "y_19", + }, + Object { + "rectText": 9.546437633051273, + "value": 9.546437633051273, + "x": "x_9", + "y": "y_0", + }, + Object { + "rectText": 20.517302217015732, + "value": 20.517302217015732, + "x": "x_9", + "y": "y_1", + }, + Object { + "rectText": 18.321563171124787, + "value": 18.321563171124787, + "x": "x_9", + "y": "y_2", + }, + Object { + "rectText": 15.451738777747869, + "value": 15.451738777747869, + "x": "x_9", + "y": "y_3", + }, + Object { + "rectText": 10.416788406228507, + "value": 10.416788406228507, + "x": "x_9", + "y": "y_4", + }, + Object { + "rectText": 0.9043901831061678, + "value": 0.9043901831061678, + "x": "x_9", + "y": "y_5", + }, + Object { + "rectText": 2.2251747151953722, + "value": 2.2251747151953722, + "x": "x_9", + "y": "y_6", + }, + Object { + "rectText": 0.3821317782171232, + "value": 0.3821317782171232, + "x": "x_9", + "y": "y_7", + }, + Object { + "rectText": 0.22091049853526112, + "value": 0.22091049853526112, + "x": "x_9", + "y": "y_8", + }, + Object { + "rectText": -3.233129329636757, + "value": -3.233129329636757, + "x": "x_9", + "y": "y_9", + }, + Object { + "rectText": -4.123416917882673, + "value": -4.123416917882673, + "x": "x_9", + "y": "y_10", + }, + Object { + "rectText": -1.1319446806674005, + "value": -1.1319446806674005, + "x": "x_9", + "y": "y_11", + }, + Object { + "rectText": -2.533067604753474, + "value": -2.533067604753474, + "x": "x_9", + "y": "y_12", + }, + Object { + "rectText": 3.274578409778302, + "value": 3.274578409778302, + "x": "x_9", + "y": "y_13", + }, + Object { + "rectText": 4.291828909220028, + "value": 4.291828909220028, + "x": "x_9", + "y": "y_14", + }, + Object { + "rectText": 5.000880279196099, + "value": 5.000880279196099, + "x": "x_9", + "y": "y_15", + }, + Object { + "rectText": 7.890650307112603, + "value": 7.890650307112603, + "x": "x_9", + "y": "y_16", + }, + Object { + "rectText": 9.082388429023517, + "value": 9.082388429023517, + "x": "x_9", + "y": "y_17", + }, + Object { + "rectText": 9.14302748045202, + "value": 9.14302748045202, + "x": "x_9", + "y": "y_18", + }, + Object { + "rectText": -0.9669084139974888, + "value": -0.9669084139974888, + "x": "x_9", + "y": "y_19", + }, + Object { + "rectText": 2.117430162487592, + "value": 2.117430162487592, + "x": "x_10", + "y": "y_0", + }, + Object { + "rectText": 1.5668378537843557, + "value": 1.5668378537843557, + "x": "x_10", + "y": "y_1", + }, + Object { + "rectText": 5.106104151848498, + "value": 5.106104151848498, + "x": "x_10", + "y": "y_2", + }, + Object { + "rectText": 6.691398648622392, + "value": 6.691398648622392, + "x": "x_10", + "y": "y_3", + }, + Object { + "rectText": 5.9545352540812, + "value": 5.9545352540812, + "x": "x_10", + "y": "y_4", + }, + Object { + "rectText": -0.6718858579700804, + "value": -0.6718858579700804, + "x": "x_10", + "y": "y_5", + }, + Object { + "rectText": -10.093623877175773, + "value": -10.093623877175773, + "x": "x_10", + "y": "y_6", + }, + Object { + "rectText": -9.481337721021028, + "value": -9.481337721021028, + "x": "x_10", + "y": "y_7", + }, + Object { + "rectText": -9.687370268531138, + "value": -9.687370268531138, + "x": "x_10", + "y": "y_8", + }, + Object { + "rectText": -11.7007015295863, + "value": -11.7007015295863, + "x": "x_10", + "y": "y_9", + }, + Object { + "rectText": -10.08874106711032, + "value": -10.08874106711032, + "x": "x_10", + "y": "y_10", + }, + Object { + "rectText": -6.836880142255078, + "value": -6.836880142255078, + "x": "x_10", + "y": "y_11", + }, + Object { + "rectText": 2.4604369987892873, + "value": 2.4604369987892873, + "x": "x_10", + "y": "y_12", + }, + Object { + "rectText": 7.640442280843416, + "value": 7.640442280843416, + "x": "x_10", + "y": "y_13", + }, + Object { + "rectText": 4.713688574820864, + "value": 4.713688574820864, + "x": "x_10", + "y": "y_14", + }, + Object { + "rectText": 1.955677009677276, + "value": 1.955677009677276, + "x": "x_10", + "y": "y_15", + }, + Object { + "rectText": 1.6731169765193206, + "value": 1.6731169765193206, + "x": "x_10", + "y": "y_16", + }, + Object { + "rectText": -6.034577415215565, + "value": -6.034577415215565, + "x": "x_10", + "y": "y_17", + }, + Object { + "rectText": -9.49672264010566, + "value": -9.49672264010566, + "x": "x_10", + "y": "y_18", + }, + Object { + "rectText": -10.02999798650989, + "value": -10.02999798650989, + "x": "x_10", + "y": "y_19", + }, + Object { + "rectText": 24.053122758748437, + "value": 24.053122758748437, + "x": "x_11", + "y": "y_0", + }, + Object { + "rectText": 19.031137709612036, + "value": 19.031137709612036, + "x": "x_11", + "y": "y_1", + }, + Object { + "rectText": 20.47764211274059, + "value": 20.47764211274059, + "x": "x_11", + "y": "y_2", + }, + Object { + "rectText": 14.55281641333698, + "value": 14.55281641333698, + "x": "x_11", + "y": "y_3", + }, + Object { + "rectText": 15.043018310072712, + "value": 15.043018310072712, + "x": "x_11", + "y": "y_4", + }, + Object { + "rectText": 2.6597070827875093, + "value": 2.6597070827875093, + "x": "x_11", + "y": "y_5", + }, + Object { + "rectText": 1.9137585062069147, + "value": 1.9137585062069147, + "x": "x_11", + "y": "y_6", + }, + Object { + "rectText": 1.6266164906990555, + "value": 1.6266164906990555, + "x": "x_11", + "y": "y_7", + }, + Object { + "rectText": 10.608534707379862, + "value": 10.608534707379862, + "x": "x_11", + "y": "y_8", + }, + Object { + "rectText": 8.768962763531919, + "value": 8.768962763531919, + "x": "x_11", + "y": "y_9", + }, + Object { + "rectText": 17.77058648507848, + "value": 17.77058648507848, + "x": "x_11", + "y": "y_10", + }, + Object { + "rectText": 15.502730715077965, + "value": 15.502730715077965, + "x": "x_11", + "y": "y_11", + }, + Object { + "rectText": 19.673236477344094, + "value": 19.673236477344094, + "x": "x_11", + "y": "y_12", + }, + Object { + "rectText": 6.615425581412669, + "value": 6.615425581412669, + "x": "x_11", + "y": "y_13", + }, + Object { + "rectText": 16.71505221410986, + "value": 16.71505221410986, + "x": "x_11", + "y": "y_14", + }, + Object { + "rectText": 17.279662785715818, + "value": 17.279662785715818, + "x": "x_11", + "y": "y_15", + }, + Object { + "rectText": 11.216733394728445, + "value": 11.216733394728445, + "x": "x_11", + "y": "y_16", + }, + Object { + "rectText": 26.401238496860607, + "value": 26.401238496860607, + "x": "x_11", + "y": "y_17", + }, + Object { + "rectText": 25.872388552562622, + "value": 25.872388552562622, + "x": "x_11", + "y": "y_18", + }, + Object { + "rectText": 26.331023176529538, + "value": 26.331023176529538, + "x": "x_11", + "y": "y_19", + }, + Object { + "rectText": 14.741753869753929, + "value": 14.741753869753929, + "x": "x_12", + "y": "y_0", + }, + Object { + "rectText": 12.133745300119848, + "value": 12.133745300119848, + "x": "x_12", + "y": "y_1", + }, + Object { + "rectText": 13.078423154116999, + "value": 13.078423154116999, + "x": "x_12", + "y": "y_2", + }, + Object { + "rectText": 31.321025344254267, + "value": 31.321025344254267, + "x": "x_12", + "y": "y_3", + }, + Object { + "rectText": 32.12573718137715, + "value": 32.12573718137715, + "x": "x_12", + "y": "y_4", + }, + Object { + "rectText": 36.093975687401766, + "value": 36.093975687401766, + "x": "x_12", + "y": "y_5", + }, + Object { + "rectText": 28.853944000537858, + "value": 28.853944000537858, + "x": "x_12", + "y": "y_6", + }, + Object { + "rectText": 20.52198483872326, + "value": 20.52198483872326, + "x": "x_12", + "y": "y_7", + }, + Object { + "rectText": 22.489367975650175, + "value": 22.489367975650175, + "x": "x_12", + "y": "y_8", + }, + Object { + "rectText": 21.48008268870696, + "value": 21.48008268870696, + "x": "x_12", + "y": "y_9", + }, + Object { + "rectText": 17.40525407651549, + "value": 17.40525407651549, + "x": "x_12", + "y": "y_10", + }, + Object { + "rectText": 16.434991284495794, + "value": 16.434991284495794, + "x": "x_12", + "y": "y_11", + }, + Object { + "rectText": 23.43582349379937, + "value": 23.43582349379937, + "x": "x_12", + "y": "y_12", + }, + Object { + "rectText": 27.520672134556655, + "value": 27.520672134556655, + "x": "x_12", + "y": "y_13", + }, + Object { + "rectText": 27.48982397761371, + "value": 27.48982397761371, + "x": "x_12", + "y": "y_14", + }, + Object { + "rectText": 26.178614647552152, + "value": 26.178614647552152, + "x": "x_12", + "y": "y_15", + }, + Object { + "rectText": 25.858459074516183, + "value": 25.858459074516183, + "x": "x_12", + "y": "y_16", + }, + Object { + "rectText": 30.051671106505943, + "value": 30.051671106505943, + "x": "x_12", + "y": "y_17", + }, + Object { + "rectText": 29.591488992612543, + "value": 29.591488992612543, + "x": "x_12", + "y": "y_18", + }, + Object { + "rectText": 23.744787277420585, + "value": 23.744787277420585, + "x": "x_12", + "y": "y_19", + }, + Object { + "rectText": 11.223068582526338, + "value": 11.223068582526338, + "x": "x_13", + "y": "y_0", + }, + Object { + "rectText": 8.724453334098921, + "value": 8.724453334098921, + "x": "x_13", + "y": "y_1", + }, + Object { + "rectText": 4.270904076038434, + "value": 4.270904076038434, + "x": "x_13", + "y": "y_2", + }, + Object { + "rectText": 9.311054030160307, + "value": 9.311054030160307, + "x": "x_13", + "y": "y_3", + }, + Object { + "rectText": 11.294834569956391, + "value": 11.294834569956391, + "x": "x_13", + "y": "y_4", + }, + Object { + "rectText": 12.79240265673884, + "value": 12.79240265673884, + "x": "x_13", + "y": "y_5", + }, + Object { + "rectText": 9.119846857537635, + "value": 9.119846857537635, + "x": "x_13", + "y": "y_6", + }, + Object { + "rectText": 9.822475957217343, + "value": 9.822475957217343, + "x": "x_13", + "y": "y_7", + }, + Object { + "rectText": 10.669348146795615, + "value": 10.669348146795615, + "x": "x_13", + "y": "y_8", + }, + Object { + "rectText": 11.750650693071353, + "value": 11.750650693071353, + "x": "x_13", + "y": "y_9", + }, + Object { + "rectText": 19.428287067763215, + "value": 19.428287067763215, + "x": "x_13", + "y": "y_10", + }, + Object { + "rectText": 20.05330736176254, + "value": 20.05330736176254, + "x": "x_13", + "y": "y_11", + }, + Object { + "rectText": 18.46461800040717, + "value": 18.46461800040717, + "x": "x_13", + "y": "y_12", + }, + Object { + "rectText": 17.13948338893387, + "value": 17.13948338893387, + "x": "x_13", + "y": "y_13", + }, + Object { + "rectText": 14.998235183145638, + "value": 14.998235183145638, + "x": "x_13", + "y": "y_14", + }, + Object { + "rectText": 21.57198989722974, + "value": 21.57198989722974, + "x": "x_13", + "y": "y_15", + }, + Object { + "rectText": 18.23274943606415, + "value": 18.23274943606415, + "x": "x_13", + "y": "y_16", + }, + Object { + "rectText": 23.834062269627154, + "value": 23.834062269627154, + "x": "x_13", + "y": "y_17", + }, + Object { + "rectText": 17.887210405056912, + "value": 17.887210405056912, + "x": "x_13", + "y": "y_18", + }, + Object { + "rectText": 21.58401811955205, + "value": 21.58401811955205, + "x": "x_13", + "y": "y_19", + }, + Object { + "rectText": 2.9058799108357736, + "value": 2.9058799108357736, + "x": "x_14", + "y": "y_0", + }, + Object { + "rectText": 8.972456038301432, + "value": 8.972456038301432, + "x": "x_14", + "y": "y_1", + }, + Object { + "rectText": 10.32885307002288, + "value": 10.32885307002288, + "x": "x_14", + "y": "y_2", + }, + Object { + "rectText": 12.004790333591908, + "value": 12.004790333591908, + "x": "x_14", + "y": "y_3", + }, + Object { + "rectText": 16.313424113247194, + "value": 16.313424113247194, + "x": "x_14", + "y": "y_4", + }, + Object { + "rectText": 16.292076219475025, + "value": 16.292076219475025, + "x": "x_14", + "y": "y_5", + }, + Object { + "rectText": 16.770107402461807, + "value": 16.770107402461807, + "x": "x_14", + "y": "y_6", + }, + Object { + "rectText": 15.658011352744083, + "value": 15.658011352744083, + "x": "x_14", + "y": "y_7", + }, + Object { + "rectText": 13.95650541886101, + "value": 13.95650541886101, + "x": "x_14", + "y": "y_8", + }, + Object { + "rectText": 10.314016323078881, + "value": 10.314016323078881, + "x": "x_14", + "y": "y_9", + }, + Object { + "rectText": 10.154808609159593, + "value": 10.154808609159593, + "x": "x_14", + "y": "y_10", + }, + Object { + "rectText": 2.3102989662620654, + "value": 2.3102989662620654, + "x": "x_14", + "y": "y_11", + }, + Object { + "rectText": 3.2513035287755745, + "value": 3.2513035287755745, + "x": "x_14", + "y": "y_12", + }, + Object { + "rectText": -0.7130168306222968, + "value": -0.7130168306222968, + "x": "x_14", + "y": "y_13", + }, + Object { + "rectText": -1.0419904618770504, + "value": -1.0419904618770504, + "x": "x_14", + "y": "y_14", + }, + Object { + "rectText": -1.3161643920050667, + "value": -1.3161643920050667, + "x": "x_14", + "y": "y_15", + }, + Object { + "rectText": -1.5424885952686824, + "value": -1.5424885952686824, + "x": "x_14", + "y": "y_16", + }, + Object { + "rectText": -3.561155588342318, + "value": -3.561155588342318, + "x": "x_14", + "y": "y_17", + }, + Object { + "rectText": -5.273287251587566, + "value": -5.273287251587566, + "x": "x_14", + "y": "y_18", + }, + Object { + "rectText": -5.054619683005746, + "value": -5.054619683005746, + "x": "x_14", + "y": "y_19", + }, + Object { + "rectText": 12.523922839169199, + "value": 12.523922839169199, + "x": "x_15", + "y": "y_0", + }, + Object { + "rectText": 9.771921362871048, + "value": 9.771921362871048, + "x": "x_15", + "y": "y_1", + }, + Object { + "rectText": 11.953280688550777, + "value": 11.953280688550777, + "x": "x_15", + "y": "y_2", + }, + Object { + "rectText": 13.059625413572078, + "value": 13.059625413572078, + "x": "x_15", + "y": "y_3", + }, + Object { + "rectText": 15.444451104553893, + "value": 15.444451104553893, + "x": "x_15", + "y": "y_4", + }, + Object { + "rectText": 13.792475502830154, + "value": 13.792475502830154, + "x": "x_15", + "y": "y_5", + }, + Object { + "rectText": 7.3577813910229235, + "value": 7.3577813910229235, + "x": "x_15", + "y": "y_6", + }, + Object { + "rectText": 12.855391500184762, + "value": 12.855391500184762, + "x": "x_15", + "y": "y_7", + }, + Object { + "rectText": 6.839552569406474, + "value": 6.839552569406474, + "x": "x_15", + "y": "y_8", + }, + Object { + "rectText": 6.044971885000999, + "value": 6.044971885000999, + "x": "x_15", + "y": "y_9", + }, + Object { + "rectText": 9.41560200751194, + "value": 9.41560200751194, + "x": "x_15", + "y": "y_10", + }, + Object { + "rectText": 6.6400837474901095, + "value": 6.6400837474901095, + "x": "x_15", + "y": "y_11", + }, + Object { + "rectText": 7.4638277204597046, + "value": 7.4638277204597046, + "x": "x_15", + "y": "y_12", + }, + Object { + "rectText": 3.4923248627721257, + "value": 3.4923248627721257, + "x": "x_15", + "y": "y_13", + }, + Object { + "rectText": -0.1509352342460648, + "value": -0.1509352342460648, + "x": "x_15", + "y": "y_14", + }, + Object { + "rectText": -9.439334496282449, + "value": -9.439334496282449, + "x": "x_15", + "y": "y_15", + }, + Object { + "rectText": -9.408565254995368, + "value": -9.408565254995368, + "x": "x_15", + "y": "y_16", + }, + Object { + "rectText": -10.717340944667358, + "value": -10.717340944667358, + "x": "x_15", + "y": "y_17", + }, + Object { + "rectText": -12.231659074097587, + "value": -12.231659074097587, + "x": "x_15", + "y": "y_18", + }, + Object { + "rectText": -12.304220941049874, + "value": -12.304220941049874, + "x": "x_15", + "y": "y_19", + }, + Object { + "rectText": 12.426446278371158, + "value": 12.426446278371158, + "x": "x_16", + "y": "y_0", + }, + Object { + "rectText": 4.761205803361531, + "value": 4.761205803361531, + "x": "x_16", + "y": "y_1", + }, + Object { + "rectText": 1.5514493835400103, + "value": 1.5514493835400103, + "x": "x_16", + "y": "y_2", + }, + Object { + "rectText": 10.25485330260371, + "value": 10.25485330260371, + "x": "x_16", + "y": "y_3", + }, + Object { + "rectText": 10.443516068409753, + "value": 10.443516068409753, + "x": "x_16", + "y": "y_4", + }, + Object { + "rectText": 9.90068532879486, + "value": 9.90068532879486, + "x": "x_16", + "y": "y_5", + }, + Object { + "rectText": 5.875139865786533, + "value": 5.875139865786533, + "x": "x_16", + "y": "y_6", + }, + Object { + "rectText": 10.723957376497331, + "value": 10.723957376497331, + "x": "x_16", + "y": "y_7", + }, + Object { + "rectText": 2.066756467090924, + "value": 2.066756467090924, + "x": "x_16", + "y": "y_8", + }, + Object { + "rectText": 0.39568846222827236, + "value": 0.39568846222827236, + "x": "x_16", + "y": "y_9", + }, + Object { + "rectText": 1.9106824056688325, + "value": 1.9106824056688325, + "x": "x_16", + "y": "y_10", + }, + Object { + "rectText": 3.4554008460006247, + "value": 3.4554008460006247, + "x": "x_16", + "y": "y_11", + }, + Object { + "rectText": 5.836414662127938, + "value": 5.836414662127938, + "x": "x_16", + "y": "y_12", + }, + Object { + "rectText": 10.663420634170265, + "value": 10.663420634170265, + "x": "x_16", + "y": "y_13", + }, + Object { + "rectText": 11.562765259884168, + "value": 11.562765259884168, + "x": "x_16", + "y": "y_14", + }, + Object { + "rectText": 18.312638310718047, + "value": 18.312638310718047, + "x": "x_16", + "y": "y_15", + }, + Object { + "rectText": 24.78142561950699, + "value": 24.78142561950699, + "x": "x_16", + "y": "y_16", + }, + Object { + "rectText": 25.98741506616426, + "value": 25.98741506616426, + "x": "x_16", + "y": "y_17", + }, + Object { + "rectText": 25.21878307435221, + "value": 25.21878307435221, + "x": "x_16", + "y": "y_18", + }, + Object { + "rectText": 22.0278850405599, + "value": 22.0278850405599, + "x": "x_16", + "y": "y_19", + }, + Object { + "rectText": 15.786820017213348, + "value": 15.786820017213348, + "x": "x_17", + "y": "y_0", + }, + Object { + "rectText": 23.82727745555418, + "value": 23.82727745555418, + "x": "x_17", + "y": "y_1", + }, + Object { + "rectText": 28.102083355215736, + "value": 28.102083355215736, + "x": "x_17", + "y": "y_2", + }, + Object { + "rectText": 29.181400631242038, + "value": 29.181400631242038, + "x": "x_17", + "y": "y_3", + }, + Object { + "rectText": 33.07558322142471, + "value": 33.07558322142471, + "x": "x_17", + "y": "y_4", + }, + Object { + "rectText": 36.74806639404701, + "value": 36.74806639404701, + "x": "x_17", + "y": "y_5", + }, + Object { + "rectText": 39.12143717188403, + "value": 39.12143717188403, + "x": "x_17", + "y": "y_6", + }, + Object { + "rectText": 41.76485494373556, + "value": 41.76485494373556, + "x": "x_17", + "y": "y_7", + }, + Object { + "rectText": 54.581934085152405, + "value": 54.581934085152405, + "x": "x_17", + "y": "y_8", + }, + Object { + "rectText": 56.79992555682459, + "value": 56.79992555682459, + "x": "x_17", + "y": "y_9", + }, + Object { + "rectText": 55.50321452563245, + "value": 55.50321452563245, + "x": "x_17", + "y": "y_10", + }, + Object { + "rectText": 54.703320294165096, + "value": 54.703320294165096, + "x": "x_17", + "y": "y_11", + }, + Object { + "rectText": 63.63736027633095, + "value": 63.63736027633095, + "x": "x_17", + "y": "y_12", + }, + Object { + "rectText": 62.79712211239938, + "value": 62.79712211239938, + "x": "x_17", + "y": "y_13", + }, + Object { + "rectText": 54.381939331520186, + "value": 54.381939331520186, + "x": "x_17", + "y": "y_14", + }, + Object { + "rectText": 54.77270799612626, + "value": 54.77270799612626, + "x": "x_17", + "y": "y_15", + }, + Object { + "rectText": 55.72892300395096, + "value": 55.72892300395096, + "x": "x_17", + "y": "y_16", + }, + Object { + "rectText": 55.13836837404197, + "value": 55.13836837404197, + "x": "x_17", + "y": "y_17", + }, + Object { + "rectText": 55.4498407189013, + "value": 55.4498407189013, + "x": "x_17", + "y": "y_18", + }, + Object { + "rectText": 68.76140423378733, + "value": 68.76140423378733, + "x": "x_17", + "y": "y_19", + }, + Object { + "rectText": 25.828355052498736, + "value": 25.828355052498736, + "x": "x_18", + "y": "y_0", + }, + Object { + "rectText": 14.369250386770794, + "value": 14.369250386770794, + "x": "x_18", + "y": "y_1", + }, + Object { + "rectText": 11.122082151320692, + "value": 11.122082151320692, + "x": "x_18", + "y": "y_2", + }, + Object { + "rectText": 17.203123079730577, + "value": 17.203123079730577, + "x": "x_18", + "y": "y_3", + }, + Object { + "rectText": 22.67825393852671, + "value": 22.67825393852671, + "x": "x_18", + "y": "y_4", + }, + Object { + "rectText": 26.577346684827898, + "value": 26.577346684827898, + "x": "x_18", + "y": "y_5", + }, + Object { + "rectText": 1.341905660672623, + "value": 1.341905660672623, + "x": "x_18", + "y": "y_6", + }, + Object { + "rectText": 2.2340479176319485, + "value": 2.2340479176319485, + "x": "x_18", + "y": "y_7", + }, + Object { + "rectText": 3.5319443821756225, + "value": 3.5319443821756225, + "x": "x_18", + "y": "y_8", + }, + Object { + "rectText": 9.686881597266042, + "value": 9.686881597266042, + "x": "x_18", + "y": "y_9", + }, + Object { + "rectText": -1.086930629298445, + "value": -1.086930629298445, + "x": "x_18", + "y": "y_10", + }, + Object { + "rectText": -3.275155410653531, + "value": -3.275155410653531, + "x": "x_18", + "y": "y_11", + }, + Object { + "rectText": -2.3182235215935463, + "value": -2.3182235215935463, + "x": "x_18", + "y": "y_12", + }, + Object { + "rectText": -7.102421907260435, + "value": -7.102421907260435, + "x": "x_18", + "y": "y_13", + }, + Object { + "rectText": -15.369316543252658, + "value": -15.369316543252658, + "x": "x_18", + "y": "y_14", + }, + Object { + "rectText": -13.618633943842825, + "value": -13.618633943842825, + "x": "x_18", + "y": "y_15", + }, + Object { + "rectText": -6.132435488791322, + "value": -6.132435488791322, + "x": "x_18", + "y": "y_16", + }, + Object { + "rectText": -12.222227236438126, + "value": -12.222227236438126, + "x": "x_18", + "y": "y_17", + }, + Object { + "rectText": -16.160855914516, + "value": -16.160855914516, + "x": "x_18", + "y": "y_18", + }, + Object { + "rectText": -11.104838839030073, + "value": -11.104838839030073, + "x": "x_18", + "y": "y_19", + }, + Object { + "rectText": 15.884458175971286, + "value": 15.884458175971286, + "x": "x_19", + "y": "y_0", + }, + Object { + "rectText": 9.730029718884163, + "value": 9.730029718884163, + "x": "x_19", + "y": "y_1", + }, + Object { + "rectText": 17.271525748515398, + "value": 17.271525748515398, + "x": "x_19", + "y": "y_2", + }, + Object { + "rectText": 15.96262678993938, + "value": 15.96262678993938, + "x": "x_19", + "y": "y_3", + }, + Object { + "rectText": 14.910979364805373, + "value": 14.910979364805373, + "x": "x_19", + "y": "y_4", + }, + Object { + "rectText": 16.005211030243927, + "value": 16.005211030243927, + "x": "x_19", + "y": "y_5", + }, + Object { + "rectText": 16.777803239858564, + "value": 16.777803239858564, + "x": "x_19", + "y": "y_6", + }, + Object { + "rectText": 16.088953253894616, + "value": 16.088953253894616, + "x": "x_19", + "y": "y_7", + }, + Object { + "rectText": 24.532968918280666, + "value": 24.532968918280666, + "x": "x_19", + "y": "y_8", + }, + Object { + "rectText": 29.573837224244713, + "value": 29.573837224244713, + "x": "x_19", + "y": "y_9", + }, + Object { + "rectText": 29.942519927990794, + "value": 29.942519927990794, + "x": "x_19", + "y": "y_10", + }, + Object { + "rectText": 34.69783250602105, + "value": 34.69783250602105, + "x": "x_19", + "y": "y_11", + }, + Object { + "rectText": 28.362102774855607, + "value": 28.362102774855607, + "x": "x_19", + "y": "y_12", + }, + Object { + "rectText": 25.96909143426486, + "value": 25.96909143426486, + "x": "x_19", + "y": "y_13", + }, + Object { + "rectText": 25.018616836414115, + "value": 25.018616836414115, + "x": "x_19", + "y": "y_14", + }, + Object { + "rectText": 34.04601203745518, + "value": 34.04601203745518, + "x": "x_19", + "y": "y_15", + }, + Object { + "rectText": 32.12418971970468, + "value": 32.12418971970468, + "x": "x_19", + "y": "y_16", + }, + Object { + "rectText": 30.768724196434682, + "value": 30.768724196434682, + "x": "x_19", + "y": "y_17", + }, + Object { + "rectText": 32.26936734704534, + "value": 32.26936734704534, + "x": "x_19", + "y": "y_18", + }, + Object { + "rectText": 32.93901719565705, + "value": 32.93901719565705, + "x": "x_19", + "y": "y_19", + }, + ], + "legend": "", + "value": 0, + }, + ], + "domainValuesForColorScale": Array [ + -16.160855914516, + -6.8876661903012195, + 2.3855235339135596, + 11.65871325812834, + 20.931902982343118, + 30.2050927065579, + 39.47828243077268, + 48.75147215498746, + 58.024661879202235, + 67.29785160341703, + 76.5710413276318, + ], + "hideLegend": true, + "rangeValuesForColorScale": Array [ + "rgb(158,1,66)", + "rgb(213,62,79)", + "rgb(244,109,67)", + "rgb(253,174,97)", + "rgb(254,224,139)", + "rgb(255,255,191)", + "rgb(230,245,152)", + "rgb(171,221,164)", + "rgb(102,194,165)", + "rgb(50,136,189)", + "rgb(94,79,162)", + ], + "showYAxisLables": true, + "sortOrder": "none", + "xAxisTitle": "", + "yAxisTitle": "", +} +`; + +exports[`transform Plotly Json To chart Props transformPlotlyJsonToHorizontalBarWithAxisProps - Should return HBC with axis chart props 1`] = ` +Object { + "barHeight": 12.662117371807371, + "chartTitle": "PHP Framework Popularity at Work - SitePoint, 2015", + "data": Array [ + Object { + "color": "#4f6bed", + "legend": "Aura", + "x": 10, + "y": "Aura", + }, + Object { + "color": "#d0b232", + "legend": "Drupal", + "x": 11, + "y": "Drupal", + }, + Object { + "color": "#c36bd1", + "legend": "TYPO3 Flow", + "x": 17, + "y": "TYPO3 Flow", + }, + Object { + "color": "#73aa24", + "legend": "FuelPHP", + "x": 25, + "y": "FuelPHP", + }, + Object { + "color": "#d77440", + "legend": "Kohana", + "x": 35, + "y": "Kohana", + }, + Object { + "color": "#4fa1e1", + "legend": "Typo 3", + "x": 35, + "y": "Typo 3", + }, + Object { + "color": "#27ac22", + "legend": "Simple MVC Framework", + "x": 42, + "y": "Simple MVC Framework", + }, + Object { + "color": "#a083c9", + "legend": "Silex", + "x": 65, + "y": "Silex", + }, + Object { + "color": "#4cb4b7", + "legend": "Slim", + "x": 79, + "y": "Slim", + }, + Object { + "color": "#ee5fb7", + "legend": "Phalcon", + "x": 169, + "y": "Phalcon", + }, + Object { + "color": "#93a4f4", + "legend": "We use a CMS for everything", + "x": 203, + "y": "We use a CMS for everything", + }, + Object { + "color": "#ae8c00", + "legend": "No Framework", + "x": 243, + "y": "No Framework", + }, + Object { + "color": "#b146c2", + "legend": "CakePHP", + "x": 255, + "y": "CakePHP", + }, + Object { + "color": "#57811b", + "legend": "Zend Framework 1", + "x": 274, + "y": "Zend Framework 1", + }, + Object { + "color": "#ca5010", + "legend": "Company Internal Framework", + "x": 378, + "y": "Company Internal Framework", + }, + Object { + "color": "#3a96dd", + "legend": "Zend Framework 2", + "x": 390, + "y": "Zend Framework 2", + }, + Object { + "color": "#13a10e", + "legend": "Yii 1", + "x": 407, + "y": "Yii 1", + }, + Object { + "color": "#9373c0", + "legend": "PHPixie", + "x": 418, + "y": "PHPixie", + }, + Object { + "color": "#2aa0a4", + "legend": "Yii 2", + "x": 504, + "y": "Yii 2", + }, + Object { + "color": "#e3008c", + "legend": "CodeIgniter", + "x": 597, + "y": "CodeIgniter", + }, + Object { + "color": "#637cef", + "legend": "Nette", + "x": 671, + "y": "Nette", + }, + Object { + "color": "#dac157", + "legend": "Symfony2", + "x": 1067, + "y": "Symfony2", + }, + Object { + "color": "#cf87da", + "legend": "Laravel", + "x": 1659, + "y": "Laravel", + }, + ], + "secondaryYAxistitle": "", + "showYAxisLables": true, + "styles": Object { + "root": Object { + "height": 742, + "width": 850, + }, + }, + "xAxisTitle": "Votes", + "yAxisTitle": "Framework", +} +`; + +exports[`transform Plotly Json To chart Props transformPlotlyJsonToSankeyProps - Should return sankey chart props 1`] = ` +Object { + "data": Object { + "SankeyChartData": Object { + "links": Array [ + Object { + "source": 0, + "target": 5, + "value": 20, + }, + Object { + "source": 0, + "target": 6, + "value": 3, + }, + Object { + "source": 0, + "target": 7, + "value": 5, + }, + Object { + "source": 1, + "target": 5, + "value": 14, + }, + Object { + "source": 1, + "target": 6, + "value": 1, + }, + Object { + "source": 1, + "target": 7, + "value": 1, + }, + Object { + "source": 2, + "target": 5, + "value": 3, + }, + Object { + "source": 2, + "target": 6, + "value": 17, + }, + Object { + "source": 2, + "target": 7, + "value": 2, + }, + Object { + "source": 3, + "target": 5, + "value": 3, + }, + Object { + "source": 3, + "target": 6, + "value": 9, + }, + Object { + "source": 3, + "target": 7, + "value": 2, + }, + Object { + "source": 4, + "target": 5, + "value": 5, + }, + Object { + "source": 4, + "target": 6, + "value": 9, + }, + Object { + "source": 4, + "target": 7, + "value": 8, + }, + ], + "nodes": Array [ + Object { + "color": "#ea38a6", + "name": "Remain+No – 28", + "nodeId": 0, + }, + Object { + "color": "#038387", + "name": "Leave+No – 16", + "nodeId": 1, + }, + Object { + "color": "#8764b8", + "name": "Remain+Yes – 21", + "nodeId": 2, + }, + Object { + "color": "#11910d", + "name": "Leave+Yes – 14", + "nodeId": 3, + }, + Object { + "color": "#3487c7", + "name": "Didn’t vote in at least one referendum – 21", + "nodeId": 4, + }, + Object { + "color": "#d06228", + "name": "46 – No", + "nodeId": 5, + }, + Object { + "color": "#689920", + "name": "39 – Yes", + "nodeId": 6, + }, + Object { + "color": "#ba58c9", + "name": "14 – Don’t know / would not vote", + "nodeId": 7, + }, + ], + }, + "chartTitle": "Scottish Referendum Voters who now want Independence", + }, + "enableReflow": true, + "height": 772, + "shouldResize": 1212, + "styles": Object { + "root": Object { + "fontSize": 10, + }, + }, + "width": 440, +} +`; + +exports[`transform Plotly Json To chart Props transformPlotlyJsonToScatterChartProps - Should return area chart props 1`] = ` +Object { + "data": Object { + "chartTitle": "", + "lineChartData": Array [ + Object { + "color": "#f7adda", + "data": Array [ + Object { + "x": 0, + "y": 0.17048910089864067, + }, + Object { + "x": 1, + "y": 0.05390702725063046, + }, + Object { + "x": 2, + "y": 0.7560889217240573, + }, + Object { + "x": 3, + "y": 0.7393313216390578, + }, + Object { + "x": 4, + "y": 0.7562979443674754, + }, + Object { + "x": 5, + "y": 0.983908108492343, + }, + Object { + "x": 6, + "y": 0.4552096139092071, + }, + Object { + "x": 7, + "y": 0.751939393026647, + }, + Object { + "x": 8, + "y": 0.42441695150031034, + }, + Object { + "x": 9, + "y": 0.6119820237450841, + }, + ], + "legend": "a", + }, + Object { + "color": "#9bd9db", + "data": Array [ + Object { + "x": 0, + "y": 1.0921498980687505, + }, + Object { + "x": 1, + "y": 0.628379692444796, + }, + Object { + "x": 2, + "y": 1.6804387333467445, + }, + Object { + "x": 3, + "y": 1.1741874271317159, + }, + Object { + "x": 4, + "y": 1.7098535938519392, + }, + Object { + "x": 5, + "y": 1.0165440369832146, + }, + Object { + "x": 6, + "y": 0.8201578488720772, + }, + Object { + "x": 7, + "y": 1.019179653143562, + }, + Object { + "x": 8, + "y": 0.5391840333768539, + }, + Object { + "x": 9, + "y": 0.9023036941696878, + }, + ], + "legend": "b", + }, + Object { + "color": "#b29ad4", + "data": Array [ + Object { + "x": 0, + "y": 1.5084498776097979, + }, + Object { + "x": 1, + "y": 1.0993096327196032, + }, + Object { + "x": 2, + "y": 2.5468884763826125, + }, + Object { + "x": 3, + "y": 1.3139261978658, + }, + Object { + "x": 4, + "y": 1.7288516603693358, + }, + Object { + "x": 5, + "y": 1.3500413551768342, + }, + Object { + "x": 6, + "y": 1.4111774146124456, + }, + Object { + "x": 7, + "y": 1.1245312639069405, + }, + Object { + "x": 8, + "y": 1.4068617318281056, + }, + Object { + "x": 9, + "y": 0.9236499701488171, + }, + ], + "legend": "c", + }, + Object { + "color": "#a4cc6c", + "data": Array [ + Object { + "x": 0, + "y": 1.912915766078795, + }, + Object { + "x": 1, + "y": 1.6450103381519354, + }, + Object { + "x": 2, + "y": 3.523866933241722, + }, + Object { + "x": 3, + "y": 1.656799203492564, + }, + Object { + "x": 4, + "y": 2.666064160881149, + }, + Object { + "x": 5, + "y": 2.2985767814076814, + }, + Object { + "x": 6, + "y": 1.6491300653173326, + }, + Object { + "x": 7, + "y": 1.2880873970749964, + }, + Object { + "x": 8, + "y": 2.192375146193222, + }, + Object { + "x": 9, + "y": 1.6271909616796654, + }, + ], + "legend": "d", + }, + ], + }, + "mode": "tonexty", + "supportNegativeData": true, + "xAxisTitle": "", + "yAxisTitle": "", +} +`; + +exports[`transform Plotly Json To chart Props transformPlotlyJsonToScatterChartProps - Should return line chart props 1`] = ` +Object { + "data": Object { + "chartTitle": "", + "lineChartData": Array [ + Object { + "color": "#a7e3a5", + "data": Array [ + Object { + "x": 2015-01-01T00:00:00.000Z, + "y": 0.5353935439391206, + }, + Object { + "x": 2015-01-02T00:00:00.000Z, + "y": -0.3510205670171982, + }, + Object { + "x": 2015-01-03T00:00:00.000Z, + "y": -1.3420793330744663, + }, + Object { + "x": 2015-01-04T00:00:00.000Z, + "y": -1.683479706754631, + }, + Object { + "x": 2015-01-05T00:00:00.000Z, + "y": -2.0207368899942826, + }, + Object { + "x": 2015-01-06T00:00:00.000Z, + "y": 0.006604084375472663, + }, + Object { + "x": 2015-01-07T00:00:00.000Z, + "y": 0.8037048387382045, + }, + Object { + "x": 2015-01-08T00:00:00.000Z, + "y": 1.6685589999803645, + }, + Object { + "x": 2015-01-09T00:00:00.000Z, + "y": 1.2683547027403048, + }, + Object { + "x": 2015-01-10T00:00:00.000Z, + "y": -1.3330462677331034, + }, + Object { + "x": 2015-01-11T00:00:00.000Z, + "y": -1.8663123665480104, + }, + Object { + "x": 2015-01-12T00:00:00.000Z, + "y": -2.8051461261147357, + }, + Object { + "x": 2015-01-13T00:00:00.000Z, + "y": -4.563508055068453, + }, + Object { + "x": 2015-01-14T00:00:00.000Z, + "y": -3.7591847216910996, + }, + Object { + "x": 2015-01-15T00:00:00.000Z, + "y": -3.5134185618878746, + }, + Object { + "x": 2015-01-16T00:00:00.000Z, + "y": -5.3419268826351995, + }, + Object { + "x": 2015-01-17T00:00:00.000Z, + "y": -3.332156069299614, + }, + Object { + "x": 2015-01-18T00:00:00.000Z, + "y": -3.5678897362109545, + }, + Object { + "x": 2015-01-19T00:00:00.000Z, + "y": -3.8548236009547465, + }, + Object { + "x": 2015-01-20T00:00:00.000Z, + "y": -4.58628192762981, + }, + Object { + "x": 2015-01-21T00:00:00.000Z, + "y": -4.116554826788904, + }, + Object { + "x": 2015-01-22T00:00:00.000Z, + "y": -2.7610003378381496, + }, + Object { + "x": 2015-01-23T00:00:00.000Z, + "y": -2.621859111953831, + }, + Object { + "x": 2015-01-24T00:00:00.000Z, + "y": -2.6349689848833315, + }, + Object { + "x": 2015-01-25T00:00:00.000Z, + "y": -2.0581142585936076, + }, + Object { + "x": 2015-01-26T00:00:00.000Z, + "y": -0.7744078058377932, + }, + Object { + "x": 2015-01-27T00:00:00.000Z, + "y": 0.9002451055355818, + }, + Object { + "x": 2015-01-28T00:00:00.000Z, + "y": 0.8373590393039949, + }, + Object { + "x": 2015-01-29T00:00:00.000Z, + "y": 0.5532093840234236, + }, + Object { + "x": 2015-01-30T00:00:00.000Z, + "y": 1.469976651890828, + }, + Object { + "x": 2015-01-31T00:00:00.000Z, + "y": 3.1860367266233904, + }, + Object { + "x": 2015-02-01T00:00:00.000Z, + "y": 2.493612510772345, + }, + Object { + "x": 2015-02-02T00:00:00.000Z, + "y": 1.9464391258267615, + }, + Object { + "x": 2015-02-03T00:00:00.000Z, + "y": 1.8807283125005585, + }, + Object { + "x": 2015-02-04T00:00:00.000Z, + "y": 3.0189402685173534, + }, + Object { + "x": 2015-02-05T00:00:00.000Z, + "y": 4.556005864163605, + }, + Object { + "x": 2015-02-06T00:00:00.000Z, + "y": 5.516442345945973, + }, + Object { + "x": 2015-02-07T00:00:00.000Z, + "y": 4.319606652282435, + }, + Object { + "x": 2015-02-08T00:00:00.000Z, + "y": 6.845756127344204, + }, + Object { + "x": 2015-02-09T00:00:00.000Z, + "y": 7.053236096270982, + }, + Object { + "x": 2015-02-10T00:00:00.000Z, + "y": 7.681494725458877, + }, + Object { + "x": 2015-02-11T00:00:00.000Z, + "y": 7.526563745782537, + }, + Object { + "x": 2015-02-12T00:00:00.000Z, + "y": 8.858342186205558, + }, + Object { + "x": 2015-02-13T00:00:00.000Z, + "y": 9.021889375014881, + }, + Object { + "x": 2015-02-14T00:00:00.000Z, + "y": 8.209805336778926, + }, + Object { + "x": 2015-02-15T00:00:00.000Z, + "y": 9.383959972549016, + }, + Object { + "x": 2015-02-16T00:00:00.000Z, + "y": 11.195848970970625, + }, + Object { + "x": 2015-02-17T00:00:00.000Z, + "y": 12.561537445362251, + }, + Object { + "x": 2015-02-18T00:00:00.000Z, + "y": 14.373511358982237, + }, + Object { + "x": 2015-02-19T00:00:00.000Z, + "y": 15.887456275652418, + }, + Object { + "x": 2015-02-20T00:00:00.000Z, + "y": 14.491455240251522, + }, + Object { + "x": 2015-02-21T00:00:00.000Z, + "y": 15.199461217404735, + }, + Object { + "x": 2015-02-22T00:00:00.000Z, + "y": 16.378844807972094, + }, + Object { + "x": 2015-02-23T00:00:00.000Z, + "y": 14.348345501207364, + }, + Object { + "x": 2015-02-24T00:00:00.000Z, + "y": 14.961597203409823, + }, + Object { + "x": 2015-02-25T00:00:00.000Z, + "y": 15.457566696478484, + }, + Object { + "x": 2015-02-26T00:00:00.000Z, + "y": 14.942769687687289, + }, + Object { + "x": 2015-02-27T00:00:00.000Z, + "y": 15.721527909780036, + }, + Object { + "x": 2015-02-28T00:00:00.000Z, + "y": 13.091278962257627, + }, + Object { + "x": 2015-03-01T00:00:00.000Z, + "y": 14.295247001092115, + }, + Object { + "x": 2015-03-02T00:00:00.000Z, + "y": 15.296655272416865, + }, + Object { + "x": 2015-03-03T00:00:00.000Z, + "y": 14.436440585461526, + }, + Object { + "x": 2015-03-04T00:00:00.000Z, + "y": 13.912453188370755, + }, + Object { + "x": 2015-03-05T00:00:00.000Z, + "y": 12.433861225213807, + }, + Object { + "x": 2015-03-06T00:00:00.000Z, + "y": 14.061345247447989, + }, + Object { + "x": 2015-03-07T00:00:00.000Z, + "y": 13.326092951912521, + }, + Object { + "x": 2015-03-08T00:00:00.000Z, + "y": 13.566974950387175, + }, + Object { + "x": 2015-03-09T00:00:00.000Z, + "y": 12.96345607653163, + }, + Object { + "x": 2015-03-10T00:00:00.000Z, + "y": 12.205278846692087, + }, + Object { + "x": 2015-03-11T00:00:00.000Z, + "y": 11.364010452431279, + }, + Object { + "x": 2015-03-12T00:00:00.000Z, + "y": 12.120962982512733, + }, + Object { + "x": 2015-03-13T00:00:00.000Z, + "y": 13.570258079014422, + }, + Object { + "x": 2015-03-14T00:00:00.000Z, + "y": 14.613857418348378, + }, + Object { + "x": 2015-03-15T00:00:00.000Z, + "y": 15.48868026864105, + }, + Object { + "x": 2015-03-16T00:00:00.000Z, + "y": 15.421250297066777, + }, + Object { + "x": 2015-03-17T00:00:00.000Z, + "y": 16.562957844203055, + }, + Object { + "x": 2015-03-18T00:00:00.000Z, + "y": 16.365666723485436, + }, + Object { + "x": 2015-03-19T00:00:00.000Z, + "y": 15.848038393086913, + }, + Object { + "x": 2015-03-20T00:00:00.000Z, + "y": 16.170083705874156, + }, + Object { + "x": 2015-03-21T00:00:00.000Z, + "y": 16.446617416519754, + }, + Object { + "x": 2015-03-22T00:00:00.000Z, + "y": 15.024371154281331, + }, + Object { + "x": 2015-03-23T00:00:00.000Z, + "y": 14.802238239296665, + }, + Object { + "x": 2015-03-24T00:00:00.000Z, + "y": 13.156751496135007, + }, + Object { + "x": 2015-03-25T00:00:00.000Z, + "y": 14.06168725142282, + }, + Object { + "x": 2015-03-26T00:00:00.000Z, + "y": 14.94588113322983, + }, + Object { + "x": 2015-03-27T00:00:00.000Z, + "y": 14.127589669913032, + }, + Object { + "x": 2015-03-28T00:00:00.000Z, + "y": 13.885898170515487, + }, + Object { + "x": 2015-03-29T00:00:00.000Z, + "y": 13.692030694564533, + }, + Object { + "x": 2015-03-30T00:00:00.000Z, + "y": 14.943253908206318, + }, + Object { + "x": 2015-03-31T00:00:00.000Z, + "y": 14.529368596515058, + }, + Object { + "x": 2015-04-01T00:00:00.000Z, + "y": 14.661473471114782, + }, + Object { + "x": 2015-04-02T00:00:00.000Z, + "y": 13.67375983483632, + }, + Object { + "x": 2015-04-03T00:00:00.000Z, + "y": 13.382284458918326, + }, + Object { + "x": 2015-04-04T00:00:00.000Z, + "y": 12.527287002966496, + }, + Object { + "x": 2015-04-05T00:00:00.000Z, + "y": 12.767994473001014, + }, + Object { + "x": 2015-04-06T00:00:00.000Z, + "y": 12.651030056419879, + }, + Object { + "x": 2015-04-07T00:00:00.000Z, + "y": 12.141617852418765, + }, + Object { + "x": 2015-04-08T00:00:00.000Z, + "y": 13.606694447410502, + }, + Object { + "x": 2015-04-09T00:00:00.000Z, + "y": 13.923089943159189, + }, + Object { + "x": 2015-04-10T00:00:00.000Z, + "y": 14.003348672865656, + }, + ], + "legend": "Trace 0", + }, + Object { + "color": "#83bdeb", + "data": Array [ + Object { + "x": 2015-01-01T00:00:00.000Z, + "y": -2.58404773330316, + }, + Object { + "x": 2015-01-02T00:00:00.000Z, + "y": -1.9162964761259451, + }, + Object { + "x": 2015-01-03T00:00:00.000Z, + "y": -1.8899798841571565, + }, + Object { + "x": 2015-01-04T00:00:00.000Z, + "y": -1.098466181069551, + }, + Object { + "x": 2015-01-05T00:00:00.000Z, + "y": -1.2161136413159992, + }, + Object { + "x": 2015-01-06T00:00:00.000Z, + "y": -0.9298011508867184, + }, + Object { + "x": 2015-01-07T00:00:00.000Z, + "y": -2.5216450120142193, + }, + Object { + "x": 2015-01-08T00:00:00.000Z, + "y": -1.5547013224314532, + }, + Object { + "x": 2015-01-09T00:00:00.000Z, + "y": -3.1293219775443117, + }, + Object { + "x": 2015-01-10T00:00:00.000Z, + "y": -2.7232351981528025, + }, + Object { + "x": 2015-01-11T00:00:00.000Z, + "y": -1.704449229625379, + }, + Object { + "x": 2015-01-12T00:00:00.000Z, + "y": -1.2702366750752472, + }, + Object { + "x": 2015-01-13T00:00:00.000Z, + "y": -1.7688923656442583, + }, + Object { + "x": 2015-01-14T00:00:00.000Z, + "y": -1.9810878959630682, + }, + Object { + "x": 2015-01-15T00:00:00.000Z, + "y": -1.0881359248000217, + }, + Object { + "x": 2015-01-16T00:00:00.000Z, + "y": -0.5214761704035035, + }, + Object { + "x": 2015-01-17T00:00:00.000Z, + "y": -0.639866394654719, + }, + Object { + "x": 2015-01-18T00:00:00.000Z, + "y": -2.258513886233204, + }, + Object { + "x": 2015-01-19T00:00:00.000Z, + "y": -0.8711892253875131, + }, + Object { + "x": 2015-01-20T00:00:00.000Z, + "y": -0.45426547393253053, + }, + Object { + "x": 2015-01-21T00:00:00.000Z, + "y": -2.4076676391235785, + }, + Object { + "x": 2015-01-22T00:00:00.000Z, + "y": -2.2450025826137097, + }, + Object { + "x": 2015-01-23T00:00:00.000Z, + "y": -2.3488062397069234, + }, + Object { + "x": 2015-01-24T00:00:00.000Z, + "y": -3.2188990647525304, + }, + Object { + "x": 2015-01-25T00:00:00.000Z, + "y": -2.6042445674055594, + }, + Object { + "x": 2015-01-26T00:00:00.000Z, + "y": -2.9702468803291966, + }, + Object { + "x": 2015-01-27T00:00:00.000Z, + "y": -4.139691822816822, + }, + Object { + "x": 2015-01-28T00:00:00.000Z, + "y": -3.9967022316870042, + }, + Object { + "x": 2015-01-29T00:00:00.000Z, + "y": -4.796271521377118, + }, + Object { + "x": 2015-01-30T00:00:00.000Z, + "y": -5.244924380701339, + }, + Object { + "x": 2015-01-31T00:00:00.000Z, + "y": -6.965620503609484, + }, + Object { + "x": 2015-02-01T00:00:00.000Z, + "y": -6.430396926773768, + }, + Object { + "x": 2015-02-02T00:00:00.000Z, + "y": -5.234457265252843, + }, + Object { + "x": 2015-02-03T00:00:00.000Z, + "y": -6.181791776690352, + }, + Object { + "x": 2015-02-04T00:00:00.000Z, + "y": -7.3464387119459085, + }, + Object { + "x": 2015-02-05T00:00:00.000Z, + "y": -7.085650875056526, + }, + Object { + "x": 2015-02-06T00:00:00.000Z, + "y": -6.795217278293396, + }, + Object { + "x": 2015-02-07T00:00:00.000Z, + "y": -6.08725142043377, + }, + Object { + "x": 2015-02-08T00:00:00.000Z, + "y": -5.3416313194169875, + }, + Object { + "x": 2015-02-09T00:00:00.000Z, + "y": -4.900094995211111, + }, + Object { + "x": 2015-02-10T00:00:00.000Z, + "y": -4.715363010029477, + }, + Object { + "x": 2015-02-11T00:00:00.000Z, + "y": -3.6757033584677927, + }, + Object { + "x": 2015-02-12T00:00:00.000Z, + "y": -5.873900613367271, + }, + Object { + "x": 2015-02-13T00:00:00.000Z, + "y": -7.685787089886274, + }, + Object { + "x": 2015-02-14T00:00:00.000Z, + "y": -8.833149292574403, + }, + Object { + "x": 2015-02-15T00:00:00.000Z, + "y": -9.373517123532867, + }, + Object { + "x": 2015-02-16T00:00:00.000Z, + "y": -10.519456187180836, + }, + Object { + "x": 2015-02-17T00:00:00.000Z, + "y": -8.012082850355387, + }, + Object { + "x": 2015-02-18T00:00:00.000Z, + "y": -8.556759031756883, + }, + Object { + "x": 2015-02-19T00:00:00.000Z, + "y": -8.78527769843948, + }, + Object { + "x": 2015-02-20T00:00:00.000Z, + "y": -8.801850250864483, + }, + Object { + "x": 2015-02-21T00:00:00.000Z, + "y": -9.031427690493008, + }, + Object { + "x": 2015-02-22T00:00:00.000Z, + "y": -9.289972806031075, + }, + Object { + "x": 2015-02-23T00:00:00.000Z, + "y": -8.434541044235305, + }, + Object { + "x": 2015-02-24T00:00:00.000Z, + "y": -8.543619303217836, + }, + Object { + "x": 2015-02-25T00:00:00.000Z, + "y": -9.817816201809572, + }, + Object { + "x": 2015-02-26T00:00:00.000Z, + "y": -9.691704922707196, + }, + Object { + "x": 2015-02-27T00:00:00.000Z, + "y": -9.172230718814316, + }, + Object { + "x": 2015-02-28T00:00:00.000Z, + "y": -10.389025830978015, + }, + Object { + "x": 2015-03-01T00:00:00.000Z, + "y": -9.418276522564378, + }, + Object { + "x": 2015-03-02T00:00:00.000Z, + "y": -8.844666134378604, + }, + Object { + "x": 2015-03-03T00:00:00.000Z, + "y": -10.649699554950736, + }, + Object { + "x": 2015-03-04T00:00:00.000Z, + "y": -11.433978738990442, + }, + Object { + "x": 2015-03-05T00:00:00.000Z, + "y": -11.022214964648152, + }, + Object { + "x": 2015-03-06T00:00:00.000Z, + "y": -11.156982299530265, + }, + Object { + "x": 2015-03-07T00:00:00.000Z, + "y": -12.846500605483975, + }, + Object { + "x": 2015-03-08T00:00:00.000Z, + "y": -12.700459270895378, + }, + Object { + "x": 2015-03-09T00:00:00.000Z, + "y": -13.701718476553872, + }, + Object { + "x": 2015-03-10T00:00:00.000Z, + "y": -14.281259852458456, + }, + Object { + "x": 2015-03-11T00:00:00.000Z, + "y": -13.197701892598191, + }, + Object { + "x": 2015-03-12T00:00:00.000Z, + "y": -13.444607930505104, + }, + Object { + "x": 2015-03-13T00:00:00.000Z, + "y": -12.703127086621702, + }, + Object { + "x": 2015-03-14T00:00:00.000Z, + "y": -12.38184968649959, + }, + Object { + "x": 2015-03-15T00:00:00.000Z, + "y": -13.545422038889187, + }, + Object { + "x": 2015-03-16T00:00:00.000Z, + "y": -12.062411162554307, + }, + Object { + "x": 2015-03-17T00:00:00.000Z, + "y": -12.190051993521331, + }, + Object { + "x": 2015-03-18T00:00:00.000Z, + "y": -13.801739083658532, + }, + Object { + "x": 2015-03-19T00:00:00.000Z, + "y": -14.198265394729127, + }, + Object { + "x": 2015-03-20T00:00:00.000Z, + "y": -14.29078542197376, + }, + Object { + "x": 2015-03-21T00:00:00.000Z, + "y": -13.45263060195906, + }, + Object { + "x": 2015-03-22T00:00:00.000Z, + "y": -13.130412206893606, + }, + Object { + "x": 2015-03-23T00:00:00.000Z, + "y": -14.189794518505105, + }, + Object { + "x": 2015-03-24T00:00:00.000Z, + "y": -12.647928857811877, + }, + Object { + "x": 2015-03-25T00:00:00.000Z, + "y": -13.252175401809115, + }, + Object { + "x": 2015-03-26T00:00:00.000Z, + "y": -13.526006774399674, + }, + Object { + "x": 2015-03-27T00:00:00.000Z, + "y": -13.640567463371012, + }, + Object { + "x": 2015-03-28T00:00:00.000Z, + "y": -13.234252510186453, + }, + Object { + "x": 2015-03-29T00:00:00.000Z, + "y": -12.313307209824384, + }, + Object { + "x": 2015-03-30T00:00:00.000Z, + "y": -11.218557557877709, + }, + Object { + "x": 2015-03-31T00:00:00.000Z, + "y": -10.7821947135954, + }, + Object { + "x": 2015-04-01T00:00:00.000Z, + "y": -8.89016408336461, + }, + Object { + "x": 2015-04-02T00:00:00.000Z, + "y": -9.662631443485989, + }, + Object { + "x": 2015-04-03T00:00:00.000Z, + "y": -6.909371824212538, + }, + Object { + "x": 2015-04-04T00:00:00.000Z, + "y": -7.048202688582138, + }, + Object { + "x": 2015-04-05T00:00:00.000Z, + "y": -4.971706592042745, + }, + Object { + "x": 2015-04-06T00:00:00.000Z, + "y": -4.310618310025603, + }, + Object { + "x": 2015-04-07T00:00:00.000Z, + "y": -2.954237793688564, + }, + Object { + "x": 2015-04-08T00:00:00.000Z, + "y": -2.0883264569176156, + }, + Object { + "x": 2015-04-09T00:00:00.000Z, + "y": 1.1805740980198571, + }, + Object { + "x": 2015-04-10T00:00:00.000Z, + "y": 0.5040426644599496, + }, + ], + "legend": "Trace 1", + }, + Object { + "color": "#df8e64", + "data": Array [ + Object { + "x": 2015-01-01T00:00:00.000Z, + "y": 0.4661114764240781, + }, + Object { + "x": 2015-01-02T00:00:00.000Z, + "y": 1.0610769506804194, + }, + Object { + "x": 2015-01-03T00:00:00.000Z, + "y": 1.0620659379275244, + }, + Object { + "x": 2015-01-04T00:00:00.000Z, + "y": -0.5603096501263787, + }, + Object { + "x": 2015-01-05T00:00:00.000Z, + "y": -0.22966983294858567, + }, + Object { + "x": 2015-01-06T00:00:00.000Z, + "y": 1.1358334022099883, + }, + Object { + "x": 2015-01-07T00:00:00.000Z, + "y": 1.8697838063194905, + }, + Object { + "x": 2015-01-08T00:00:00.000Z, + "y": 1.8307593169232188, + }, + Object { + "x": 2015-01-09T00:00:00.000Z, + "y": 2.6294937170536055, + }, + Object { + "x": 2015-01-10T00:00:00.000Z, + "y": 1.456439760404607, + }, + Object { + "x": 2015-01-11T00:00:00.000Z, + "y": 3.571977139947352, + }, + Object { + "x": 2015-01-12T00:00:00.000Z, + "y": 3.305623978930223, + }, + Object { + "x": 2015-01-13T00:00:00.000Z, + "y": 4.369054542737759, + }, + Object { + "x": 2015-01-14T00:00:00.000Z, + "y": 4.134928856846778, + }, + Object { + "x": 2015-01-15T00:00:00.000Z, + "y": 2.525747905079978, + }, + Object { + "x": 2015-01-16T00:00:00.000Z, + "y": 4.45625041538837, + }, + Object { + "x": 2015-01-17T00:00:00.000Z, + "y": 5.331621195457201, + }, + Object { + "x": 2015-01-18T00:00:00.000Z, + "y": 5.01722152487662, + }, + Object { + "x": 2015-01-19T00:00:00.000Z, + "y": 3.2730061427478807, + }, + Object { + "x": 2015-01-20T00:00:00.000Z, + "y": 2.3895586625726164, + }, + Object { + "x": 2015-01-21T00:00:00.000Z, + "y": 1.5551868349111646, + }, + Object { + "x": 2015-01-22T00:00:00.000Z, + "y": 0.9222137047406664, + }, + Object { + "x": 2015-01-23T00:00:00.000Z, + "y": -0.2408476097748915, + }, + Object { + "x": 2015-01-24T00:00:00.000Z, + "y": -0.7735805458656726, + }, + Object { + "x": 2015-01-25T00:00:00.000Z, + "y": -0.8871954038346644, + }, + Object { + "x": 2015-01-26T00:00:00.000Z, + "y": -1.9822438634492547, + }, + Object { + "x": 2015-01-27T00:00:00.000Z, + "y": -0.8886612143982666, + }, + Object { + "x": 2015-01-28T00:00:00.000Z, + "y": -0.7149527896910689, + }, + Object { + "x": 2015-01-29T00:00:00.000Z, + "y": -1.1377284325144619, + }, + Object { + "x": 2015-01-30T00:00:00.000Z, + "y": -1.7585300048885872, + }, + Object { + "x": 2015-01-31T00:00:00.000Z, + "y": -2.8117170543153254, + }, + Object { + "x": 2015-02-01T00:00:00.000Z, + "y": -2.6809842525932175, + }, + Object { + "x": 2015-02-02T00:00:00.000Z, + "y": -1.6457602974924186, + }, + Object { + "x": 2015-02-03T00:00:00.000Z, + "y": -2.1361202183757593, + }, + Object { + "x": 2015-02-04T00:00:00.000Z, + "y": -3.506112394459107, + }, + Object { + "x": 2015-02-05T00:00:00.000Z, + "y": -3.338531391597358, + }, + Object { + "x": 2015-02-06T00:00:00.000Z, + "y": -5.511057758779813, + }, + Object { + "x": 2015-02-07T00:00:00.000Z, + "y": -3.5261371875358676, + }, + Object { + "x": 2015-02-08T00:00:00.000Z, + "y": -4.05255557741406, + }, + Object { + "x": 2015-02-09T00:00:00.000Z, + "y": -5.188415501615373, + }, + Object { + "x": 2015-02-10T00:00:00.000Z, + "y": -6.032557392677557, + }, + Object { + "x": 2015-02-11T00:00:00.000Z, + "y": -5.6858700345353785, + }, + Object { + "x": 2015-02-12T00:00:00.000Z, + "y": -6.667528307767753, + }, + Object { + "x": 2015-02-13T00:00:00.000Z, + "y": -6.733517550988596, + }, + Object { + "x": 2015-02-14T00:00:00.000Z, + "y": -7.0502984033473615, + }, + Object { + "x": 2015-02-15T00:00:00.000Z, + "y": -7.574898212324232, + }, + Object { + "x": 2015-02-16T00:00:00.000Z, + "y": -7.1843491903366, + }, + Object { + "x": 2015-02-17T00:00:00.000Z, + "y": -6.080355259797091, + }, + Object { + "x": 2015-02-18T00:00:00.000Z, + "y": -6.398354606750326, + }, + Object { + "x": 2015-02-19T00:00:00.000Z, + "y": -6.286331305269291, + }, + Object { + "x": 2015-02-20T00:00:00.000Z, + "y": -7.175762338255774, + }, + Object { + "x": 2015-02-21T00:00:00.000Z, + "y": -6.6277002690607105, + }, + Object { + "x": 2015-02-22T00:00:00.000Z, + "y": -6.031655281290095, + }, + Object { + "x": 2015-02-23T00:00:00.000Z, + "y": -5.243102836583583, + }, + Object { + "x": 2015-02-24T00:00:00.000Z, + "y": -4.612608200873672, + }, + Object { + "x": 2015-02-25T00:00:00.000Z, + "y": -5.180512683218164, + }, + Object { + "x": 2015-02-26T00:00:00.000Z, + "y": -5.0321319726702916, + }, + Object { + "x": 2015-02-27T00:00:00.000Z, + "y": -4.567844497333498, + }, + Object { + "x": 2015-02-28T00:00:00.000Z, + "y": -3.347239903958168, + }, + Object { + "x": 2015-03-01T00:00:00.000Z, + "y": -2.5263058621799597, + }, + Object { + "x": 2015-03-02T00:00:00.000Z, + "y": -3.554423668680612, + }, + Object { + "x": 2015-03-03T00:00:00.000Z, + "y": -1.7466537357472816, + }, + Object { + "x": 2015-03-04T00:00:00.000Z, + "y": 0.08618389027480222, + }, + Object { + "x": 2015-03-05T00:00:00.000Z, + "y": 1.0223852208396356, + }, + Object { + "x": 2015-03-06T00:00:00.000Z, + "y": 2.2260700096326724, + }, + Object { + "x": 2015-03-07T00:00:00.000Z, + "y": 2.976731277433707, + }, + Object { + "x": 2015-03-08T00:00:00.000Z, + "y": 2.5457541264066235, + }, + Object { + "x": 2015-03-09T00:00:00.000Z, + "y": 2.412842465270771, + }, + Object { + "x": 2015-03-10T00:00:00.000Z, + "y": 2.1270496073872933, + }, + Object { + "x": 2015-03-11T00:00:00.000Z, + "y": 4.350264423349324, + }, + Object { + "x": 2015-03-12T00:00:00.000Z, + "y": 3.6000820362032346, + }, + Object { + "x": 2015-03-13T00:00:00.000Z, + "y": 3.6547717673422704, + }, + Object { + "x": 2015-03-14T00:00:00.000Z, + "y": 4.29856786980301, + }, + Object { + "x": 2015-03-15T00:00:00.000Z, + "y": 4.61832134099102, + }, + Object { + "x": 2015-03-16T00:00:00.000Z, + "y": 5.1364308299997825, + }, + Object { + "x": 2015-03-17T00:00:00.000Z, + "y": 5.647209819441451, + }, + Object { + "x": 2015-03-18T00:00:00.000Z, + "y": 6.041357011724418, + }, + Object { + "x": 2015-03-19T00:00:00.000Z, + "y": 4.789997568683162, + }, + Object { + "x": 2015-03-20T00:00:00.000Z, + "y": 6.041650920258338, + }, + Object { + "x": 2015-03-21T00:00:00.000Z, + "y": 5.860878612223213, + }, + Object { + "x": 2015-03-22T00:00:00.000Z, + "y": 5.6050673038102214, + }, + Object { + "x": 2015-03-23T00:00:00.000Z, + "y": 3.900259274681964, + }, + Object { + "x": 2015-03-24T00:00:00.000Z, + "y": 2.1974477295325476, + }, + Object { + "x": 2015-03-25T00:00:00.000Z, + "y": 0.979239291658772, + }, + Object { + "x": 2015-03-26T00:00:00.000Z, + "y": 0.9769412141062032, + }, + Object { + "x": 2015-03-27T00:00:00.000Z, + "y": 1.1215546396840912, + }, + Object { + "x": 2015-03-28T00:00:00.000Z, + "y": 1.4131546401228463, + }, + Object { + "x": 2015-03-29T00:00:00.000Z, + "y": -0.5715019565360024, + }, + Object { + "x": 2015-03-30T00:00:00.000Z, + "y": -0.4798030419178908, + }, + Object { + "x": 2015-03-31T00:00:00.000Z, + "y": -0.19867316746947167, + }, + Object { + "x": 2015-04-01T00:00:00.000Z, + "y": -1.3237063703965808, + }, + Object { + "x": 2015-04-02T00:00:00.000Z, + "y": -1.5132847802948692, + }, + Object { + "x": 2015-04-03T00:00:00.000Z, + "y": -0.9466159703619573, + }, + Object { + "x": 2015-04-04T00:00:00.000Z, + "y": 1.3543877997088902, + }, + Object { + "x": 2015-04-05T00:00:00.000Z, + "y": 1.3745632832250965, + }, + Object { + "x": 2015-04-06T00:00:00.000Z, + "y": 1.2843024279329955, + }, + Object { + "x": 2015-04-07T00:00:00.000Z, + "y": 1.1384756757773304, + }, + Object { + "x": 2015-04-08T00:00:00.000Z, + "y": 1.841477239971831, + }, + Object { + "x": 2015-04-09T00:00:00.000Z, + "y": 1.0626945214201182, + }, + Object { + "x": 2015-04-10T00:00:00.000Z, + "y": 1.6018849370336259, + }, + ], + "legend": "Trace 2", + }, + ], + }, + "mode": "tonexty", + "supportNegativeData": true, + "xAxisTitle": "", + "yAxisTitle": "", +} +`; + +exports[`transform Plotly Json To chart Props transformPlotlyJsonToVBCProps - Should return VBC props 1`] = ` +Object { + "barWidth": 24, + "chartTitle": "", + "data": Array [ + Object { + "color": "#f7adda", + "legend": "a", + "x": -1.75, + "xAxisCalloutData": "[-2 - -1.5)", + "y": 3, + }, + Object { + "color": "#f7adda", + "legend": "a", + "x": -1.25, + "xAxisCalloutData": "[-1.5 - -1)", + "y": 18, + }, + Object { + "color": "#f7adda", + "legend": "a", + "x": -0.75, + "xAxisCalloutData": "[-1 - -0.5)", + "y": 53, + }, + Object { + "color": "#f7adda", + "legend": "a", + "x": -0.25, + "xAxisCalloutData": "[-0.5 - 0)", + "y": 87, + }, + Object { + "color": "#f7adda", + "legend": "a", + "x": 0.25, + "xAxisCalloutData": "[0 - 0.5)", + "y": 129, + }, + Object { + "color": "#f7adda", + "legend": "a", + "x": 0.75, + "xAxisCalloutData": "[0.5 - 1)", + "y": 194, + }, + Object { + "color": "#f7adda", + "legend": "a", + "x": 1.25, + "xAxisCalloutData": "[1 - 1.5)", + "y": 188, + }, + Object { + "color": "#f7adda", + "legend": "a", + "x": 1.75, + "xAxisCalloutData": "[1.5 - 2)", + "y": 163, + }, + Object { + "color": "#f7adda", + "legend": "a", + "x": 2.25, + "xAxisCalloutData": "[2 - 2.5)", + "y": 102, + }, + Object { + "color": "#f7adda", + "legend": "a", + "x": 2.75, + "xAxisCalloutData": "[2.5 - 3)", + "y": 44, + }, + Object { + "color": "#f7adda", + "legend": "a", + "x": 3.25, + "xAxisCalloutData": "[3 - 3.5)", + "y": 11, + }, + Object { + "color": "#f7adda", + "legend": "a", + "x": 3.75, + "xAxisCalloutData": "[3.5 - 4)", + "y": 8, + }, + Object { + "color": "#9bd9db", + "legend": "b", + "x": -2.75, + "xAxisCalloutData": "[-3 - -2.5)", + "y": 6, + }, + Object { + "color": "#9bd9db", + "legend": "b", + "x": -2.25, + "xAxisCalloutData": "[-2.5 - -2)", + "y": 11, + }, + Object { + "color": "#9bd9db", + "legend": "b", + "x": -1.75, + "xAxisCalloutData": "[-2 - -1.5)", + "y": 40, + }, + Object { + "color": "#9bd9db", + "legend": "b", + "x": -1.25, + "xAxisCalloutData": "[-1.5 - -1)", + "y": 100, + }, + Object { + "color": "#9bd9db", + "legend": "b", + "x": -0.75, + "xAxisCalloutData": "[-1 - -0.5)", + "y": 158, + }, + Object { + "color": "#9bd9db", + "legend": "b", + "x": -0.25, + "xAxisCalloutData": "[-0.5 - 0)", + "y": 189, + }, + Object { + "color": "#9bd9db", + "legend": "b", + "x": 0.25, + "xAxisCalloutData": "[0 - 0.5)", + "y": 192, + }, + Object { + "color": "#9bd9db", + "legend": "b", + "x": 0.75, + "xAxisCalloutData": "[0.5 - 1)", + "y": 148, + }, + Object { + "color": "#9bd9db", + "legend": "b", + "x": 1.25, + "xAxisCalloutData": "[1 - 1.5)", + "y": 90, + }, + Object { + "color": "#9bd9db", + "legend": "b", + "x": 1.75, + "xAxisCalloutData": "[1.5 - 2)", + "y": 47, + }, + Object { + "color": "#9bd9db", + "legend": "b", + "x": 2.25, + "xAxisCalloutData": "[2 - 2.5)", + "y": 18, + }, + Object { + "color": "#9bd9db", + "legend": "b", + "x": 2.75, + "xAxisCalloutData": "[2.5 - 3)", + "y": 1, + }, + Object { + "color": "#b29ad4", + "legend": "c", + "x": -4.25, + "xAxisCalloutData": "[-4.5 - -4)", + "y": 2, + }, + Object { + "color": "#b29ad4", + "legend": "c", + "x": -3.75, + "xAxisCalloutData": "[-4 - -3.5)", + "y": 4, + }, + Object { + "color": "#b29ad4", + "legend": "c", + "x": -3.25, + "xAxisCalloutData": "[-3.5 - -3)", + "y": 8, + }, + Object { + "color": "#b29ad4", + "legend": "c", + "x": -2.75, + "xAxisCalloutData": "[-3 - -2.5)", + "y": 49, + }, + Object { + "color": "#b29ad4", + "legend": "c", + "x": -2.25, + "xAxisCalloutData": "[-2.5 - -2)", + "y": 99, + }, + Object { + "color": "#b29ad4", + "legend": "c", + "x": -1.75, + "xAxisCalloutData": "[-2 - -1.5)", + "y": 137, + }, + Object { + "color": "#b29ad4", + "legend": "c", + "x": -1.25, + "xAxisCalloutData": "[-1.5 - -1)", + "y": 220, + }, + Object { + "color": "#b29ad4", + "legend": "c", + "x": -0.75, + "xAxisCalloutData": "[-1 - -0.5)", + "y": 181, + }, + Object { + "color": "#b29ad4", + "legend": "c", + "x": -0.25, + "xAxisCalloutData": "[-0.5 - 0)", + "y": 142, + }, + Object { + "color": "#b29ad4", + "legend": "c", + "x": 0.25, + "xAxisCalloutData": "[0 - 0.5)", + "y": 94, + }, + Object { + "color": "#b29ad4", + "legend": "c", + "x": 0.75, + "xAxisCalloutData": "[0.5 - 1)", + "y": 45, + }, + Object { + "color": "#b29ad4", + "legend": "c", + "x": 1.25, + "xAxisCalloutData": "[1 - 1.5)", + "y": 11, + }, + Object { + "color": "#b29ad4", + "legend": "c", + "x": 1.75, + "xAxisCalloutData": "[1.5 - 2)", + "y": 6, + }, + Object { + "color": "#b29ad4", + "legend": "c", + "x": 2.25, + "xAxisCalloutData": "[2 - 2.5)", + "y": 2, + }, + ], + "mode": "plotly", + "supportNegativeData": true, + "xAxisTitle": "", + "yAxisTitle": "", +} +`; + +exports[`transform Plotly Json To chart Props transformPlotlyJsonToVSBCProps - Should return VSBC props 1`] = ` +Object { + "barWidth": "auto", + "chartTitle": "", + "data": Array [ + Object { + "chartData": Array [ + Object { + "color": "#c19c00", + "data": 2000, + "legend": "Category A", + }, + Object { + "color": "#c8d1fa", + "data": 3000, + "legend": "Category B", + }, + ], + "lineData": Array [], + "xAxisPoint": "Jan", + }, + Object { + "chartData": Array [ + Object { + "color": "#c19c00", + "data": 2100, + "legend": "Category A", + }, + Object { + "color": "#c8d1fa", + "data": 3100, + "legend": "Category B", + }, + ], + "lineData": Array [], + "xAxisPoint": "Feb", + }, + Object { + "chartData": Array [ + Object { + "color": "#c19c00", + "data": 2200, + "legend": "Category A", + }, + Object { + "color": "#c8d1fa", + "data": 3200, + "legend": "Category B", + }, + ], + "lineData": Array [], + "xAxisPoint": "Mar", + }, + Object { + "chartData": Array [ + Object { + "color": "#c19c00", + "data": 2300, + "legend": "Category A", + }, + Object { + "color": "#c8d1fa", + "data": 3300, + "legend": "Category B", + }, + ], + "lineData": Array [], + "xAxisPoint": "Apr", + }, + Object { + "chartData": Array [ + Object { + "color": "#c19c00", + "data": 2400, + "legend": "Category A", + }, + Object { + "color": "#c8d1fa", + "data": 3400, + "legend": "Category B", + }, + ], + "lineData": Array [], + "xAxisPoint": "May", + }, + ], + "mode": "plotly", + "xAxisTitle": "", + "yAxisTitle": "", + "yMaxValue": 3400, +} +`; diff --git a/packages/charts/react-charting/src/components/DeclarativeChart/tests/schema/fluent_groupedverticalbarchart_test.json b/packages/charts/react-charting/src/components/DeclarativeChart/tests/schema/fluent_groupedverticalbarchart_test.json new file mode 100644 index 00000000000000..97c18b6462b187 --- /dev/null +++ b/packages/charts/react-charting/src/components/DeclarativeChart/tests/schema/fluent_groupedverticalbarchart_test.json @@ -0,0 +1,95 @@ +{ + "visualizer": "plotly", + "data": [ + { + "uid": "2f399e", + "type": "bar", + "x": ["Jan", "Feb", "Mar", "Apr", "May"], + "y": [2000, 2100, 2200, 2300, 2400], + "name": "Category A", + "zmax": 1, + "zmin": 0, + "xbins": { + "end": 2499.5, + "size": 500, + "start": -500.5 + }, + "ybins": { + "end": 23.5, + "size": 1, + "start": -1.5 + }, + "opacity": 1, + "visible": true, + "autobinx": true, + "autobiny": true, + "contours": { + "end": 0.901, + "size": 0.1, + "start": 0.1, + "coloring": "fill", + "showlines": true + }, + "showlegend": true, + "orientation": "v" + }, + { + "uid": "2f399e", + "type": "bar", + "x": ["Jan", "Feb", "Mar", "Apr", "May"], + "y": [3000, 3100, 3200, 3300, 3400], + "name": "Category B", + "zmax": 1, + "zmin": 0, + "xbins": { + "end": 2499.5, + "size": 500, + "start": -500.5 + }, + "ybins": { + "end": 23.5, + "size": 1, + "start": -1.5 + }, + "opacity": 1, + "visible": true, + "autobinx": true, + "autobiny": true, + "contours": { + "end": 0.901, + "size": 0.1, + "start": 0.1, + "coloring": "fill", + "showlines": true + }, + "showlegend": true, + "orientation": "v" + } + ], + "layout": { + "title": "PHP Framework Popularity at Work - SitePoint, 2015", + "width": 850, + "xaxis": { + "type": "linear", + "range": [-198.2562959184288, 1830.6731869091736], + "title": "Votes", + "autorange": false + }, + "yaxis": { + "type": "category", + "range": [-3.301575351429676, 23.42061223132087], + "title": "Framework", + "autorange": false + }, + "height": 742, + "margin": { + "l": 210, + "pad": 4 + }, + "barmode": "group", + "barnorm": "", + "autosize": true, + "showlegend": false + }, + "frames": [] +} diff --git a/packages/charts/react-charting/src/components/DeclarativeChart/tests/schema/fluent_nesteddata_test.json b/packages/charts/react-charting/src/components/DeclarativeChart/tests/schema/fluent_nesteddata_test.json new file mode 100644 index 00000000000000..4e726910baac16 --- /dev/null +++ b/packages/charts/react-charting/src/components/DeclarativeChart/tests/schema/fluent_nesteddata_test.json @@ -0,0 +1,23 @@ +[ + { + "level1": { + "level2": { + "level3": { + "level4": { + "level5": { + "level6": { + "level7": { + "level8": { + "level9": { + "level10": "Testing data" + } + } + } + } + } + } + } + } + } + } +] diff --git a/packages/charts/react-charting/src/components/DeclarativeChart/tests/schema/fluent_verticalstackedbarchart_test.json b/packages/charts/react-charting/src/components/DeclarativeChart/tests/schema/fluent_verticalstackedbarchart_test.json new file mode 100644 index 00000000000000..c87c4978b72adc --- /dev/null +++ b/packages/charts/react-charting/src/components/DeclarativeChart/tests/schema/fluent_verticalstackedbarchart_test.json @@ -0,0 +1,75 @@ +{ + "visualizer": "plotly", + "data": [ + { + "type": "bar", + "x": ["Jan", "Feb", "Mar", "Apr", "May"], + "y": [2000, 2100, 2200, 2300, 2400], + "name": "Category A", + "xaxis": "x1", + "yaxis": "y1", + "marker": { + "line": { + "width": 1 + }, + "color": "#0000FF" + }, + "opacity": 1, + "orientation": "v" + }, + { + "type": "bar", + "x": ["Jan", "Feb", "Mar", "Apr", "May"], + "y": [3000, 3100, 3200, 3300, 3400], + "name": "Category B", + "xaxis": "x1", + "yaxis": "y1", + "marker": { + "line": { + "width": 1 + }, + "color": "#007F00" + }, + "opacity": 1, + "orientation": "v" + } + ], + "layout": { + "bargap": 11.864179406671795, + "xaxis1": { + "side": "bottom", + "type": "linear", + "range": [50, 300], + "ticks": "inside", + "anchor": "y1", + "domain": [0, 1], + "mirror": "ticks", + "nticks": 6, + "showgrid": false, + "showline": true, + "tickfont": { + "size": 12 + }, + "zeroline": false + }, + "yaxis1": { + "side": "left", + "type": "linear", + "range": [0, 350], + "ticks": "inside", + "anchor": "x1", + "domain": [0, 1], + "mirror": "ticks", + "nticks": 8, + "showgrid": false, + "showline": true, + "tickfont": { + "size": 12 + }, + "zeroline": false + }, + "hovermode": "closest", + "showlegend": false + }, + "frames": [] +} diff --git a/packages/charts/react-charting/src/components/DonutChart/DonutChart.base.tsx b/packages/charts/react-charting/src/components/DonutChart/DonutChart.base.tsx index 79c4414e3307ab..5fc0da02192505 100644 --- a/packages/charts/react-charting/src/components/DonutChart/DonutChart.base.tsx +++ b/packages/charts/react-charting/src/components/DonutChart/DonutChart.base.tsx @@ -178,6 +178,7 @@ export class DonutChartBase extends React.Component
The following link renders as a span.{' '} - + alert('Link rendered as span')}> Links that render as a span wrap correctly between lines when their content is very long . This is because they behave as regular inline elements. diff --git a/packages/react-components/react-menu/library/src/Menu.ts b/packages/react-components/react-menu/library/src/Menu.ts index a1d64d15e3ae75..4a6cc2cb8481fd 100644 --- a/packages/react-components/react-menu/library/src/Menu.ts +++ b/packages/react-components/react-menu/library/src/Menu.ts @@ -2,7 +2,7 @@ export type { MenuContextValues, MenuOpenChangeData, MenuOpenEvent, - // eslint-disable-next-line deprecation/deprecation + // eslint-disable-next-line @typescript-eslint/no-deprecated MenuOpenEvents, MenuProps, MenuSlots, diff --git a/packages/react-components/react-menu/library/src/MenuList.ts b/packages/react-components/react-menu/library/src/MenuList.ts index 5869d3b2473fcc..bdf7061fb1a954 100644 --- a/packages/react-components/react-menu/library/src/MenuList.ts +++ b/packages/react-components/react-menu/library/src/MenuList.ts @@ -5,7 +5,7 @@ export type { MenuListProps, MenuListSlots, MenuListState, - // eslint-disable-next-line deprecation/deprecation + // eslint-disable-next-line @typescript-eslint/no-deprecated UninitializedMenuListState, } from './components/MenuList/index'; export { diff --git a/packages/react-components/react-menu/library/src/components/Menu/index.ts b/packages/react-components/react-menu/library/src/components/Menu/index.ts index 0830f525ad16ad..f8f52e39aa00d2 100644 --- a/packages/react-components/react-menu/library/src/components/Menu/index.ts +++ b/packages/react-components/react-menu/library/src/components/Menu/index.ts @@ -3,7 +3,7 @@ export type { MenuContextValues, MenuOpenChangeData, MenuOpenEvent, - // eslint-disable-next-line deprecation/deprecation + // eslint-disable-next-line @typescript-eslint/no-deprecated MenuOpenEvents, MenuProps, MenuSlots, diff --git a/packages/react-components/react-menu/library/src/components/MenuList/index.ts b/packages/react-components/react-menu/library/src/components/MenuList/index.ts index 66b24f6405c9a2..eb018a4ed49ead 100644 --- a/packages/react-components/react-menu/library/src/components/MenuList/index.ts +++ b/packages/react-components/react-menu/library/src/components/MenuList/index.ts @@ -6,7 +6,7 @@ export type { MenuListProps, MenuListSlots, MenuListState, - // eslint-disable-next-line deprecation/deprecation + // eslint-disable-next-line @typescript-eslint/no-deprecated UninitializedMenuListState, } from './MenuList.types'; export { renderMenuList_unstable } from './renderMenuList'; diff --git a/packages/react-components/react-menu/library/src/components/index.ts b/packages/react-components/react-menu/library/src/components/index.ts index 778a42b08abe47..eb7e7cd5f0785b 100644 --- a/packages/react-components/react-menu/library/src/components/index.ts +++ b/packages/react-components/react-menu/library/src/components/index.ts @@ -13,7 +13,7 @@ export type { MenuListProps, MenuListSlots, MenuListState, - // eslint-disable-next-line deprecation/deprecation + // eslint-disable-next-line @typescript-eslint/no-deprecated UninitializedMenuListState, } from './MenuList/index'; export { diff --git a/packages/react-components/react-menu/library/src/index.ts b/packages/react-components/react-menu/library/src/index.ts index 85019a022946d0..1d2d53e93f1fa0 100644 --- a/packages/react-components/react-menu/library/src/index.ts +++ b/packages/react-components/react-menu/library/src/index.ts @@ -12,7 +12,7 @@ export type { MenuOpenChangeData, MenuOpenEvent, // MenuOpenEvents is deprecated but removing it would be a breaking change - // eslint-disable-next-line deprecation/deprecation + // eslint-disable-next-line @typescript-eslint/no-deprecated MenuOpenEvents, MenuProps, MenuSlots, @@ -83,7 +83,7 @@ export type { MenuListSlots, MenuListState, // UninitializedMenuListState is deprecated but removing it would be a breaking change - // eslint-disable-next-line deprecation/deprecation + // eslint-disable-next-line @typescript-eslint/no-deprecated UninitializedMenuListState, } from './MenuList'; export { diff --git a/packages/react-components/react-message-bar/library/src/components/MessageBar/MessageBar.test.tsx b/packages/react-components/react-message-bar/library/src/components/MessageBar/MessageBar.test.tsx index 056dce8a52bfdf..bd108f6054cab9 100644 --- a/packages/react-components/react-message-bar/library/src/components/MessageBar/MessageBar.test.tsx +++ b/packages/react-components/react-message-bar/library/src/components/MessageBar/MessageBar.test.tsx @@ -2,7 +2,7 @@ import * as React from 'react'; import { render } from '@testing-library/react'; import { isConformant } from '../../testing/isConformant'; import { MessageBar } from './MessageBar'; -import { AnnounceProvider_unstable } from '@fluentui/react-shared-contexts'; +import { AnnounceProvider } from '@fluentui/react-shared-contexts'; import { MessageBarBody } from '../MessageBarBody/MessageBarBody'; import { MessageBarTitle } from '../MessageBarTitle/MessageBarTitle'; import { MessageBarActions } from '../MessageBarActions/MessageBarActions'; @@ -67,13 +67,13 @@ describe('MessageBar', () => { ])('should announce %s with %s intent', (politeness, intent) => { const announce = jest.fn(); render( - + TitleBody - , + , ); expect(announce).toHaveBeenCalledTimes(1); @@ -86,7 +86,7 @@ describe('MessageBar', () => { it('should announce actions', () => { const announce = jest.fn(); render( - + TitleBody @@ -96,7 +96,7 @@ describe('MessageBar', () => { - , + , ); expect(announce).toHaveBeenCalledTimes(1); diff --git a/packages/react-components/react-message-bar/library/src/components/MessageBar/useMessageBar.ts b/packages/react-components/react-message-bar/library/src/components/MessageBar/useMessageBar.ts index 1c6145749da4fa..7ab387059a5841 100644 --- a/packages/react-components/react-message-bar/library/src/components/MessageBar/useMessageBar.ts +++ b/packages/react-components/react-message-bar/library/src/components/MessageBar/useMessageBar.ts @@ -21,7 +21,7 @@ export const useMessageBar_unstable = (props: MessageBarProps, ref: React.Ref(null); const bodyRef = React.useRef(null); diff --git a/packages/react-components/react-migration-v8-v9/library/package.json b/packages/react-components/react-migration-v8-v9/library/package.json index c7cc7dd2fc481f..d5f844d5560978 100644 --- a/packages/react-components/react-migration-v8-v9/library/package.json +++ b/packages/react-components/react-migration-v8-v9/library/package.json @@ -19,8 +19,8 @@ }, "dependencies": { "@ctrl/tinycolor": "^3.3.4", - "@fluentui/fluent2-theme": "^8.107.123", - "@fluentui/react": "^8.122.6", + "@fluentui/fluent2-theme": "^8.107.124", + "@fluentui/react": "^8.122.7", "@fluentui/react-components": "^9.57.0", "@fluentui/react-icons": "^2.0.245", "@fluentui/react-hooks": "^8.8.16", diff --git a/packages/react-components/react-motion-components-preview/library/src/atoms/fade-atom.ts b/packages/react-components/react-motion-components-preview/library/src/atoms/fade-atom.ts new file mode 100644 index 00000000000000..91b369be83ff71 --- /dev/null +++ b/packages/react-components/react-motion-components-preview/library/src/atoms/fade-atom.ts @@ -0,0 +1,33 @@ +import { AtomMotion, PresenceDirection, motionTokens } from '@fluentui/react-motion'; + +interface FadeAtomParams { + direction: PresenceDirection; + duration: number; + easing?: string; + fromValue?: number; +} + +/** + * Generates a motion atom object for a fade in or fade out. + * @param direction - The functional direction of the motion: 'enter' or 'exit'. + * @param duration - The duration of the motion in milliseconds. + * @param easing - The easing curve for the motion. Defaults to `motionTokens.curveLinear`. + * @param fromValue - The starting opacity value. Defaults to 0. + * @returns A motion atom object with opacity keyframes and the supplied duration and easing. + */ +export const fadeAtom = ({ + direction, + duration, + easing = motionTokens.curveLinear, + fromValue = 0, +}: FadeAtomParams): AtomMotion => { + const keyframes = [{ opacity: fromValue }, { opacity: 1 }]; + if (direction === 'exit') { + keyframes.reverse(); + } + return { + keyframes, + duration, + easing, + }; +}; diff --git a/packages/react-components/react-motion-components-preview/library/src/components/Collapse/Collapse.ts b/packages/react-components/react-motion-components-preview/library/src/components/Collapse/Collapse.ts index 6aa4b7bb66d5dc..22c8862cc3b82f 100644 --- a/packages/react-components/react-motion-components-preview/library/src/components/Collapse/Collapse.ts +++ b/packages/react-components/react-motion-components-preview/library/src/components/Collapse/Collapse.ts @@ -1,14 +1,8 @@ import { motionTokens, createPresenceComponent, AtomMotion } from '@fluentui/react-motion'; import type { PresenceMotionFnCreator } from '../../types'; import type { CollapseDelayedVariantParams, CollapseRuntimeParams, CollapseVariantParams } from './collapse-types'; -import { - sizeEnterAtom, - whitespaceEnterAtom, - opacityEnterAtom, - opacityExitAtom, - sizeExitAtom, - whitespaceExitAtom, -} from './collapse-atoms'; +import { sizeEnterAtom, sizeExitAtom, whitespaceAtom } from './collapse-atoms'; +import { fadeAtom } from '../../atoms/fade-atom'; /** Define a presence motion for collapse/expand that can stagger the size and opacity motions by a given delay. */ export const createCollapseDelayedPresence: PresenceMotionFnCreator< @@ -32,27 +26,16 @@ export const createCollapseDelayedPresence: PresenceMotionFnCreator< // ----- ENTER ----- // The enter transition is an array of up to 3 motion atoms: size, whitespace and opacity. const enterAtoms: AtomMotion[] = [ - sizeEnterAtom({ - orientation, - duration: enterSizeDuration, - easing: enterEasing, - element, - }), - whitespaceEnterAtom({ - orientation, - duration: enterSizeDuration, - easing: enterEasing, - }), + sizeEnterAtom({ orientation, duration: enterSizeDuration, easing: enterEasing, element }), + whitespaceAtom({ direction: 'enter', orientation, duration: enterSizeDuration, easing: enterEasing }), ]; // Fade in only if animateOpacity is true. Otherwise, leave opacity unaffected. if (animateOpacity) { - enterAtoms.push( - opacityEnterAtom({ - duration: enterOpacityDuration, - easing: enterEasing, - delay: enterDelay, - }), - ); + enterAtoms.push({ + ...fadeAtom({ direction: 'enter', duration: enterOpacityDuration, easing: enterEasing }), + delay: enterDelay, + fill: 'both', + }); } // ----- EXIT ----- @@ -60,24 +43,12 @@ export const createCollapseDelayedPresence: PresenceMotionFnCreator< const exitAtoms: AtomMotion[] = []; // Fade out only if animateOpacity is true. Otherwise, leave opacity unaffected. if (animateOpacity) { - exitAtoms.push( - opacityExitAtom({ - duration: exitOpacityDuration, - easing: exitEasing, - }), - ); + exitAtoms.push(fadeAtom({ direction: 'exit', duration: exitOpacityDuration, easing: exitEasing })); } exitAtoms.push( - sizeExitAtom({ - orientation, - duration: exitSizeDuration, - easing: exitEasing, - element, - delay: exitDelay, - }), - ); - exitAtoms.push( - whitespaceExitAtom({ + sizeExitAtom({ orientation, duration: exitSizeDuration, easing: exitEasing, element, delay: exitDelay }), + whitespaceAtom({ + direction: 'exit', orientation, duration: exitSizeDuration, easing: exitEasing, diff --git a/packages/react-components/react-motion-components-preview/library/src/components/Collapse/collapse-atoms.ts b/packages/react-components/react-motion-components-preview/library/src/components/Collapse/collapse-atoms.ts index 0ce27aa7d91c87..391b8eb2a24023 100644 --- a/packages/react-components/react-motion-components-preview/library/src/components/Collapse/collapse-atoms.ts +++ b/packages/react-components/react-motion-components-preview/library/src/components/Collapse/collapse-atoms.ts @@ -1,5 +1,5 @@ -import { AtomMotion } from '@fluentui/react-motion/src/types'; -import type { CollapseOrientation } from './collapse-types'; +import { AtomMotion, PresenceDirection } from '@fluentui/react-motion'; +import { CollapseOrientation } from './collapse-types'; // ----- SIZE ----- @@ -11,19 +11,21 @@ const sizeValuesForOrientation = (orientation: CollapseOrientation, element: Ele return { sizeName, overflowName, toSize }; }; +interface SizeEnterAtomParams { + orientation: CollapseOrientation; + duration: number; + easing: string; + element: HTMLElement; + fromSize?: string; +} + export const sizeEnterAtom = ({ orientation, duration, easing, element, fromSize = '0', -}: { - orientation: CollapseOrientation; - duration: number; - easing: string; - element: HTMLElement; - fromSize?: string; -}): AtomMotion => { +}: SizeEnterAtomParams): AtomMotion => { const { sizeName, overflowName, toSize } = sizeValuesForOrientation(orientation, element); return { @@ -37,6 +39,10 @@ export const sizeEnterAtom = ({ }; }; +interface SizeExitAtomParams extends SizeEnterAtomParams { + delay?: number; +} + export const sizeExitAtom = ({ orientation, duration, @@ -44,14 +50,7 @@ export const sizeExitAtom = ({ element, delay = 0, fromSize = '0', -}: { - orientation: CollapseOrientation; - duration: number; - easing: string; - element: HTMLElement; - delay?: number; - fromSize?: string; -}): AtomMotion => { +}: SizeExitAtomParams): AtomMotion => { const { sizeName, overflowName, toSize } = sizeValuesForOrientation(orientation, element); return { @@ -88,82 +87,39 @@ const whitespaceValuesForOrientation = (orientation: CollapseOrientation) => { }; }; -// Because a height of zero does not eliminate padding or margin, -// we will create keyframes to animate them to zero. -export const whitespaceEnterAtom = ({ - orientation, - duration, - easing, -}: { +interface WhitespaceAtomParams { + direction: PresenceDirection; orientation: CollapseOrientation; duration: number; easing: string; -}): AtomMotion => { - const { paddingStart, paddingEnd, marginStart, marginEnd } = whitespaceValuesForOrientation(orientation); - return { - // Animate from whitespace of zero to the current whitespace, by omitting the ending keyframe. - keyframes: [{ [paddingStart]: '0', [paddingEnd]: '0', [marginStart]: '0', [marginEnd]: '0', offset: 0 }], - duration, - easing, - }; -}; + delay?: number; +} -export const whitespaceExitAtom = ({ +/** + * A collapse animates an element's height to zero, + but the zero height does not eliminate padding or margin in the box model. + So here we generate keyframes to animate those whitespace properties to zero. + */ +export const whitespaceAtom = ({ + direction, orientation, duration, easing, delay = 0, -}: { - orientation: CollapseOrientation; - duration: number; - easing: string; - delay?: number; -}): AtomMotion => { +}: WhitespaceAtomParams): AtomMotion => { const { paddingStart, paddingEnd, marginStart, marginEnd } = whitespaceValuesForOrientation(orientation); - return { - // Animate from the current whitespace to whitespace of zero, by using offset 1 and omitting the starting keyframe. - keyframes: [{ [paddingStart]: '0', [paddingEnd]: '0', [marginStart]: '0', [marginEnd]: '0', offset: 1 }], + // The keyframe with zero whitespace is at the start for enter and at the end for exit. + const offset = direction === 'enter' ? 0 : 1; + const keyframes = [{ [paddingStart]: '0', [paddingEnd]: '0', [marginStart]: '0', [marginEnd]: '0', offset }]; + + const atom: AtomMotion = { + keyframes, duration, easing, - fill: 'forwards', delay, }; + if (direction === 'exit') { + atom.fill = 'forwards'; + } + return atom; }; - -// ----- OPACITY ----- - -export const opacityEnterAtom = ({ - duration, - easing, - delay = 0, - fromOpacity = 0, - toOpacity = 1, -}: { - duration: number; - easing: string; - delay?: number; - fromOpacity?: number; - toOpacity?: number; -}): AtomMotion => ({ - keyframes: [{ opacity: fromOpacity }, { opacity: toOpacity }], - duration, - easing, - delay, - fill: 'both', -}); - -export const opacityExitAtom = ({ - duration, - easing, - fromOpacity = 0, - toOpacity = 1, -}: { - duration: number; - easing: string; - fromOpacity?: number; - toOpacity?: number; -}): AtomMotion => ({ - keyframes: [{ opacity: toOpacity }, { opacity: fromOpacity }], - duration, - easing, -}); diff --git a/packages/react-components/react-motion-components-preview/library/src/components/Fade/Fade.ts b/packages/react-components/react-motion-components-preview/library/src/components/Fade/Fade.ts index 03ca3ea60567a1..d373d235504b69 100644 --- a/packages/react-components/react-motion-components-preview/library/src/components/Fade/Fade.ts +++ b/packages/react-components/react-motion-components-preview/library/src/components/Fade/Fade.ts @@ -1,5 +1,6 @@ import { motionTokens, createPresenceComponent } from '@fluentui/react-motion'; import type { PresenceMotionCreator } from '../../types'; +import { fadeAtom } from '../../atoms/fade-atom'; type FadeVariantParams = { /** Time (ms) for the enter transition (fade-in). Defaults to the `durationNormal` value (200 ms). */ @@ -22,8 +23,8 @@ export const createFadePresence: PresenceMotionCreator = ({ exitDuration = enterDuration, exitEasing = enterEasing, } = {}) => ({ - enter: { duration: enterDuration, easing: enterEasing, keyframes: [{ opacity: 0 }, { opacity: 1 }] }, - exit: { duration: exitDuration, easing: exitEasing, keyframes: [{ opacity: 1 }, { opacity: 0 }] }, + enter: fadeAtom({ direction: 'enter', duration: enterDuration, easing: enterEasing }), + exit: fadeAtom({ direction: 'exit', duration: exitDuration, easing: exitEasing }), }); /** A React component that applies fade in/out transitions to its children. */ diff --git a/packages/react-components/react-motion/library/src/slots/presenceMotionSlot.tsx b/packages/react-components/react-motion/library/src/slots/presenceMotionSlot.tsx index 5c85af9d4b9b79..54f108e3b66c74 100644 --- a/packages/react-components/react-motion/library/src/slots/presenceMotionSlot.tsx +++ b/packages/react-components/react-motion/library/src/slots/presenceMotionSlot.tsx @@ -42,7 +42,7 @@ export function presenceMotionSlot { - // eslint-disable-next-line deprecation/deprecation + // eslint-disable-next-line @typescript-eslint/no-deprecated const { as, children, ...rest } = motion ?? {}; if (process.env.NODE_ENV !== 'production') { diff --git a/packages/react-components/react-popover/library/src/components/Popover/usePopover.ts b/packages/react-components/react-popover/library/src/components/Popover/usePopover.ts index 67e026e21b30c2..2ab6254edfee08 100644 --- a/packages/react-components/react-popover/library/src/components/Popover/usePopover.ts +++ b/packages/react-components/react-popover/library/src/components/Popover/usePopover.ts @@ -129,7 +129,7 @@ export const usePopover_unstable = (props: PopoverProps): PopoverState => { return { ...initialState, ...positioningRefs, - // eslint-disable-next-line deprecation/deprecation + // eslint-disable-next-line @typescript-eslint/no-deprecated inertTrapFocus: props.inertTrapFocus ?? (props.legacyTrapFocus === undefined ? false : !props.legacyTrapFocus), popoverTrigger, popoverSurface, diff --git a/packages/react-components/react-positioning/src/usePositioning.ts b/packages/react-components/react-positioning/src/usePositioning.ts index 8dd68e3434ecfa..28280848b1a078 100644 --- a/packages/react-components/react-positioning/src/usePositioning.ts +++ b/packages/react-components/react-positioning/src/usePositioning.ts @@ -173,7 +173,7 @@ function usePositioningOptions(options: PositioningOptions) { pinned, position, unstable_disableTether: disableTether, - // eslint-disable-next-line deprecation/deprecation + // eslint-disable-next-line @typescript-eslint/no-deprecated positionFixed, strategy, overflowBoundaryPadding, diff --git a/packages/react-components/react-provider/library/src/components/FluentProvider/useFluentProviderThemeStyleTag.test.tsx b/packages/react-components/react-provider/library/src/components/FluentProvider/useFluentProviderThemeStyleTag.test.tsx index 4f59835acae0a4..9ddac75eeec9df 100644 --- a/packages/react-components/react-provider/library/src/components/FluentProvider/useFluentProviderThemeStyleTag.test.tsx +++ b/packages/react-components/react-provider/library/src/components/FluentProvider/useFluentProviderThemeStyleTag.test.tsx @@ -111,7 +111,7 @@ describe('useFluentProviderThemeStyleTag', () => { expect(targetDocument.body.querySelector('style')).toBeNull(); expect(targetDocument.head.querySelectorAll('style').length).toBe(1); - // eslint-disable-next-line deprecation/deprecation + // eslint-disable-next-line @typescript-eslint/no-deprecated expect(targetDocument.createElement).toHaveBeenCalledTimes(0); }); }); diff --git a/packages/react-components/react-radio/library/src/contexts/index.ts b/packages/react-components/react-radio/library/src/contexts/index.ts index 54f7374332d554..8616aab3210787 100644 --- a/packages/react-components/react-radio/library/src/contexts/index.ts +++ b/packages/react-components/react-radio/library/src/contexts/index.ts @@ -2,7 +2,7 @@ export { RadioGroupContext, RadioGroupProvider, useRadioGroupContextValue_unstable, - // eslint-disable-next-line deprecation/deprecation + // eslint-disable-next-line @typescript-eslint/no-deprecated useRadioGroupContext_unstable, } from './RadioGroupContext'; export { useRadioGroupContextValues } from './useRadioGroupContextValues'; diff --git a/packages/react-components/react-radio/library/src/index.ts b/packages/react-components/react-radio/library/src/index.ts index ffddc5faeeb928..68d15286c7fd13 100644 --- a/packages/react-components/react-radio/library/src/index.ts +++ b/packages/react-components/react-radio/library/src/index.ts @@ -18,6 +18,6 @@ export type { RadioProps, RadioSlots, RadioState, RadioOnChangeData } from './Ra export { RadioGroupProvider, useRadioGroupContextValues, - useRadioGroupContext_unstable, // eslint-disable-line deprecation/deprecation + useRadioGroupContext_unstable, // eslint-disable-line @typescript-eslint/no-deprecated useRadioGroupContextValue_unstable, } from './contexts/index'; diff --git a/packages/react-components/react-storybook-addon/src/preset/manager.ts b/packages/react-components/react-storybook-addon/src/preset/manager.ts index 8ad58779eb9d57..bfa487a41be5a6 100644 --- a/packages/react-components/react-storybook-addon/src/preset/manager.ts +++ b/packages/react-components/react-storybook-addon/src/preset/manager.ts @@ -8,20 +8,20 @@ import { DirectionSwitch } from '../components/DirectionSwitch'; addons.register(ADDON_ID, () => { addons.add(THEME_ID, { title: 'Fluent Theme Picker', - // eslint-disable-next-line deprecation/deprecation + // eslint-disable-next-line @typescript-eslint/no-deprecated type: types.TOOL, match: ({ viewMode }) => !!(viewMode && viewMode.match(/^(story|docs)$/)), render: ThemePicker, }); addons.add(DIR_ID, { title: 'Direction Switch', - // eslint-disable-next-line deprecation/deprecation + // eslint-disable-next-line @typescript-eslint/no-deprecated type: types.TOOL, match: ({ viewMode }) => !!(viewMode && viewMode.match(/^(story|docs)$/)), render: DirectionSwitch, }); addons.add(STRICT_MODE_ID, { - // eslint-disable-next-line deprecation/deprecation + // eslint-disable-next-line @typescript-eslint/no-deprecated type: types.TOOL, title: 'React Strict Mode', match: ({ viewMode }) => !!(viewMode && viewMode.match(/^(story|docs)$/)), diff --git a/packages/react-components/react-switch/library/src/Switch.ts b/packages/react-components/react-switch/library/src/Switch.ts index 4ca85158f1edd1..bbdd746cfad93b 100644 --- a/packages/react-components/react-switch/library/src/Switch.ts +++ b/packages/react-components/react-switch/library/src/Switch.ts @@ -2,7 +2,7 @@ export type { SwitchOnChangeData, SwitchProps, SwitchSlots, SwitchState } from ' export { Switch, renderSwitch_unstable, - // eslint-disable-next-line deprecation/deprecation + // eslint-disable-next-line @typescript-eslint/no-deprecated switchClassName, switchClassNames, useSwitchStyles_unstable, diff --git a/packages/react-components/react-switch/library/src/components/Switch/index.ts b/packages/react-components/react-switch/library/src/components/Switch/index.ts index d94c2b603d131e..4853a54d26424c 100644 --- a/packages/react-components/react-switch/library/src/components/Switch/index.ts +++ b/packages/react-components/react-switch/library/src/components/Switch/index.ts @@ -3,7 +3,7 @@ export type { SwitchOnChangeData, SwitchProps, SwitchSlots, SwitchState } from ' export { renderSwitch_unstable } from './renderSwitch'; export { useSwitch_unstable } from './useSwitch'; export { - // eslint-disable-next-line deprecation/deprecation + // eslint-disable-next-line @typescript-eslint/no-deprecated switchClassName, switchClassNames, useSwitchStyles_unstable, diff --git a/packages/react-components/react-switch/library/src/index.ts b/packages/react-components/react-switch/library/src/index.ts index 6ca6e3524f037b..b2ae66ee66258d 100644 --- a/packages/react-components/react-switch/library/src/index.ts +++ b/packages/react-components/react-switch/library/src/index.ts @@ -1,7 +1,7 @@ export { Switch, renderSwitch_unstable, - // eslint-disable-next-line deprecation/deprecation + // eslint-disable-next-line @typescript-eslint/no-deprecated switchClassName, switchClassNames, useSwitchStyles_unstable, diff --git a/packages/react-components/react-table/library/src/components/DataGridHeaderCell/useDataGridHeaderCell.ts b/packages/react-components/react-table/library/src/components/DataGridHeaderCell/useDataGridHeaderCell.ts index ab2fc0cebe2416..285f4cf3532033 100644 --- a/packages/react-components/react-table/library/src/components/DataGridHeaderCell/useDataGridHeaderCell.ts +++ b/packages/react-components/react-table/library/src/components/DataGridHeaderCell/useDataGridHeaderCell.ts @@ -42,7 +42,7 @@ export const useDataGridHeaderCell_unstable = ( return ctx.columnSizing_unstable.getTableHeaderCellProps; }); - // eslint-disable-next-line deprecation/deprecation -- prefer HTMLTableCellElement + // eslint-disable-next-line @typescript-eslint/no-deprecated -- prefer HTMLTableCellElement const onClick = useEventCallback((e: React.MouseEvent) => { if (sortable) { toggleColumnSort(e, columnId); diff --git a/packages/react-components/react-table/library/src/components/TableSelectionCell/useTableSelectionCell.tsx b/packages/react-components/react-table/library/src/components/TableSelectionCell/useTableSelectionCell.tsx index d76634b1cb03d7..3770b04f5b33f3 100644 --- a/packages/react-components/react-table/library/src/components/TableSelectionCell/useTableSelectionCell.tsx +++ b/packages/react-components/react-table/library/src/components/TableSelectionCell/useTableSelectionCell.tsx @@ -26,7 +26,7 @@ export const useTableSelectionCell_unstable = ( type = 'checkbox', checked = false, subtle = false, - // eslint-disable-next-line deprecation/deprecation + // eslint-disable-next-line @typescript-eslint/no-deprecated hidden = false, invisible = false, } = props; diff --git a/packages/react-components/react-tabs/library/src/components/Tab/useTabStyles.styles.ts b/packages/react-components/react-tabs/library/src/components/Tab/useTabStyles.styles.ts index c6d3116d6c22cf..7c04731829d2c7 100644 --- a/packages/react-components/react-tabs/library/src/components/Tab/useTabStyles.styles.ts +++ b/packages/react-components/react-tabs/library/src/components/Tab/useTabStyles.styles.ts @@ -717,7 +717,7 @@ export const useTabContentStyles_unstable = (state: TabState): TabState => { ); // FIXME: this is a deprecated API // should be removed in the next major version - // eslint-disable-next-line deprecation/deprecation + // eslint-disable-next-line @typescript-eslint/no-deprecated state.contentReservedSpaceClassName = state.contentReservedSpace.className; } diff --git a/packages/react-components/react-tabster/src/index.ts b/packages/react-components/react-tabster/src/index.ts index 879248bc4af1e6..2b5585db39a3de 100644 --- a/packages/react-components/react-tabster/src/index.ts +++ b/packages/react-components/react-tabster/src/index.ts @@ -64,10 +64,10 @@ export { /** @deprecated (Do not use! Exposed by mistake and will be removed in the next major version.) */ TabsterTypes6_0_1_DoNotUse as TabsterTypes, /** @deprecated Use element.dispatchEvent(new GroupperMoveFocusEvent({ action: GroupperMoveFocusActions.Escape })) */ - // eslint-disable-next-line deprecation/deprecation + // eslint-disable-next-line @typescript-eslint/no-deprecated dispatchGroupperMoveFocusEvent, /** @deprecated Use element.dispatchEvent(new MoverMoveFocusEvent({ key: MoverKeys.ArrowDown })) */ - // eslint-disable-next-line deprecation/deprecation + // eslint-disable-next-line @typescript-eslint/no-deprecated dispatchMoverMoveFocusEvent, }; diff --git a/packages/react-components/react-tooltip/library/src/components/Tooltip/useTooltip.tsx b/packages/react-components/react-tooltip/library/src/components/Tooltip/useTooltip.tsx index 8d5382f23353f9..443acabe6049c8 100644 --- a/packages/react-components/react-tooltip/library/src/components/Tooltip/useTooltip.tsx +++ b/packages/react-components/react-tooltip/library/src/components/Tooltip/useTooltip.tsx @@ -177,7 +177,7 @@ export const useTooltip_unstable = (props: TooltipProps): TooltipState => { [setDelayTimeout, setVisible, state.showDelay, context], ); - const isNavigatingWithKeyboard = useIsNavigatingWithKeyboard()(); + const isNavigatingWithKeyboard = useIsNavigatingWithKeyboard(); // Callback ref that attaches a keyborg:focusin event listener. const [keyborgListenerCallbackRef] = React.useState(() => { @@ -186,7 +186,7 @@ export const useTooltip_unstable = (props: TooltipProps): TooltipState => { // For example, we don't want to show the tooltip when a dialog is closed // and Tabster programmatically restores focus to the trigger button. // See https://github.com/microsoft/fluentui/issues/27576 - if (ev.detail?.isFocusedProgrammatically && !isNavigatingWithKeyboard) { + if (ev.detail?.isFocusedProgrammatically && !isNavigatingWithKeyboard()) { ignoreNextFocusEventRef.current = true; } }) as EventListener; diff --git a/packages/react-components/react-tree/library/etc/react-tree.api.md b/packages/react-components/react-tree/library/etc/react-tree.api.md index 1fbeac4b6638b2..419d5b136e4352 100644 --- a/packages/react-components/react-tree/library/etc/react-tree.api.md +++ b/packages/react-components/react-tree/library/etc/react-tree.api.md @@ -383,6 +383,9 @@ export const TreeProvider: { displayName: string; }; +// @public (undocumented) +export const TreeRootReset: (props: TreeRootResetProps) => JSX.Element; + // @public (undocumented) export type TreeSelectionValue = MultiSelectValue | SingleSelectValue; diff --git a/packages/react-components/react-tree/library/src/components/TreeItem/useTreeItemContextValues.ts b/packages/react-components/react-tree/library/src/components/TreeItem/useTreeItemContextValues.ts index ba9330ef3b28b1..fc200e42d76857 100644 --- a/packages/react-components/react-tree/library/src/components/TreeItem/useTreeItemContextValues.ts +++ b/packages/react-components/react-tree/library/src/components/TreeItem/useTreeItemContextValues.ts @@ -11,9 +11,9 @@ export function useTreeItemContextValues_unstable(state: TreeItemState): TreeIte expandIconRef, actionsRef, treeItemRef, - // eslint-disable-next-line deprecation/deprecation + // eslint-disable-next-line @typescript-eslint/no-deprecated isActionsVisible, - // eslint-disable-next-line deprecation/deprecation + // eslint-disable-next-line @typescript-eslint/no-deprecated isAsideVisible, selectionRef, checked, diff --git a/packages/react-components/react-tree/library/src/components/TreeProvider.cy.tsx b/packages/react-components/react-tree/library/src/components/TreeProvider.cy.tsx new file mode 100644 index 00000000000000..0b466e8aabbe76 --- /dev/null +++ b/packages/react-components/react-tree/library/src/components/TreeProvider.cy.tsx @@ -0,0 +1,153 @@ +import * as React from 'react'; +import { mount as mountBase } from '@cypress/react'; +import { Tree } from '../Tree'; +import { TreeItem, TreeItemProps } from '../TreeItem'; +import { TreeItemLayout } from '../TreeItemLayout'; +import { TreeRootReset } from './TreeProvider'; +import { Popover, PopoverTrigger, PopoverSurface } from '@fluentui/react-popover'; +import { Button } from '@fluentui/react-button'; +import { FluentProvider } from '@fluentui/react-provider'; +import { teamsLightTheme } from '@fluentui/react-theme'; +import { useRestoreFocusTarget } from '@fluentui/react-tabster'; + +const mount = (element: JSX.Element) => { + mountBase({element}); +}; + +describe('TreeRootReset', () => { + it('ensure that a subtree will be treated as a root tree', () => { + const handleOpenChange1 = cy.spy().as('handleOpenChange1'); + const handleOpenChange2 = cy.spy().as('handleOpenChange2'); + + mount( + + + + + + + branch + + + leaf + + + + + + + } + /> + + , + ); + cy.get('[data-testid="item2"]').should('not.exist'); + cy.get('[data-testid="tree-item"]').focus(); + cy.get('[data-testid="item1"]').realClick(); + cy.get('@handleOpenChange1').should('not.have.been.called'); + cy.get('@handleOpenChange2').should('have.been.called'); + cy.get('[data-testid="item2"]').should('exist'); + }); + it('ensures basic navigation between multiple trees', () => { + mount(); + cy.get('[data-testid="item1"]').should('exist').focus(); + cy.get('[data-testid="item2"]').should('not.exist'); + cy.get('[data-testid="action-button"]').should('exist').realClick(); + cy.get('[data-testid="item2"]').should('exist').focus().realPress('{esc}'); + cy.get('[data-testid="action-button"]').should('be.focused').realPress(['Shift', 'Tab']); + cy.get('[data-testid="item1"]').should('exist').should('be.focused'); + }); +}); + +type CustomTreeItemProps = TreeItemProps; + +const CustomTreeItem = ({ children, ...props }: CustomTreeItemProps) => { + const focusTargetAttribute = useRestoreFocusTarget(); + const [layoutChildren, subtree] = React.Children.toArray(children); + + return ( + + + + +
)} diff --git a/packages/react-examples/src/react-experiments/Chiclet/Chiclet.Footer.Example.tsx b/packages/react-examples/src/react-experiments/Chiclet/Chiclet.Footer.Example.tsx index 7e2091f14b53b8..879b2c9677a2a2 100644 --- a/packages/react-examples/src/react-experiments/Chiclet/Chiclet.Footer.Example.tsx +++ b/packages/react-examples/src/react-experiments/Chiclet/Chiclet.Footer.Example.tsx @@ -63,7 +63,7 @@ export const ChicletFooterExample: React.FunctionComponent<{}> = () => { ); }; -// eslint-disable-next-line deprecation/deprecation +// eslint-disable-next-line @typescript-eslint/no-deprecated export interface IFooterComponent extends React.Props { buttonProps: IButtonProps[]; activities: string; diff --git a/packages/react-examples/src/react-experiments/Chiclet/Chiclet.Xsmall.Footer.Example.tsx b/packages/react-examples/src/react-experiments/Chiclet/Chiclet.Xsmall.Footer.Example.tsx index 75e67ce3d8789d..23b55119737203 100644 --- a/packages/react-examples/src/react-experiments/Chiclet/Chiclet.Xsmall.Footer.Example.tsx +++ b/packages/react-examples/src/react-experiments/Chiclet/Chiclet.Xsmall.Footer.Example.tsx @@ -65,7 +65,7 @@ class FooterComponent extends React.Component { } } -// eslint-disable-next-line deprecation/deprecation +// eslint-disable-next-line @typescript-eslint/no-deprecated interface IFooterComponent extends React.Props { buttonProps: IButtonProps[]; attachProps: IIconProps; diff --git a/packages/react-examples/src/react-experiments/CollapsibleSection/CollapsibleSection.Styled.Example.tsx b/packages/react-examples/src/react-experiments/CollapsibleSection/CollapsibleSection.Styled.Example.tsx index 3dceaeca9974ff..eb0edca0abe397 100644 --- a/packages/react-examples/src/react-experiments/CollapsibleSection/CollapsibleSection.Styled.Example.tsx +++ b/packages/react-examples/src/react-experiments/CollapsibleSection/CollapsibleSection.Styled.Example.tsx @@ -12,7 +12,7 @@ import { } from '@fluentui/react-experiments/lib/CollapsibleSection'; // Workaround to prevent errors on usage of Customizer in this file, without disabling all deprecation checks -// eslint-disable-next-line deprecation/deprecation +// eslint-disable-next-line @typescript-eslint/no-deprecated const Customizer = DeprecatedCustomizer; const getPropStyles: ICollapsibleSectionComponent['styles'] = (props, theme): ICollapsibleSectionStylesReturnType => ({ diff --git a/packages/react-examples/src/react-experiments/FloatingPeopleSuggestions/FloatingPeopleSuggestions.HeaderFooter.Example.tsx b/packages/react-examples/src/react-experiments/FloatingPeopleSuggestions/FloatingPeopleSuggestions.HeaderFooter.Example.tsx index 6706413884d65d..c0d5348f6b14e8 100644 --- a/packages/react-examples/src/react-experiments/FloatingPeopleSuggestions/FloatingPeopleSuggestions.HeaderFooter.Example.tsx +++ b/packages/react-examples/src/react-experiments/FloatingPeopleSuggestions/FloatingPeopleSuggestions.HeaderFooter.Example.tsx @@ -186,7 +186,7 @@ export const FloatingPeopleSuggestionsHeaderFooterExample = (): JSX.Element => { }; const _onInputKeyDown = (ev: React.KeyboardEvent) => { - // eslint-disable-next-line deprecation/deprecation + // eslint-disable-next-line @typescript-eslint/no-deprecated const keyCode = ev.which; switch (keyCode) { case KeyCodes.enter: diff --git a/packages/react-examples/src/react-experiments/Slider/Slider.Example.tsx b/packages/react-examples/src/react-experiments/Slider/Slider.Example.tsx index c21925e3cd828f..34a0dbd5649078 100644 --- a/packages/react-examples/src/react-experiments/Slider/Slider.Example.tsx +++ b/packages/react-examples/src/react-experiments/Slider/Slider.Example.tsx @@ -3,7 +3,7 @@ import { Slider as DeprecatedSlider } from '@fluentui/react-experiments'; import { IStackTokens, Stack } from '@fluentui/react'; // Workaround to prevent errors on usage of Slider, without disabling all deprecation checks -// eslint-disable-next-line deprecation/deprecation +// eslint-disable-next-line @typescript-eslint/no-deprecated const Slider = DeprecatedSlider; export interface ISliderBasicExampleState { diff --git a/packages/react-examples/src/react-experiments/Slider/Slider.Vertical.Example.tsx b/packages/react-examples/src/react-experiments/Slider/Slider.Vertical.Example.tsx index 0bad5853589d4d..55b8ad528e4536 100644 --- a/packages/react-examples/src/react-experiments/Slider/Slider.Vertical.Example.tsx +++ b/packages/react-examples/src/react-experiments/Slider/Slider.Vertical.Example.tsx @@ -3,7 +3,7 @@ import { Slider as DeprecatedSlider } from '@fluentui/react-experiments'; import { IStackTokens, Stack } from '@fluentui/react/lib/Stack'; // Workaround to prevent errors on usage of Slider, without disabling all deprecation checks -// eslint-disable-next-line deprecation/deprecation +// eslint-disable-next-line @typescript-eslint/no-deprecated const Slider = DeprecatedSlider; export interface ISliderVerticalExampleState { diff --git a/packages/react-examples/src/react-experiments/Theming/Theming.Schemes.Custom.Example.tsx b/packages/react-examples/src/react-experiments/Theming/Theming.Schemes.Custom.Example.tsx index 841b24ed2754e1..20fc4b40d5b335 100644 --- a/packages/react-examples/src/react-experiments/Theming/Theming.Schemes.Custom.Example.tsx +++ b/packages/react-examples/src/react-experiments/Theming/Theming.Schemes.Custom.Example.tsx @@ -26,7 +26,7 @@ import { CollapsibleSectionRecursiveExample } from '@fluentui/react-examples/lib import { ThemeProvider as DeprecatedThemeProvider } from '@fluentui/foundation-legacy'; // Workaround to prevent errors on usage of ThemeProvider, without disabling all deprecation checks -// eslint-disable-next-line deprecation/deprecation +// eslint-disable-next-line @typescript-eslint/no-deprecated const ThemeProvider = DeprecatedThemeProvider; const regionStyles: IStackComponent['styles'] = (props, theme): IStackStylesReturnType => ({ @@ -186,7 +186,7 @@ export class ThemingSchemesCustomExample extends React.Component<{}, IThemingExa }; public render(): JSX.Element { - // eslint-disable-next-line deprecation/deprecation + // eslint-disable-next-line @typescript-eslint/no-deprecated return {this._renderSchemedComponents()}; } @@ -270,7 +270,7 @@ export class ThemingSchemesCustomExample extends React.Component<{}, IThemingExa }; } -// eslint-disable-next-line deprecation/deprecation +// eslint-disable-next-line @typescript-eslint/no-deprecated const onCommandClick = (ev: any, item?: ICommandBarItemProps) => console.log(item && (item.text || item.name)); const items: ICommandBarItemProps[] = [ { diff --git a/packages/react-examples/src/react-experiments/Theming/Theming.Schemes.Variant.Example.tsx b/packages/react-examples/src/react-experiments/Theming/Theming.Schemes.Variant.Example.tsx index bb9dff394be382..10b3cd60487376 100644 --- a/packages/react-examples/src/react-experiments/Theming/Theming.Schemes.Variant.Example.tsx +++ b/packages/react-examples/src/react-experiments/Theming/Theming.Schemes.Variant.Example.tsx @@ -25,7 +25,7 @@ import { CollapsibleSectionRecursiveExample } from '@fluentui/react-examples/lib import { ThemeProvider as DeprecatedThemeProvider } from '@fluentui/foundation-legacy'; // Workaround to prevent errors on usage of ThemeProvider, without disabling all deprecation checks -// eslint-disable-next-line deprecation/deprecation +// eslint-disable-next-line @typescript-eslint/no-deprecated const ThemeProvider = DeprecatedThemeProvider; const regionStyles: IStackComponent['styles'] = (props, theme): IStackStylesReturnType => ({ @@ -65,7 +65,7 @@ export class ThemingSchemesVariantExample extends React.Component<{}, IThemingEx }; public render(): JSX.Element { - // eslint-disable-next-line deprecation/deprecation + // eslint-disable-next-line @typescript-eslint/no-deprecated return {this._renderSchemedComponents()}; } @@ -149,7 +149,7 @@ export class ThemingSchemesVariantExample extends React.Component<{}, IThemingEx }; } -// eslint-disable-next-line deprecation/deprecation +// eslint-disable-next-line @typescript-eslint/no-deprecated const onCommandClick = (ev: any, item?: ICommandBarItemProps) => console.log(item && (item.text || item.name)); const items: ICommandBarItemProps[] = [ { diff --git a/packages/react-examples/src/react-experiments/UnifiedPeoplePicker/UnifiedPeoplePicker.WithEdit.Example.tsx b/packages/react-examples/src/react-experiments/UnifiedPeoplePicker/UnifiedPeoplePicker.WithEdit.Example.tsx index c7222cbccc2ab8..ac6d30760a83b2 100644 --- a/packages/react-examples/src/react-experiments/UnifiedPeoplePicker/UnifiedPeoplePicker.WithEdit.Example.tsx +++ b/packages/react-examples/src/react-experiments/UnifiedPeoplePicker/UnifiedPeoplePicker.WithEdit.Example.tsx @@ -339,7 +339,7 @@ export const UnifiedPeoplePickerWithEditExample = (): JSX.Element => { const _onKeyDown = React.useCallback( (ev: React.KeyboardEvent) => { - // eslint-disable-next-line deprecation/deprecation + // eslint-disable-next-line @typescript-eslint/no-deprecated if (ev.ctrlKey && ev.which === KeyCodes.k) { ev.preventDefault(); // If the input has text, resolve that diff --git a/packages/react-examples/src/react-focus/FocusZone/FocusZone.List.Example.tsx b/packages/react-examples/src/react-focus/FocusZone/FocusZone.List.Example.tsx index 9db97e849c0e36..c427bac6bb8fcb 100644 --- a/packages/react-examples/src/react-focus/FocusZone/FocusZone.List.Example.tsx +++ b/packages/react-examples/src/react-focus/FocusZone/FocusZone.List.Example.tsx @@ -75,6 +75,6 @@ export const FocusZoneListExample: React.FunctionComponent = () => { }; function _shouldEnterInnerZone(ev: React.KeyboardEvent): boolean { - // eslint-disable-next-line deprecation/deprecation + // eslint-disable-next-line @typescript-eslint/no-deprecated return ev.which === getRTLSafeKeyCode(KeyCodes.right); } diff --git a/packages/react-examples/src/react/Layer/Layer.Customized.Example.tsx b/packages/react-examples/src/react/Layer/Layer.Customized.Example.tsx index bb5bbf2982854b..2d45414d553559 100644 --- a/packages/react-examples/src/react/Layer/Layer.Customized.Example.tsx +++ b/packages/react-examples/src/react/Layer/Layer.Customized.Example.tsx @@ -25,7 +25,7 @@ export const LayerCustomizedExample: React.FunctionComponent = () => {

- {/* eslint-disable-next-line deprecation/deprecation */} + {/* eslint-disable-next-line @typescript-eslint/no-deprecated */} {isPanelOpen && ( { // Demonstrates how to do different things depending on how which element dismissed the panel console.log('Close button clicked or light dismissed.'); - // eslint-disable-next-line deprecation/deprecation + // eslint-disable-next-line @typescript-eslint/no-deprecated const srcElement = ev.nativeEvent.srcElement as Element | null; if (srcElement && srcElement.className.indexOf('ms-Button-icon') !== -1) { console.log('Close button clicked.'); diff --git a/packages/react-examples/src/react/PeoplePicker/examples/PeoplePickerExampleData.ts b/packages/react-examples/src/react/PeoplePicker/examples/PeoplePickerExampleData.ts index 26dd8d3a774818..2aaf840c3b4151 100644 --- a/packages/react-examples/src/react/PeoplePicker/examples/PeoplePickerExampleData.ts +++ b/packages/react-examples/src/react/PeoplePicker/examples/PeoplePickerExampleData.ts @@ -1,7 +1,7 @@ import { IPersonaProps, PersonaPresence } from '@fluentui/react/lib/Persona'; import { TestImages } from '@fluentui/example-data'; -/* eslint-disable deprecation/deprecation */ +/* eslint-disable @typescript-eslint/no-deprecated */ /** @deprecated Use the version from `@fluentui/example-data` instead. */ export const people: (IPersonaProps & { key: string | number })[] = [ diff --git a/packages/react-examples/src/react/Pivot/Pivot.OverflowMenu.Example.tsx b/packages/react-examples/src/react/Pivot/Pivot.OverflowMenu.Example.tsx index a770f91e5c8001..006b89f2bd3e7e 100644 --- a/packages/react-examples/src/react/Pivot/Pivot.OverflowMenu.Example.tsx +++ b/packages/react-examples/src/react/Pivot/Pivot.OverflowMenu.Example.tsx @@ -14,7 +14,7 @@ export const PivotOverflowMenuExample: React.FunctionComponent = () => {
- {/* eslint-disable-next-line deprecation/deprecation */} + {/* eslint-disable-next-line @typescript-eslint/no-deprecated */} +## [8.14.193](https://github.com/microsoft/fluentui/tree/@fluentui/react-experiments_v8.14.193) + +Fri, 17 Jan 2025 07:21:32 GMT +[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-experiments_v8.14.192..@fluentui/react-experiments_v8.14.193) + +### Patches + +- Bump @fluentui/react to v8.122.7 ([commit](https://github.com/microsoft/fluentui/commit/baf887d95f91874c814a7cae749c20e797f828be) by beachball) + ## [8.14.192](https://github.com/microsoft/fluentui/tree/@fluentui/react-experiments_v8.14.192) Mon, 13 Jan 2025 07:21:23 GMT diff --git a/packages/react-experiments/package.json b/packages/react-experiments/package.json index f01f7b540cd0c9..c08698e4eb6eb4 100644 --- a/packages/react-experiments/package.json +++ b/packages/react-experiments/package.json @@ -1,6 +1,6 @@ { "name": "@fluentui/react-experiments", - "version": "8.14.192", + "version": "8.14.193", "description": "Experimental React components for building experiences for Microsoft 365.", "main": "lib-commonjs/index.js", "module": "lib/index.js", @@ -38,7 +38,7 @@ "@fluentui/scripts-webpack": "*" }, "dependencies": { - "@fluentui/react": "^8.122.6", + "@fluentui/react": "^8.122.7", "@fluentui/theme": "^2.6.64", "@microsoft/load-themed-styles": "^1.10.26", "@fluentui/example-data": "^8.4.25", diff --git a/packages/react-experiments/src/Foundation.ts b/packages/react-experiments/src/Foundation.ts index dfe2afe37e74a7..9bf082389c5d77 100644 --- a/packages/react-experiments/src/Foundation.ts +++ b/packages/react-experiments/src/Foundation.ts @@ -1,5 +1,5 @@ export { - // eslint-disable-next-line deprecation/deprecation + // eslint-disable-next-line @typescript-eslint/no-deprecated ThemeProvider, createComponent, createFactory, @@ -22,7 +22,7 @@ export type { IHTMLElementSlot, IHTMLSlot, IProcessedSlotProps, - // eslint-disable-next-line deprecation/deprecation + // eslint-disable-next-line @typescript-eslint/no-deprecated IPropsWithChildren, ISlot, ISlotCreator, diff --git a/packages/react-experiments/src/Styling.ts b/packages/react-experiments/src/Styling.ts index 31e6ed2005a051..563a5a90452e3b 100644 --- a/packages/react-experiments/src/Styling.ts +++ b/packages/react-experiments/src/Styling.ts @@ -6,7 +6,7 @@ export { DefaultEffects, DefaultFontStyles, DefaultPalette, - // eslint-disable-next-line deprecation/deprecation + // eslint-disable-next-line @typescript-eslint/no-deprecated EdgeChromiumHighContrastSelector, FontClassNames, FontSizes, @@ -39,11 +39,11 @@ export { createTheme, focusClear, fontFace, - // eslint-disable-next-line deprecation/deprecation + // eslint-disable-next-line @typescript-eslint/no-deprecated getEdgeChromiumNoHighContrastAdjustSelector, getFadedOverflowStyle, getFocusOutlineStyle, - // eslint-disable-next-line deprecation/deprecation + // eslint-disable-next-line @typescript-eslint/no-deprecated getFocusStyle, getGlobalClassNames, getHighContrastNoAdjustStyle, diff --git a/packages/react-experiments/src/Utilities.ts b/packages/react-experiments/src/Utilities.ts index 0850eaa19b0634..82dae884afcb13 100644 --- a/packages/react-experiments/src/Utilities.ts +++ b/packages/react-experiments/src/Utilities.ts @@ -1,10 +1,8 @@ export { Async, AutoScroll, - // eslint-disable-next-line deprecation/deprecation BaseComponent, Customizations, - // eslint-disable-next-line deprecation/deprecation Customizer, CustomizerContext, DATA_IS_SCROLLABLE_ATTRIBUTE, @@ -87,7 +85,6 @@ export { getRTL, getRTLSafeKeyCode, getRect, - // eslint-disable-next-line deprecation/deprecation getResourceUrl, getScrollbarWidth, getVirtualParent, @@ -99,11 +96,9 @@ export { hoistStatics, htmlElementProperties, iframeProperties, - // eslint-disable-next-line deprecation/deprecation imageProperties, imgProperties, initializeComponentRef, - // eslint-disable-next-line deprecation/deprecation initializeFocusRects, inputProperties, isControlled, @@ -135,7 +130,6 @@ export { optionProperties, portalContainsElement, precisionRound, - // eslint-disable-next-line deprecation/deprecation raiseClick, removeIndex, replaceElement, @@ -145,15 +139,12 @@ export { safeRequestAnimationFrame, safeSetTimeout, selectProperties, - // eslint-disable-next-line deprecation/deprecation setBaseUrl, setFocusVisibility, - // eslint-disable-next-line deprecation/deprecation setLanguage, setMemoizeWeakMap, setPortalAttribute, setRTL, - // eslint-disable-next-line deprecation/deprecation setSSR, setVirtualParent, setWarningCallback, @@ -184,7 +175,6 @@ export type { ICancelable, IChangeDescription, IChangeEventCallback, - // eslint-disable-next-line deprecation/deprecation IClassNames, IClassNamesFunctionOptions, IComponentAs, @@ -207,7 +197,6 @@ export type { IPerfData, IPerfMeasurement, IPerfSummary, - // eslint-disable-next-line deprecation/deprecation IPoint, IPropsWithStyles, IRectangle, @@ -226,13 +215,10 @@ export type { IStyleFunctionOrObject, IVirtualElement, IWarnControlledUsageParams, - // eslint-disable-next-line deprecation/deprecation Omit, Point, RefObject, - // eslint-disable-next-line deprecation/deprecation Settings, - // eslint-disable-next-line deprecation/deprecation SettingsFunction, StyleFunction, } from '@fluentui/react/lib/Utilities'; diff --git a/packages/react-experiments/src/components/BAFAccordion/Accordion.tsx b/packages/react-experiments/src/components/BAFAccordion/Accordion.tsx index 5b06a20205cf0b..e5255d8906397f 100644 --- a/packages/react-experiments/src/components/BAFAccordion/Accordion.tsx +++ b/packages/react-experiments/src/components/BAFAccordion/Accordion.tsx @@ -33,7 +33,7 @@ export class Accordion extends React.Component } public render(): JSX.Element { - // eslint-disable-next-line deprecation/deprecation + // eslint-disable-next-line @typescript-eslint/no-deprecated const { onRenderMenu, className, buttonAs, onClick, ...other } = this.props; let { menuIconProps } = this.props; diff --git a/packages/react-experiments/src/components/CollapsibleSection/CollapsibleSection.state.tsx b/packages/react-experiments/src/components/CollapsibleSection/CollapsibleSection.state.tsx index f15391003754a6..2bf28ff5450275 100644 --- a/packages/react-experiments/src/components/CollapsibleSection/CollapsibleSection.state.tsx +++ b/packages/react-experiments/src/components/CollapsibleSection/CollapsibleSection.state.tsx @@ -37,12 +37,12 @@ export const useCollapsibleSectionState: ICollapsibleSectionComponent['state'] = const collapseKey = getRTL() ? KeyCodes.right : KeyCodes.left; const expandKey = getRTL() ? KeyCodes.left : KeyCodes.right; - // eslint-disable-next-line deprecation/deprecation + // eslint-disable-next-line @typescript-eslint/no-deprecated if (ev.which === collapseKey && !collapsed) { setCollapsed(true); ev.preventDefault(); ev.stopPropagation(); - // eslint-disable-next-line deprecation/deprecation + // eslint-disable-next-line @typescript-eslint/no-deprecated } else if (ev.which === expandKey && collapsed) { setCollapsed(false); ev.preventDefault(); @@ -58,7 +58,7 @@ export const useCollapsibleSectionState: ICollapsibleSectionComponent['state'] = // If left/right keypress originates from text input or text area inside collapsible section, // ignore the event. if ( - // eslint-disable-next-line deprecation/deprecation + // eslint-disable-next-line @typescript-eslint/no-deprecated ev.which === rootKey && ev.target !== titleElementRef.current && titleElementRef.current && diff --git a/packages/react-experiments/src/components/FloatingSuggestions/FloatingSuggestions.tsx b/packages/react-experiments/src/components/FloatingSuggestions/FloatingSuggestions.tsx index 2f9ff8c273ef55..da5d15c9d3a223 100644 --- a/packages/react-experiments/src/components/FloatingSuggestions/FloatingSuggestions.tsx +++ b/packages/react-experiments/src/components/FloatingSuggestions/FloatingSuggestions.tsx @@ -250,7 +250,7 @@ export class FloatingSuggestions ) { return; } - // eslint-disable-next-line deprecation/deprecation + // eslint-disable-next-line @typescript-eslint/no-deprecated const keyCode = ev.which; switch (keyCode) { case KeyCodes.escape: diff --git a/packages/react-experiments/src/components/FolderCover/FolderCover.types.ts b/packages/react-experiments/src/components/FolderCover/FolderCover.types.ts index a93109a9ccf976..15272a3f247347 100644 --- a/packages/react-experiments/src/components/FolderCover/FolderCover.types.ts +++ b/packages/react-experiments/src/components/FolderCover/FolderCover.types.ts @@ -38,6 +38,6 @@ export interface IFolderCoverProps extends IBaseProps, React.HTMLAttributes['children'] | ((childrenProps: IFolderCoverChildrenProps) => JSX.Element | null); } diff --git a/packages/react-experiments/src/components/SelectedItemsList/Items/CopyableItem.tsx b/packages/react-experiments/src/components/SelectedItemsList/Items/CopyableItem.tsx index 8b5f20ec850154..119fedcd7636e9 100644 --- a/packages/react-experiments/src/components/SelectedItemsList/Items/CopyableItem.tsx +++ b/packages/react-experiments/src/components/SelectedItemsList/Items/CopyableItem.tsx @@ -26,7 +26,7 @@ export const CopyableItem = ( // Try to copy the text directly to the clipboard copyInput.value = copyText; copyInput.select(); - // eslint-disable-next-line deprecation/deprecation + // eslint-disable-next-line @typescript-eslint/no-deprecated if (!document.execCommand('copy')) { // The command failed. Fallback to the method below. throw new Error(); diff --git a/packages/react-experiments/src/components/SelectedItemsList/Items/subcomponents/DefaultEditingItem.tsx b/packages/react-experiments/src/components/SelectedItemsList/Items/subcomponents/DefaultEditingItem.tsx index d63f095f6f7084..664dee16f9b0e2 100644 --- a/packages/react-experiments/src/components/SelectedItemsList/Items/subcomponents/DefaultEditingItem.tsx +++ b/packages/react-experiments/src/components/SelectedItemsList/Items/subcomponents/DefaultEditingItem.tsx @@ -195,7 +195,7 @@ export const DefaultEditingItemInner = ( const _onInputKeyDown = React.useCallback( (ev: React.KeyboardEvent): void => { - // eslint-disable-next-line deprecation/deprecation + // eslint-disable-next-line @typescript-eslint/no-deprecated const keyCode = ev.which; switch (keyCode) { case KeyCodes.backspace: diff --git a/packages/react-experiments/src/components/Sidebar/Sidebar.tsx b/packages/react-experiments/src/components/Sidebar/Sidebar.tsx index 8fc07723bb21bf..73cf681c0e082c 100644 --- a/packages/react-experiments/src/components/Sidebar/Sidebar.tsx +++ b/packages/react-experiments/src/components/Sidebar/Sidebar.tsx @@ -154,7 +154,7 @@ export class Sidebar extends React.Component imple } const ButtonAs = this._getButtonAs(item); - // eslint-disable-next-line deprecation/deprecation + // eslint-disable-next-line @typescript-eslint/no-deprecated const name = item.text || item.name; return ( @@ -204,7 +204,7 @@ export class Sidebar extends React.Component imple } const ButtonAs = this._getButtonAs(item); - // eslint-disable-next-line deprecation/deprecation + // eslint-disable-next-line @typescript-eslint/no-deprecated const name = item.text || item.name; return ( @@ -268,7 +268,7 @@ export class Sidebar extends React.Component imple return child; }); - // eslint-disable-next-line deprecation/deprecation + // eslint-disable-next-line @typescript-eslint/no-deprecated const name = item.text || item.name; if (name) { diff --git a/packages/react-experiments/src/components/Slider/Slider.base.tsx b/packages/react-experiments/src/components/Slider/Slider.base.tsx index 6da62030cbce49..d2b0ecf25ffbee 100644 --- a/packages/react-experiments/src/components/Slider/Slider.base.tsx +++ b/packages/react-experiments/src/components/Slider/Slider.base.tsx @@ -15,7 +15,7 @@ import { DirectionalHint } from '@fluentui/react/lib/Callout'; import { Async, EventGroup, FocusRects } from '@fluentui/utilities'; import type { ISliderProps, ISlider, ISliderStyleProps, ISliderStyles, ISliderMarks } from './Slider.types'; -/* eslint-disable deprecation/deprecation */ +/* eslint-disable @typescript-eslint/no-deprecated */ /** @deprecated */ export interface ISliderState { diff --git a/packages/react-experiments/src/components/Slider/Slider.styles.tsx b/packages/react-experiments/src/components/Slider/Slider.styles.tsx index ce9ba0f30375a6..aaa839bebfa53e 100644 --- a/packages/react-experiments/src/components/Slider/Slider.styles.tsx +++ b/packages/react-experiments/src/components/Slider/Slider.styles.tsx @@ -3,7 +3,7 @@ import { getRTL } from '@fluentui/utilities'; import type { ISliderStyleProps, ISliderStyles } from './Slider.types'; import type { IRawStyle } from '../../Styling'; -/* eslint-disable deprecation/deprecation */ +/* eslint-disable @typescript-eslint/no-deprecated */ const tickLabelSpacing = 13; diff --git a/packages/react-experiments/src/components/Slider/Slider.test.tsx b/packages/react-experiments/src/components/Slider/Slider.test.tsx index 8a19df4636b969..3b545995fcc0f1 100644 --- a/packages/react-experiments/src/components/Slider/Slider.test.tsx +++ b/packages/react-experiments/src/components/Slider/Slider.test.tsx @@ -9,7 +9,7 @@ import { ONKEYDOWN_TIMEOUT_DURATION } from './Slider.base'; import { KeyCodes } from '../../Utilities'; import type { ISlider } from './Slider.types'; -/* eslint-disable deprecation/deprecation */ +/* eslint-disable @typescript-eslint/no-deprecated */ describe('Slider', () => { it('renders correctly', () => { diff --git a/packages/react-experiments/src/components/Slider/Slider.tsx b/packages/react-experiments/src/components/Slider/Slider.tsx index a4294f8fc02bfc..9742c6b25fa0c5 100644 --- a/packages/react-experiments/src/components/Slider/Slider.tsx +++ b/packages/react-experiments/src/components/Slider/Slider.tsx @@ -4,7 +4,7 @@ import { SliderBase } from './Slider.base'; import { getStyles } from './Slider.styles'; import type { ISliderProps, ISliderStyleProps, ISliderStyles } from './Slider.types'; -/* eslint-disable deprecation/deprecation */ +/* eslint-disable @typescript-eslint/no-deprecated */ /** * @deprecated This component was experimental and is not longer being developed on, nor will it be supported in the diff --git a/packages/react-experiments/src/components/Slider/Slider.types.ts b/packages/react-experiments/src/components/Slider/Slider.types.ts index 01d2cdbd705902..483058e5becf3d 100644 --- a/packages/react-experiments/src/components/Slider/Slider.types.ts +++ b/packages/react-experiments/src/components/Slider/Slider.types.ts @@ -3,7 +3,7 @@ import { SliderBase } from './Slider.base'; import type { IStyle, ITheme } from '../../Styling'; import type { IStyleFunctionOrObject, IRefObject } from '../../Utilities'; -/* eslint-disable deprecation/deprecation */ +/* eslint-disable @typescript-eslint/no-deprecated */ /** * @deprecated diff --git a/packages/react-experiments/src/components/TilesList/TilesList.types.ts b/packages/react-experiments/src/components/TilesList/TilesList.types.ts index 3d34844e09c8ff..0e51d4bcd60745 100644 --- a/packages/react-experiments/src/components/TilesList/TilesList.types.ts +++ b/packages/react-experiments/src/components/TilesList/TilesList.types.ts @@ -135,7 +135,7 @@ export interface ITilesGridSegment { export interface ITilesListProps extends IBaseProps, - React.Props>, // eslint-disable-line deprecation/deprecation + React.Props>, // eslint-disable-line @typescript-eslint/no-deprecated React.HTMLAttributes { /** * An array of items to assign to the list. diff --git a/packages/react-experiments/src/components/UnifiedPicker/UnifiedPicker.tsx b/packages/react-experiments/src/components/UnifiedPicker/UnifiedPicker.tsx index 383ffa43be53cd..3f844b461e1903 100644 --- a/packages/react-experiments/src/components/UnifiedPicker/UnifiedPicker.tsx +++ b/packages/react-experiments/src/components/UnifiedPicker/UnifiedPicker.tsx @@ -332,19 +332,19 @@ export const UnifiedPicker = (props: IUnifiedPickerProps): JSX. // Allow the caller to handle the key down onKeyDown?.(ev); - // eslint-disable-next-line deprecation/deprecation + // eslint-disable-next-line @typescript-eslint/no-deprecated if (ev.ctrlKey && ev.which === KeyCodes.a) { selectAll(); } // This is a temporary work around, it has localization issues // we plan on rewriting how this works in the future - /* eslint-disable deprecation/deprecation */ + /* eslint-disable @typescript-eslint/no-deprecated */ const isDel = ev.which === KeyCodes.del; const isCut = (ev.shiftKey && isDel) || (ev.ctrlKey && ev.which === KeyCodes.x); const isBackspace = ev.which === KeyCodes.backspace; const isCopy = ev.ctrlKey && ev.which === KeyCodes.c; - /* eslint-enable deprecation/deprecation */ + /* eslint-enable @typescript-eslint/no-deprecated */ const needToCopy = isCut || isCopy; const needToDelete = (isBackspace && selectedItems.length > 0) || ((isCut || isDel) && focusedItemIndices.length > 0); @@ -421,7 +421,7 @@ export const UnifiedPicker = (props: IUnifiedPickerProps): JSX. const _onInputKeyDown = React.useCallback( (ev: React.KeyboardEvent) => { if (isSuggestionsShown) { - // eslint-disable-next-line deprecation/deprecation + // eslint-disable-next-line @typescript-eslint/no-deprecated const keyCode = ev.which; switch (keyCode) { case KeyCodes.escape: diff --git a/packages/react-focus/src/components/FocusZone/FocusZone.tsx b/packages/react-focus/src/components/FocusZone/FocusZone.tsx index de7e797019cab6..7d83edd178e8d9 100644 --- a/packages/react-focus/src/components/FocusZone/FocusZone.tsx +++ b/packages/react-focus/src/components/FocusZone/FocusZone.tsx @@ -62,7 +62,7 @@ function raiseClickFromKeyboardEvent(target: Element, ev?: React.KeyboardEvent implements IFocu * for ref counting to work correctly! */ private static _onKeyDownCapture(ev: KeyboardEvent): void { - // eslint-disable-next-line deprecation/deprecation, @fluentui/deprecated-keyboard-event-props + // eslint-disable-next-line @typescript-eslint/no-deprecated, @fluentui/deprecated-keyboard-event-props if (ev.which === KeyCodes.tab) { _outerZones.forEach((zone: FocusZone) => zone._updateTabIndexes()); } @@ -238,9 +238,9 @@ export class FocusZone extends React.Component implements IFocu if (this.props.defaultTabbableElement && typeof this.props.defaultTabbableElement === 'string') { this._activeElement = this._getDocument().querySelector(this.props.defaultTabbableElement) as HTMLElement; - // eslint-disable-next-line deprecation/deprecation + // eslint-disable-next-line @typescript-eslint/no-deprecated } else if (this.props.defaultActiveElement) { - // eslint-disable-next-line deprecation/deprecation + // eslint-disable-next-line @typescript-eslint/no-deprecated this._activeElement = this._getDocument().querySelector(this.props.defaultActiveElement) as HTMLElement; } @@ -306,7 +306,7 @@ export class FocusZone extends React.Component implements IFocu } public render(): React.ReactNode { - // eslint-disable-next-line deprecation/deprecation + // eslint-disable-next-line @typescript-eslint/no-deprecated const { as: tag, elementType, rootProps, ariaDescribedBy, ariaLabelledBy, className } = this.props; const divProps = getNativeProps(this.props, htmlElementProperties); @@ -338,7 +338,7 @@ export class FocusZone extends React.Component implements IFocu // be replaced so that className is passed to getRootClass and is included there so // the class names will always be in the same order. className={css(getRootClass(), className)} - // eslint-disable-next-line deprecation/deprecation + // eslint-disable-next-line @typescript-eslint/no-deprecated ref={this._mergedRef(this.props.elementRef, this._root)} data-focuszone-id={this._id} // eslint-disable-next-line react/jsx-no-bind @@ -427,7 +427,7 @@ export class FocusZone extends React.Component implements IFocu * @returns True if focus could be set to an active element, false if no operation was taken. */ public focusElement(element: HTMLElement, forceAlignment?: boolean): boolean { - // eslint-disable-next-line deprecation/deprecation + // eslint-disable-next-line @typescript-eslint/no-deprecated const { onBeforeFocus, shouldReceiveFocus } = this.props; if ((shouldReceiveFocus && !shouldReceiveFocus(element)) || (onBeforeFocus && !onBeforeFocus(element))) { @@ -487,10 +487,10 @@ export class FocusZone extends React.Component implements IFocu const { onActiveElementChanged, - // eslint-disable-next-line deprecation/deprecation + // eslint-disable-next-line @typescript-eslint/no-deprecated doNotAllowFocusEventToPropagate, stopFocusPropagation, - // eslint-disable-next-line deprecation/deprecation + // eslint-disable-next-line @typescript-eslint/no-deprecated onFocusNotification, onFocus, shouldFocusInnerElementWhenReceivedFocus, @@ -671,7 +671,7 @@ export class FocusZone extends React.Component implements IFocu return; } - // eslint-disable-next-line deprecation/deprecation + // eslint-disable-next-line @typescript-eslint/no-deprecated const { direction, disabled, isInnerZoneKeystroke, pagingSupportDisabled, shouldEnterInnerZone } = this.props; if (disabled) { @@ -722,7 +722,7 @@ export class FocusZone extends React.Component implements IFocu } else if (ev.altKey) { return; } else { - // eslint-disable-next-line @fluentui/deprecated-keyboard-event-props, deprecation/deprecation + // eslint-disable-next-line @fluentui/deprecated-keyboard-event-props, @typescript-eslint/no-deprecated switch (ev.which) { case KeyCodes.space: if (this._shouldRaiseClicksOnSpace && this._tryInvokeClickForFocusable(ev.target as HTMLElement, ev)) { @@ -778,7 +778,7 @@ export class FocusZone extends React.Component implements IFocu case KeyCodes.tab: if ( - // eslint-disable-next-line deprecation/deprecation + // eslint-disable-next-line @typescript-eslint/no-deprecated this.props.allowTabKey || this.props.handleTabKey === FocusZoneTabbableElements.all || (this.props.handleTabKey === FocusZoneTabbableElements.inputOnly && @@ -924,7 +924,7 @@ export class FocusZone extends React.Component implements IFocu private _moveFocus( isForward: boolean, - // eslint-disable-next-line deprecation/deprecation + // eslint-disable-next-line @typescript-eslint/no-deprecated getDistanceFromCenter: (activeRect: ClientRect, targetRect: ClientRect) => number, ev?: Event, useDefaultWrap: boolean = true, @@ -955,7 +955,7 @@ export class FocusZone extends React.Component implements IFocu if (isBidirectional) { if (element) { const targetRect = element.getBoundingClientRect(); - // eslint-disable-next-line deprecation/deprecation + // eslint-disable-next-line @typescript-eslint/no-deprecated const elementDistance = getDistanceFromCenter(activeRect as ClientRect, targetRect); if (elementDistance === -1 && candidateDistance === -1) { @@ -1005,11 +1005,11 @@ export class FocusZone extends React.Component implements IFocu private _moveFocusDown(): boolean { let targetTop = -1; - // eslint-disable-next-line deprecation/deprecation + // eslint-disable-next-line @typescript-eslint/no-deprecated const leftAlignment = this._focusAlignment.left || this._focusAlignment.x || 0; if ( - // eslint-disable-next-line deprecation/deprecation + // eslint-disable-next-line @typescript-eslint/no-deprecated this._moveFocus(true, (activeRect: ClientRect, targetRect: ClientRect) => { let distance = -1; // ClientRect values can be floats that differ by very small fractions of a decimal. @@ -1048,11 +1048,11 @@ export class FocusZone extends React.Component implements IFocu private _moveFocusUp(): boolean { let targetTop = -1; - // eslint-disable-next-line deprecation/deprecation + // eslint-disable-next-line @typescript-eslint/no-deprecated const leftAlignment = this._focusAlignment.left || this._focusAlignment.x || 0; if ( - // eslint-disable-next-line deprecation/deprecation + // eslint-disable-next-line @typescript-eslint/no-deprecated this._moveFocus(false, (activeRect: ClientRect, targetRect: ClientRect) => { let distance = -1; // ClientRect values can be floats that differ by very small fractions of a decimal. @@ -1094,7 +1094,7 @@ export class FocusZone extends React.Component implements IFocu if ( this._moveFocus( getRTL(theme), - // eslint-disable-next-line deprecation/deprecation + // eslint-disable-next-line @typescript-eslint/no-deprecated (activeRect: ClientRect, targetRect: ClientRect) => { let distance = -1; let topBottomComparison; @@ -1137,7 +1137,7 @@ export class FocusZone extends React.Component implements IFocu if ( this._moveFocus( !getRTL(theme), - // eslint-disable-next-line deprecation/deprecation + // eslint-disable-next-line @typescript-eslint/no-deprecated (activeRect: ClientRect, targetRect: ClientRect) => { let distance = -1; let topBottomComparison; @@ -1177,12 +1177,12 @@ export class FocusZone extends React.Component implements IFocu private _getHorizontalDistanceFromCenter = ( isForward: boolean, - // eslint-disable-next-line deprecation/deprecation + // eslint-disable-next-line @typescript-eslint/no-deprecated activeRect: ClientRect, - // eslint-disable-next-line deprecation/deprecation + // eslint-disable-next-line @typescript-eslint/no-deprecated targetRect: ClientRect, ): number => { - // eslint-disable-next-line deprecation/deprecation + // eslint-disable-next-line @typescript-eslint/no-deprecated const leftAlignment = this._focusAlignment.left || this._focusAlignment.x || 0; // ClientRect values can be floats that differ by very small fractions of a decimal. // If the difference between top and bottom are within a pixel then we should treat diff --git a/packages/react-hooks/src/useConstCallback.test.tsx b/packages/react-hooks/src/useConstCallback.test.tsx index 0e7df950273550..aea43bcac40b3e 100644 --- a/packages/react-hooks/src/useConstCallback.test.tsx +++ b/packages/react-hooks/src/useConstCallback.test.tsx @@ -1,4 +1,4 @@ -/* eslint-disable deprecation/deprecation */ +/* eslint-disable @typescript-eslint/no-deprecated */ import * as React from 'react'; import { mount } from 'enzyme'; import { useConstCallback } from './useConstCallback'; diff --git a/packages/react-hooks/src/useMountSync.test.tsx b/packages/react-hooks/src/useMountSync.test.tsx index 8cd46d1b4cff90..08722c994e177a 100644 --- a/packages/react-hooks/src/useMountSync.test.tsx +++ b/packages/react-hooks/src/useMountSync.test.tsx @@ -7,7 +7,7 @@ describe('useMountSync', () => { const onMount = jest.fn(); const TestComponent: React.FunctionComponent = () => { - // eslint-disable-next-line deprecation/deprecation + // eslint-disable-next-line @typescript-eslint/no-deprecated useMountSync(() => { onMount(); }); diff --git a/packages/react-monaco-editor/CHANGELOG.json b/packages/react-monaco-editor/CHANGELOG.json index a9165e4ed2632c..3bc576576e9b58 100644 --- a/packages/react-monaco-editor/CHANGELOG.json +++ b/packages/react-monaco-editor/CHANGELOG.json @@ -1,6 +1,27 @@ { "name": "@fluentui/react-monaco-editor", "entries": [ + { + "date": "Fri, 17 Jan 2025 07:21:32 GMT", + "tag": "@fluentui/react-monaco-editor_v1.7.279", + "version": "1.7.279", + "comments": { + "patch": [ + { + "author": "beachball", + "package": "@fluentui/react-monaco-editor", + "comment": "Bump @fluentui/react to v8.122.7", + "commit": "baf887d95f91874c814a7cae749c20e797f828be" + }, + { + "author": "beachball", + "package": "@fluentui/react-monaco-editor", + "comment": "Bump @fluentui/react-charting to v5.23.41", + "commit": "baf887d95f91874c814a7cae749c20e797f828be" + } + ] + } + }, { "date": "Mon, 13 Jan 2025 07:21:23 GMT", "tag": "@fluentui/react-monaco-editor_v1.7.278", diff --git a/packages/react-monaco-editor/CHANGELOG.md b/packages/react-monaco-editor/CHANGELOG.md index 347343e2e9ed51..c29dc163f96936 100644 --- a/packages/react-monaco-editor/CHANGELOG.md +++ b/packages/react-monaco-editor/CHANGELOG.md @@ -1,9 +1,19 @@ # Change Log - @fluentui/react-monaco-editor -This log was last generated on Mon, 13 Jan 2025 07:21:23 GMT and should not be manually modified. +This log was last generated on Fri, 17 Jan 2025 07:21:32 GMT and should not be manually modified. +## [1.7.279](https://github.com/microsoft/fluentui/tree/@fluentui/react-monaco-editor_v1.7.279) + +Fri, 17 Jan 2025 07:21:32 GMT +[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-monaco-editor_v1.7.278..@fluentui/react-monaco-editor_v1.7.279) + +### Patches + +- Bump @fluentui/react to v8.122.7 ([commit](https://github.com/microsoft/fluentui/commit/baf887d95f91874c814a7cae749c20e797f828be) by beachball) +- Bump @fluentui/react-charting to v5.23.41 ([commit](https://github.com/microsoft/fluentui/commit/baf887d95f91874c814a7cae749c20e797f828be) by beachball) + ## [1.7.278](https://github.com/microsoft/fluentui/tree/@fluentui/react-monaco-editor_v1.7.278) Mon, 13 Jan 2025 07:21:23 GMT diff --git a/packages/react-monaco-editor/package.json b/packages/react-monaco-editor/package.json index 661f83943e8eef..92edf729901440 100644 --- a/packages/react-monaco-editor/package.json +++ b/packages/react-monaco-editor/package.json @@ -1,6 +1,6 @@ { "name": "@fluentui/react-monaco-editor", - "version": "1.7.278", + "version": "1.7.279", "description": "Live React example editing using monaco", "main": "lib-commonjs/index.js", "module": "lib/index.js", @@ -29,12 +29,12 @@ "@fluentui/scripts-webpack": "*" }, "dependencies": { - "@fluentui/react": "^8.122.6", + "@fluentui/react": "^8.122.7", "@microsoft/load-themed-styles": "^1.10.26", "@fluentui/example-data": "^8.4.25", "@fluentui/monaco-editor": "^1.3.24", "@fluentui/react-hooks": "^8.8.16", - "@fluentui/react-charting": "^5.23.40", + "@fluentui/react-charting": "^5.23.41", "raw-loader": "4.0.2", "react-syntax-highlighter": "^10.1.3", "tslib": "^2.1.0" diff --git a/packages/react-monaco-editor/src/utilities/getQueryParam.ts b/packages/react-monaco-editor/src/utilities/getQueryParam.ts index 028858691935f5..0837e5ef2833ed 100644 --- a/packages/react-monaco-editor/src/utilities/getQueryParam.ts +++ b/packages/react-monaco-editor/src/utilities/getQueryParam.ts @@ -10,7 +10,7 @@ export function getQueryParam(name: string, url?: string): string | null { url = url || (win ? win.location.href : ''); // Manually get the query string in case it's after the hash (possible with hash routing) const queryIndex = url.indexOf('?'); - // eslint-disable-next-line deprecation/deprecation + // eslint-disable-next-line @typescript-eslint/no-deprecated const query = queryIndex !== -1 ? url.substr(queryIndex) : ''; const regex = new RegExp(`[?&]${name}(=([^&#]*)|&|#|$)`); diff --git a/packages/react/CHANGELOG.json b/packages/react/CHANGELOG.json index 88716d9606fe0a..eb7da96614886e 100644 --- a/packages/react/CHANGELOG.json +++ b/packages/react/CHANGELOG.json @@ -1,6 +1,33 @@ { "name": "@fluentui/react", "entries": [ + { + "date": "Fri, 17 Jan 2025 07:21:31 GMT", + "tag": "@fluentui/react_v8.122.7", + "version": "8.122.7", + "comments": { + "patch": [ + { + "author": "kmatejka@microsoft.com", + "package": "@fluentui/react", + "commit": "e9706f78650b2a72e09dca1c5f69f23f4967f33b", + "comment": "fix: Passing rest of ITagItemSuggestionProps to the underlying component." + }, + { + "author": "706967+KevinTCoughlin@users.noreply.github.com", + "package": "@fluentui/react", + "commit": "6e8378b3d1ef9b27ed944b5eae855c59ce348836", + "comment": "Delete border property from ms-PositioningContainer-layerHost containing typo" + }, + { + "author": "kmatejka@microsoft.com", + "package": "@fluentui/react", + "commit": "614e8b594da0eec4104f9fcaa034a4352fee5c74", + "comment": "add missing data-id attribute to close button in TagItem" + } + ] + } + }, { "date": "Mon, 13 Jan 2025 07:21:22 GMT", "tag": "@fluentui/react_v8.122.6", diff --git a/packages/react/CHANGELOG.md b/packages/react/CHANGELOG.md index 7d8b9d600a8490..8e1e2d1642a521 100644 --- a/packages/react/CHANGELOG.md +++ b/packages/react/CHANGELOG.md @@ -1,9 +1,20 @@ # Change Log - @fluentui/react -This log was last generated on Mon, 13 Jan 2025 07:21:22 GMT and should not be manually modified. +This log was last generated on Fri, 17 Jan 2025 07:21:31 GMT and should not be manually modified. +## [8.122.7](https://github.com/microsoft/fluentui/tree/@fluentui/react_v8.122.7) + +Fri, 17 Jan 2025 07:21:31 GMT +[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react_v8.122.6..@fluentui/react_v8.122.7) + +### Patches + +- fix: Passing rest of ITagItemSuggestionProps to the underlying component. ([PR #32839](https://github.com/microsoft/fluentui/pull/32839) by kmatejka@microsoft.com) +- Delete border property from ms-PositioningContainer-layerHost containing typo ([PR #32885](https://github.com/microsoft/fluentui/pull/32885) by 706967+KevinTCoughlin@users.noreply.github.com) +- add missing data-id attribute to close button in TagItem ([PR #31956](https://github.com/microsoft/fluentui/pull/31956) by kmatejka@microsoft.com) + ## [8.122.6](https://github.com/microsoft/fluentui/tree/@fluentui/react_v8.122.6) Mon, 13 Jan 2025 07:21:22 GMT diff --git a/packages/react/package.json b/packages/react/package.json index 8a452f08378d43..fe335a033141be 100644 --- a/packages/react/package.json +++ b/packages/react/package.json @@ -1,6 +1,6 @@ { "name": "@fluentui/react", - "version": "8.122.6", + "version": "8.122.7", "description": "Reusable React components for building web experiences.", "main": "lib-commonjs/index.js", "module": "lib/index.js", diff --git a/packages/react/src/Icons.ts b/packages/react/src/Icons.ts index 599092ba2b673d..03d3957842437a 100644 --- a/packages/react/src/Icons.ts +++ b/packages/react/src/Icons.ts @@ -1,6 +1,3 @@ export { initializeIcons } from '@fluentui/font-icons-mdl2'; -export type { - // eslint-disable-next-line deprecation/deprecation - IconNames, -} from '@fluentui/font-icons-mdl2'; +export type { IconNames } from '@fluentui/font-icons-mdl2'; diff --git a/packages/react/src/Styling.ts b/packages/react/src/Styling.ts index 4dd00c1d37dee2..70fd768411455e 100644 --- a/packages/react/src/Styling.ts +++ b/packages/react/src/Styling.ts @@ -7,7 +7,6 @@ export { DefaultEffects, DefaultFontStyles, DefaultPalette, - // eslint-disable-next-line deprecation/deprecation EdgeChromiumHighContrastSelector, FontClassNames, FontSizes, @@ -39,11 +38,9 @@ export { createFontStyles, focusClear, fontFace, - // eslint-disable-next-line deprecation/deprecation getEdgeChromiumNoHighContrastAdjustSelector, getFadedOverflowStyle, getFocusOutlineStyle, - // eslint-disable-next-line deprecation/deprecation getFocusStyle, getGlobalClassNames, getHighContrastNoAdjustStyle, diff --git a/packages/react/src/Utilities.ts b/packages/react/src/Utilities.ts index b01024409bbe23..d7dd63e523e347 100644 --- a/packages/react/src/Utilities.ts +++ b/packages/react/src/Utilities.ts @@ -2,10 +2,8 @@ import './version'; export { Async, AutoScroll, - // eslint-disable-next-line deprecation/deprecation BaseComponent, Customizations, - // eslint-disable-next-line deprecation/deprecation Customizer, CustomizerContext, DATA_IS_SCROLLABLE_ATTRIBUTE, @@ -92,7 +90,6 @@ export { getRTL, getRTLSafeKeyCode, getRect, - // eslint-disable-next-line deprecation/deprecation getResourceUrl, getScrollbarWidth, getVirtualParent, @@ -104,11 +101,9 @@ export { hoistStatics, htmlElementProperties, iframeProperties, - // eslint-disable-next-line deprecation/deprecation imageProperties, imgProperties, initializeComponentRef, - // eslint-disable-next-line deprecation/deprecation initializeFocusRects, inputProperties, isControlled, @@ -142,7 +137,6 @@ export { optionProperties, portalContainsElement, precisionRound, - // eslint-disable-next-line deprecation/deprecation raiseClick, removeDirectionalKeyCode, removeIndex, @@ -153,15 +147,12 @@ export { safeRequestAnimationFrame, safeSetTimeout, selectProperties, - // eslint-disable-next-line deprecation/deprecation setBaseUrl, setFocusVisibility, - // eslint-disable-next-line deprecation/deprecation setLanguage, setMemoizeWeakMap, setPortalAttribute, setRTL, - // eslint-disable-next-line deprecation/deprecation setSSR, setVirtualParent, setWarningCallback, @@ -203,7 +194,6 @@ export type { ICancelable, IChangeDescription, IChangeEventCallback, - // eslint-disable-next-line deprecation/deprecation IClassNames, IClassNamesFunctionOptions, IComponentAs, @@ -227,7 +217,6 @@ export type { IPerfData, IPerfMeasurement, IPerfSummary, - // eslint-disable-next-line deprecation/deprecation IPoint, IPropsWithStyles, IReactProps, @@ -247,13 +236,10 @@ export type { IStyleFunctionOrObject, IVirtualElement, IWarnControlledUsageParams, - // eslint-disable-next-line deprecation/deprecation Omit, Point, RefObject, - // eslint-disable-next-line deprecation/deprecation Settings, - // eslint-disable-next-line deprecation/deprecation SettingsFunction, ShadowConfigHook, StyleFunction, diff --git a/packages/react/src/components/ActivityItem/ActivityItem.tsx b/packages/react/src/components/ActivityItem/ActivityItem.tsx index be14dc32000938..09bffc407073da 100644 --- a/packages/react/src/components/ActivityItem/ActivityItem.tsx +++ b/packages/react/src/components/ActivityItem/ActivityItem.tsx @@ -57,7 +57,7 @@ export class ActivityItem extends React.Component { private _onRenderActivityDescription = (props: IActivityItemProps): JSX.Element | null => { const classNames = this._getClassNames(props); - // eslint-disable-next-line deprecation/deprecation + // eslint-disable-next-line @typescript-eslint/no-deprecated const activityDescription = props.activityDescription || props.activityDescriptionText; if (activityDescription) { @@ -70,7 +70,7 @@ export class ActivityItem extends React.Component { private _onRenderComments = (props: IActivityItemProps): JSX.Element | null => { const classNames = this._getClassNames(props); - // eslint-disable-next-line deprecation/deprecation + // eslint-disable-next-line @typescript-eslint/no-deprecated const comments = props.comments || props.commentText; if (!props.isCompact && comments) { @@ -117,7 +117,7 @@ export class ActivityItem extends React.Component { {...person} key={person.key || index} className={classNames.activityPersona} - // eslint-disable-next-line deprecation/deprecation + // eslint-disable-next-line @typescript-eslint/no-deprecated size={showSize16Personas ? PersonaSize.size16 : PersonaSize.size32} style={style} />, diff --git a/packages/react/src/components/Autofill/Autofill.tsx b/packages/react/src/components/Autofill/Autofill.tsx index 5b5ebb4a3635fd..903d5625301414 100644 --- a/packages/react/src/components/Autofill/Autofill.tsx +++ b/packages/react/src/components/Autofill/Autofill.tsx @@ -40,9 +40,9 @@ export class Autofill extends React.Component im private _async: Async; public static getDerivedStateFromProps(props: IAutofillProps, state: IAutofillState): IAutofillState | null { - // eslint-disable-next-line deprecation/deprecation + // eslint-disable-next-line @typescript-eslint/no-deprecated if (props.updateValueInWillReceiveProps) { - // eslint-disable-next-line deprecation/deprecation + // eslint-disable-next-line @typescript-eslint/no-deprecated const updatedInputValue = props.updateValueInWillReceiveProps(); // Don't update if we have a null value or the value isn't changing // the value should still update if an empty string is passed in @@ -247,7 +247,7 @@ export class Autofill extends React.Component im // Right now typing does not have isComposing, once that has been fixed any should be removed. if (!(ev.nativeEvent as any).isComposing) { - // eslint-disable-next-line deprecation/deprecation + // eslint-disable-next-line @typescript-eslint/no-deprecated switch (ev.which) { case KeyCodes.backspace: this._autoFillEnabled = false; @@ -263,7 +263,7 @@ export class Autofill extends React.Component im break; default: if (!this._autoFillEnabled) { - // eslint-disable-next-line deprecation/deprecation + // eslint-disable-next-line @typescript-eslint/no-deprecated if (this.props.enableAutofillOnKeyPress!.indexOf(ev.which) !== -1) { this._autoFillEnabled = true; } @@ -339,7 +339,7 @@ export class Autofill extends React.Component im return; } - // eslint-disable-next-line deprecation/deprecation + // eslint-disable-next-line @typescript-eslint/no-deprecated const { onInputChange, onInputValueChange } = this.props; if (onInputChange) { newValue = onInputChange?.(newValue, composing) || ''; diff --git a/packages/react/src/components/Button/BaseButton.tsx b/packages/react/src/components/Button/BaseButton.tsx index 94d0917462d5d7..478609d9822197 100644 --- a/packages/react/src/components/Button/BaseButton.tsx +++ b/packages/react/src/components/Button/BaseButton.tsx @@ -127,7 +127,7 @@ export class BaseButton extends React.Component { - // eslint-disable-next-line deprecation/deprecation + // eslint-disable-next-line @typescript-eslint/no-deprecated const { secondaryText = this.props.description } = props; // ms-Button-description is only shown when the button type is compound. @@ -741,7 +741,7 @@ export class BaseButton extends React.Component) => { // explicity cancelling event so click won't fire after this - // eslint-disable-next-line deprecation/deprecation + // eslint-disable-next-line @typescript-eslint/no-deprecated if (this.props.disabled && (ev.which === KeyCodes.enter || ev.which === KeyCodes.space)) { ev.preventDefault(); ev.stopPropagation(); @@ -765,9 +765,9 @@ export class BaseButton extends React.Component, ) => { - // eslint-disable-next-line deprecation/deprecation + // eslint-disable-next-line @typescript-eslint/no-deprecated if (!this.props.disabled && this.props.onKeyPress !== undefined) { - // eslint-disable-next-line deprecation/deprecation + // eslint-disable-next-line @typescript-eslint/no-deprecated this.props.onKeyPress(ev); // not cancelling event because it's not disabled } }; @@ -801,7 +801,7 @@ export class BaseButton extends React.Component) => { - // eslint-disable-next-line deprecation/deprecation + // eslint-disable-next-line @typescript-eslint/no-deprecated if (ev.which === KeyCodes.enter || ev.which === KeyCodes.space) { if (this._buttonElement.current) { this._buttonElement.current.click(); @@ -822,9 +822,9 @@ export class BaseButton extends React.Component, ): boolean { if (this.props.menuTriggerKeyCode) { - // eslint-disable-next-line deprecation/deprecation + // eslint-disable-next-line @typescript-eslint/no-deprecated return ev.which === this.props.menuTriggerKeyCode; } else if (this.props.menuProps) { - // eslint-disable-next-line deprecation/deprecation + // eslint-disable-next-line @typescript-eslint/no-deprecated return ev.which === KeyCodes.down && (ev.altKey || ev.metaKey); } diff --git a/packages/react/src/components/Button/Button.tsx b/packages/react/src/components/Button/Button.tsx index 0d5d40b7e22f46..1116ee9954380a 100644 --- a/packages/react/src/components/Button/Button.tsx +++ b/packages/react/src/components/Button/Button.tsx @@ -27,7 +27,7 @@ export class Button extends React.Component { public render(): JSX.Element { const props = this.props; - // eslint-disable-next-line deprecation/deprecation + // eslint-disable-next-line @typescript-eslint/no-deprecated switch (props.buttonType) { case ButtonType.command: return ; diff --git a/packages/react/src/components/Button/Button.types.ts b/packages/react/src/components/Button/Button.types.ts index 99831ea88ca2ac..98c852b824789d 100644 --- a/packages/react/src/components/Button/Button.types.ts +++ b/packages/react/src/components/Button/Button.types.ts @@ -42,12 +42,12 @@ export interface IButton { /** * {@docCategory Button} */ -/* eslint-disable deprecation/deprecation */ +/* eslint-disable @typescript-eslint/no-deprecated */ export interface IButtonProps extends React.AllHTMLAttributes< HTMLAnchorElement | HTMLButtonElement | HTMLDivElement | BaseButton | Button | HTMLSpanElement > { - /* eslint-enable deprecation/deprecation */ + /* eslint-enable @typescript-eslint/no-deprecated */ /** * Optional callback to access the `IButton` interface. Use this instead of `ref` for accessing * the public methods and properties of the component. diff --git a/packages/react/src/components/Calendar/Calendar.base.tsx b/packages/react/src/components/Calendar/Calendar.base.tsx index 7063088c48fe72..8fbb84984bd1be 100644 --- a/packages/react/src/components/Calendar/Calendar.base.tsx +++ b/packages/react/src/components/Calendar/Calendar.base.tsx @@ -228,7 +228,7 @@ export const CalendarBase: React.FunctionComponent = React.forwa const onButtonKeyDown = (callback: () => void): ((ev: React.KeyboardEvent) => void) => { return (ev: React.KeyboardEvent) => { - // eslint-disable-next-line deprecation/deprecation + // eslint-disable-next-line @typescript-eslint/no-deprecated switch (ev.which) { case KeyCodes.enter: case KeyCodes.space: @@ -239,7 +239,7 @@ export const CalendarBase: React.FunctionComponent = React.forwa }; const onDatePickerPopupKeyDown = (ev: React.KeyboardEvent): void => { - // eslint-disable-next-line deprecation/deprecation + // eslint-disable-next-line @typescript-eslint/no-deprecated switch (ev.which) { case KeyCodes.enter: ev.preventDefault(); diff --git a/packages/react/src/components/Calendar/CalendarDay/CalendarDay.base.tsx b/packages/react/src/components/Calendar/CalendarDay/CalendarDay.base.tsx index 6d3d8d20887dc5..617a9c1e5d0f02 100644 --- a/packages/react/src/components/Calendar/CalendarDay/CalendarDay.base.tsx +++ b/packages/react/src/components/Calendar/CalendarDay/CalendarDay.base.tsx @@ -184,7 +184,7 @@ CalendarDayNavigationButtons.displayName = 'CalendarDayNavigationButtons'; const onButtonKeyDown = (callback?: () => void): ((ev: React.KeyboardEvent) => void) => (ev: React.KeyboardEvent) => { - // eslint-disable-next-line deprecation/deprecation + // eslint-disable-next-line @typescript-eslint/no-deprecated switch (ev.which) { case KeyCodes.enter: callback?.(); diff --git a/packages/react/src/components/Calendar/CalendarMonth/CalendarMonth.base.tsx b/packages/react/src/components/Calendar/CalendarMonth/CalendarMonth.base.tsx index beec6b01e027cc..c4ba11411400fb 100644 --- a/packages/react/src/components/Calendar/CalendarMonth/CalendarMonth.base.tsx +++ b/packages/react/src/components/Calendar/CalendarMonth/CalendarMonth.base.tsx @@ -347,7 +347,7 @@ function isCurrentMonth(month: number, year: number, today: Date): boolean { function onButtonKeyDown(callback: () => void): (ev: React.KeyboardEvent) => void { return (ev: React.KeyboardEvent) => { - // eslint-disable-next-line deprecation/deprecation + // eslint-disable-next-line @typescript-eslint/no-deprecated switch (ev.which) { case KeyCodes.enter: callback(); diff --git a/packages/react/src/components/Calendar/CalendarYear/CalendarYear.base.tsx b/packages/react/src/components/Calendar/CalendarYear/CalendarYear.base.tsx index f571407ed56c62..fc919642228fb7 100644 --- a/packages/react/src/components/Calendar/CalendarYear/CalendarYear.base.tsx +++ b/packages/react/src/components/Calendar/CalendarYear/CalendarYear.base.tsx @@ -78,7 +78,7 @@ const CalendarYearGridCell: React.FunctionComponent }; const onKeyDown = (ev: React.KeyboardEvent) => { - // eslint-disable-next-line deprecation/deprecation + // eslint-disable-next-line @typescript-eslint/no-deprecated if (ev.which === KeyCodes.enter) { onSelectYear?.(year); } @@ -246,7 +246,7 @@ const CalendarYearNavArrow: React.FunctionComponent }; const onKeyDown = (ev: React.KeyboardEvent) => { - // eslint-disable-next-line deprecation/deprecation + // eslint-disable-next-line @typescript-eslint/no-deprecated if (ev.which === KeyCodes.enter) { onNavigate(); } @@ -308,7 +308,7 @@ const CalendarYearTitle: React.FunctionComponent = pro }; const onHeaderKeyDown = (ev: React.KeyboardEvent) => { - // eslint-disable-next-line deprecation/deprecation + // eslint-disable-next-line @typescript-eslint/no-deprecated if (ev.which === KeyCodes.enter || ev.which === KeyCodes.space) { onHeaderSelect(); } diff --git a/packages/react/src/components/CalendarDayGrid/CalendarGridDayCell.tsx b/packages/react/src/components/CalendarDayGrid/CalendarGridDayCell.tsx index 34ba32188bf104..2cc7ec9f334f50 100644 --- a/packages/react/src/components/CalendarDayGrid/CalendarGridDayCell.tsx +++ b/packages/react/src/components/CalendarDayGrid/CalendarGridDayCell.tsx @@ -44,18 +44,18 @@ export const CalendarGridDayCell: React.FunctionComponent): void => { - // eslint-disable-next-line deprecation/deprecation + // eslint-disable-next-line @typescript-eslint/no-deprecated if (ev.which === KeyCodes.enter) { onSelectDate?.(day.originalDate); } else { diff --git a/packages/react/src/components/Callout/CalloutContent.base.tsx b/packages/react/src/components/Callout/CalloutContent.base.tsx index 9355bc972c5159..89550932965a2f 100644 --- a/packages/react/src/components/Callout/CalloutContent.base.tsx +++ b/packages/react/src/components/Callout/CalloutContent.base.tsx @@ -492,7 +492,7 @@ export const CalloutContentBase: React.FunctionComponent = React. backgroundColor, calloutMaxHeight, onScroll, - // eslint-disable-next-line deprecation/deprecation + // eslint-disable-next-line @typescript-eslint/no-deprecated shouldRestoreFocus = true, target, hidden, diff --git a/packages/react/src/components/Check/Check.styles.ts b/packages/react/src/components/Check/Check.styles.ts index c721df0c45a9f5..96f5e3ffea913d 100644 --- a/packages/react/src/components/Check/Check.styles.ts +++ b/packages/react/src/components/Check/Check.styles.ts @@ -12,7 +12,7 @@ export const CheckGlobalClassNames = { }; export const getStyles = (props: ICheckStyleProps): ICheckStyles => { - // eslint-disable-next-line deprecation/deprecation + // eslint-disable-next-line @typescript-eslint/no-deprecated const { height = props.checkBoxHeight || '18px', checked, className, theme } = props; const { palette, semanticColors, fonts } = theme; diff --git a/packages/react/src/components/Coachmark/Coachmark.base.tsx b/packages/react/src/components/Coachmark/Coachmark.base.tsx index b9baad61890973..a6b2a25b62c6e1 100644 --- a/packages/react/src/components/Coachmark/Coachmark.base.tsx +++ b/packages/react/src/components/Coachmark/Coachmark.base.tsx @@ -215,9 +215,9 @@ function useListeners( (e: KeyboardEvent) => { // Open coachmark if user presses ALT + C (arbitrary keypress for now) if ( - // eslint-disable-next-line deprecation/deprecation + // eslint-disable-next-line @typescript-eslint/no-deprecated (e.altKey && e.which === KeyCodes.c) || - // eslint-disable-next-line deprecation/deprecation + // eslint-disable-next-line @typescript-eslint/no-deprecated (e.which === KeyCodes.enter && translateAnimationContainer.current?.contains?.(e.target as Node)) ) { openCoachmark(); @@ -582,7 +582,7 @@ function getBounds( } function isInsideElement( - // eslint-disable-next-line deprecation/deprecation + // eslint-disable-next-line @typescript-eslint/no-deprecated targetElementRect: ClientRect, mouseX: number, mouseY: number, diff --git a/packages/react/src/components/Coachmark/PositioningContainer/PositioningContainer.styles.ts b/packages/react/src/components/Coachmark/PositioningContainer/PositioningContainer.styles.ts index 9a937fa4728542..0b6c0b04ae5038 100644 --- a/packages/react/src/components/Coachmark/PositioningContainer/PositioningContainer.styles.ts +++ b/packages/react/src/components/Coachmark/PositioningContainer/PositioningContainer.styles.ts @@ -27,7 +27,6 @@ export const getClassNames = memoizeFunction((): IPositioningContainerNames => { { position: 'absolute', boxSizing: 'border-box', - border: '1px solid ${}', selectors: { [HighContrastSelector]: { border: '1px solid WindowText', diff --git a/packages/react/src/components/Coachmark/__snapshots__/Coachmark.test.tsx.snap b/packages/react/src/components/Coachmark/__snapshots__/Coachmark.test.tsx.snap index 35d2abd3f2213f..88104bf8a4a12f 100644 --- a/packages/react/src/components/Coachmark/__snapshots__/Coachmark.test.tsx.snap +++ b/packages/react/src/components/Coachmark/__snapshots__/Coachmark.test.tsx.snap @@ -39,7 +39,6 @@ exports[`Coachmark renders Coachmark (color properties) 1`] = ` class= ms-PositioningContainer-layerHost { - border: 1px solid \${}; box-sizing: border-box; outline: transparent; position: absolute; @@ -275,7 +274,6 @@ exports[`Coachmark renders Coachmark (correctly) 1`] = ` class= ms-PositioningContainer-layerHost { - border: 1px solid \${}; box-sizing: border-box; outline: transparent; position: absolute; @@ -513,7 +511,6 @@ exports[`Coachmark renders Coachmark (isCollapsed) 1`] = ` class= ms-PositioningContainer-layerHost { - border: 1px solid \${}; box-sizing: border-box; outline: transparent; position: absolute; diff --git a/packages/react/src/components/ColorPicker/ColorPicker.base.tsx b/packages/react/src/components/ColorPicker/ColorPicker.base.tsx index 689124806e30dc..fbcff3c608998d 100644 --- a/packages/react/src/components/ColorPicker/ColorPicker.base.tsx +++ b/packages/react/src/components/ColorPicker/ColorPicker.base.tsx @@ -120,7 +120,7 @@ export class ColorPickerBase extends React.Component; this._textLabels = { - /* eslint-disable deprecation/deprecation */ + /* eslint-disable @typescript-eslint/no-deprecated */ r: props.redLabel || strings.red || defaultStrings.red, g: props.greenLabel || strings.green || defaultStrings.green, b: props.blueLabel || strings.blue || defaultStrings.blue, a: props.alphaLabel || strings.alpha || defaultStrings.alpha, hex: props.hexLabel || strings.hex || defaultStrings.hex, t: strings.transparency || defaultStrings.transparency, - /* eslint-enable deprecation/deprecation */ + /* eslint-enable @typescript-eslint/no-deprecated */ }; this._strings = { @@ -180,7 +180,7 @@ export class ColorPickerBase extends React.Component { - // eslint-disable-next-line deprecation/deprecation + // eslint-disable-next-line @typescript-eslint/no-deprecated const { theme, className, type = 'hue', isAlpha: useAlphaBackground = type !== 'hue' } = props; const { palette, effects } = theme; diff --git a/packages/react/src/components/ComboBox/ComboBox.tsx b/packages/react/src/components/ComboBox/ComboBox.tsx index e342c4b6798a35..9b6823d72a6d7d 100644 --- a/packages/react/src/components/ComboBox/ComboBox.tsx +++ b/packages/react/src/components/ComboBox/ComboBox.tsx @@ -1233,7 +1233,7 @@ class ComboBoxInternal extends React.Component): void => { const doc = getDocumentEx(this.context); // Do nothing if the blur is coming from something @@ -2108,7 +2108,7 @@ class ComboBoxInternal extends React.Component= 112 /* F1 */ && ev.which <= 123 /* F12 */) { return; } // If we get here and we got either and ALT key // or meta key, let the event propagate - // eslint-disable-next-line deprecation/deprecation + // eslint-disable-next-line @typescript-eslint/no-deprecated if (ev.keyCode === KeyCodes.alt || ev.key === 'Meta' /* && isOpen */) { return; } - // eslint-disable-next-line deprecation/deprecation + // eslint-disable-next-line @typescript-eslint/no-deprecated if (allowParentArrowNavigation && (ev.keyCode === KeyCodes.left || ev.keyCode === KeyCodes.right)) { return; } @@ -2306,7 +2306,7 @@ class ComboBoxInternal extends React.Component 123) /* F12 */ ) { ev.stopPropagation(); @@ -2618,6 +2618,6 @@ function getPreviewText(item: IComboBoxOption): string { * Returns true if the key for the event is alt (Mac option) or meta (Mac command). */ function isAltOrMeta(ev: React.KeyboardEvent): boolean { - // eslint-disable-next-line deprecation/deprecation + // eslint-disable-next-line @typescript-eslint/no-deprecated return ev.which === KeyCodes.alt || ev.key === 'Meta'; } diff --git a/packages/react/src/components/CommandBar/CommandBar.base.tsx b/packages/react/src/components/CommandBar/CommandBar.base.tsx index eaee893cf0d677..42b273d37e153b 100644 --- a/packages/react/src/components/CommandBar/CommandBar.base.tsx +++ b/packages/react/src/components/CommandBar/CommandBar.base.tsx @@ -166,7 +166,7 @@ export class CommandBarBase extends React.Component implem return item.onRender(item, () => undefined); } - // eslint-disable-next-line deprecation/deprecation + // eslint-disable-next-line @typescript-eslint/no-deprecated const itemText = item.text || item.name; const commandButtonProps: ICommandBarItemProps = { allowDisabledFocus: true, @@ -213,7 +213,7 @@ export class CommandBarBase extends React.Component implem private _onButtonClick(item: ICommandBarItemProps): (ev: React.MouseEvent) => void { return ev => { // inactive is deprecated. remove check in 7.0 - // eslint-disable-next-line deprecation/deprecation + // eslint-disable-next-line @typescript-eslint/no-deprecated if (item.inactive) { return; } diff --git a/packages/react/src/components/ContextualMenu/ContextualMenu.base.tsx b/packages/react/src/components/ContextualMenu/ContextualMenu.base.tsx index c457e42be1a7fd..d29bbe64054d87 100644 --- a/packages/react/src/components/ContextualMenu/ContextualMenu.base.tsx +++ b/packages/react/src/components/ContextualMenu/ContextualMenu.base.tsx @@ -98,7 +98,7 @@ export function getSubmenuItems( ): IContextualMenuItem[] | undefined { const target = options?.target; - // eslint-disable-next-line deprecation/deprecation + // eslint-disable-next-line @typescript-eslint/no-deprecated const items = item.subMenuProps ? item.subMenuProps.items : item.items; if (items) { @@ -356,7 +356,7 @@ function useKeyHandlers( const shouldCloseSubMenu = (ev: React.KeyboardEvent): boolean => { const submenuCloseKey = getRTL(theme) ? KeyCodes.right : KeyCodes.left; - // eslint-disable-next-line deprecation/deprecation + // eslint-disable-next-line @typescript-eslint/no-deprecated if (ev.which !== submenuCloseKey || !isSubMenu) { return false; } @@ -369,10 +369,10 @@ function useKeyHandlers( const shouldHandleKeyDown = (ev: React.KeyboardEvent) => { return ( - // eslint-disable-next-line deprecation/deprecation + // eslint-disable-next-line @typescript-eslint/no-deprecated ev.which === KeyCodes.escape || shouldCloseSubMenu(ev) || - // eslint-disable-next-line deprecation/deprecation + // eslint-disable-next-line @typescript-eslint/no-deprecated (ev.which === KeyCodes.up && (ev.altKey || ev.metaKey)) ); }; @@ -383,7 +383,7 @@ function useKeyHandlers( lastKeyDownWasAltOrMeta.current = isAltOrMeta(ev); // On Mac, pressing escape dismisses all levels of native context menus - // eslint-disable-next-line deprecation/deprecation + // eslint-disable-next-line @typescript-eslint/no-deprecated const dismissAllMenus = ev.which === KeyCodes.escape && (isMac() || isIOS()); return keyHandler(ev, shouldHandleKeyDown, dismissAllMenus); @@ -421,9 +421,9 @@ function useKeyHandlers( // If we have a modifier key being pressed, we do not want to move focus. // Otherwise, handle up and down keys. const hasModifier = !!(ev.altKey || ev.metaKey); - // eslint-disable-next-line deprecation/deprecation + // eslint-disable-next-line @typescript-eslint/no-deprecated const isUp = ev.which === KeyCodes.up; - // eslint-disable-next-line deprecation/deprecation + // eslint-disable-next-line @typescript-eslint/no-deprecated const isDown = ev.which === KeyCodes.down; if (!hasModifier && (isUp || isDown)) { const elementToFocus = isUp @@ -443,7 +443,7 @@ function useKeyHandlers( if ( !item.disabled && - // eslint-disable-next-line deprecation/deprecation + // eslint-disable-next-line @typescript-eslint/no-deprecated (ev.which === openKey || ev.which === KeyCodes.enter || (ev.which === KeyCodes.down && (ev.altKey || ev.metaKey))) ) { openSubMenu(item, ev.currentTarget as HTMLElement); @@ -780,7 +780,7 @@ export const ContextualMenuBase: React.FunctionComponent = const onDefaultRenderMenuList = ( menuListProps: IContextualMenuListProps, - // eslint-disable-next-line deprecation/deprecation + // eslint-disable-next-line @typescript-eslint/no-deprecated menuClassNames: IProcessedStyleSet | IContextualMenuClassNames, defaultRender?: IRenderFunction, ): JSX.Element => { @@ -825,13 +825,13 @@ export const ContextualMenuBase: React.FunctionComponent = totalItemCount: number, hasCheckmarks: boolean, hasIcons: boolean, - // eslint-disable-next-line deprecation/deprecation + // eslint-disable-next-line @typescript-eslint/no-deprecated menuClassNames: IProcessedStyleSet | IContextualMenuClassNames, ): JSX.Element => { const renderedItems: React.ReactNode[] = []; const iconProps = item.iconProps || { iconName: 'None' }; const { - getItemClassNames, // eslint-disable-line deprecation/deprecation + getItemClassNames, // eslint-disable-line @typescript-eslint/no-deprecated itemProps, } = item; const styles = itemProps ? itemProps.styles : undefined; @@ -841,7 +841,7 @@ export const ContextualMenuBase: React.FunctionComponent = const dividerClassName = item.itemType === ContextualMenuItemType.Divider ? item.className : undefined; const subMenuIconClassName = item.submenuIconProps ? item.submenuIconProps.className : ''; - // eslint-disable-next-line deprecation/deprecation + // eslint-disable-next-line @typescript-eslint/no-deprecated let itemClassNames: IMenuItemClassNames; // IContextualMenuItem#getItemClassNames for backwards compatibility @@ -883,7 +883,7 @@ export const ContextualMenuBase: React.FunctionComponent = ); } - // eslint-disable-next-line deprecation/deprecation + // eslint-disable-next-line @typescript-eslint/no-deprecated if (item.text === '-' || item.name === '-') { item.itemType = ContextualMenuItemType.Divider; } @@ -925,7 +925,7 @@ export const ContextualMenuBase: React.FunctionComponent = const defaultMenuItemRenderer = ( item: IContextualMenuItemRenderProps, - // eslint-disable-next-line deprecation/deprecation + // eslint-disable-next-line @typescript-eslint/no-deprecated menuClassNames: IProcessedStyleSet | IContextualMenuClassNames, ): React.ReactNode => { const { index, focusableElementIndex, totalItemCount, hasCheckmarks, hasIcons } = item; @@ -942,9 +942,9 @@ export const ContextualMenuBase: React.FunctionComponent = const renderSectionItem = ( sectionItem: IContextualMenuItem, - // eslint-disable-next-line deprecation/deprecation + // eslint-disable-next-line @typescript-eslint/no-deprecated itemClassNames: IMenuItemClassNames, - // eslint-disable-next-line deprecation/deprecation + // eslint-disable-next-line @typescript-eslint/no-deprecated menuClassNames: IProcessedStyleSet | IContextualMenuClassNames, index: number, hasCheckmarks: boolean, @@ -1033,7 +1033,7 @@ export const ContextualMenuBase: React.FunctionComponent = const renderListItem = ( content: React.ReactNode, key: string | number, - classNames: IMenuItemClassNames, // eslint-disable-line deprecation/deprecation + classNames: IMenuItemClassNames, // eslint-disable-line @typescript-eslint/no-deprecated title?: string, ) => { return ( @@ -1045,7 +1045,7 @@ export const ContextualMenuBase: React.FunctionComponent = const renderSeparator = ( index: number, - classNames: IMenuItemClassNames, // eslint-disable-line deprecation/deprecation + classNames: IMenuItemClassNames, // eslint-disable-line @typescript-eslint/no-deprecated top?: boolean, fromSection?: boolean, ): React.ReactNode => { @@ -1064,7 +1064,7 @@ export const ContextualMenuBase: React.FunctionComponent = const renderNormalItem = ( item: IContextualMenuItem, - classNames: IMenuItemClassNames, // eslint-disable-line deprecation/deprecation + classNames: IMenuItemClassNames, // eslint-disable-line @typescript-eslint/no-deprecated index: number, focusableElementIndex: number, totalItemCount: number, @@ -1142,9 +1142,9 @@ export const ContextualMenuBase: React.FunctionComponent = const renderHeaderMenuItem = ( item: IContextualMenuItem, - // eslint-disable-next-line deprecation/deprecation + // eslint-disable-next-line @typescript-eslint/no-deprecated itemClassNames: IMenuItemClassNames, - // eslint-disable-next-line deprecation/deprecation + // eslint-disable-next-line @typescript-eslint/no-deprecated menuClassNames: IProcessedStyleSet | IContextualMenuClassNames, index: number, hasCheckmarks: boolean, @@ -1164,7 +1164,7 @@ export const ContextualMenuBase: React.FunctionComponent = const divHtmlProperties = itemProps && getNativeProps>(itemProps, divProperties); return ( - // eslint-disable-next-line deprecation/deprecation + // eslint-disable-next-line @typescript-eslint/no-deprecated
= defaultRender?: IRenderFunction, ) => onDefaultRenderMenuList(menuListProps, classNames, defaultRender), focusZoneProps, - // eslint-disable-next-line deprecation/deprecation + // eslint-disable-next-line @typescript-eslint/no-deprecated getMenuClassNames, } = props; @@ -1374,7 +1374,7 @@ ContextualMenuBase.displayName = 'ContextualMenuBase'; * Returns true if the key for the event is alt (Mac option) or meta (Mac command). */ function isAltOrMeta(ev: React.KeyboardEvent): boolean { - // eslint-disable-next-line deprecation/deprecation + // eslint-disable-next-line @typescript-eslint/no-deprecated return ev.which === KeyCodes.alt || ev.key === 'Meta'; } diff --git a/packages/react/src/components/ContextualMenu/ContextualMenu.classNames.ts b/packages/react/src/components/ContextualMenu/ContextualMenu.classNames.ts index 5f7fc8247bebe6..8e06f9b6710854 100644 --- a/packages/react/src/components/ContextualMenu/ContextualMenu.classNames.ts +++ b/packages/react/src/components/ContextualMenu/ContextualMenu.classNames.ts @@ -50,10 +50,10 @@ const CONTEXTUAL_SPLIT_MENU_MINWIDTH = '28px'; const MediumScreenSelector = getScreenSelector(0, ScreenWidthMaxMedium); export const getSplitButtonVerticalDividerClassNames = memoizeFunction( - /* eslint-disable deprecation/deprecation */ + /* eslint-disable @typescript-eslint/no-deprecated */ (theme: ITheme): IVerticalDividerClassNames => { return mergeStyleSets(getDividerClassNames(theme), { - /* eslint-enable deprecation/deprecation */ + /* eslint-enable @typescript-eslint/no-deprecated */ wrapper: { position: 'absolute', right: 28, // width of the splitMenu based on the padding plus icon fontSize @@ -267,7 +267,7 @@ export const getItemStyles = (props: IContextualMenuItemStyleProps): IContextual className, } = props; - // eslint-disable-next-line deprecation/deprecation + // eslint-disable-next-line @typescript-eslint/no-deprecated return getItemClassNames( theme, disabled, diff --git a/packages/react/src/components/ContextualMenu/ContextualMenu.types.ts b/packages/react/src/components/ContextualMenu/ContextualMenu.types.ts index d4daf4a6ff9ea3..90d202fb5d2ac1 100644 --- a/packages/react/src/components/ContextualMenu/ContextualMenu.types.ts +++ b/packages/react/src/components/ContextualMenu/ContextualMenu.types.ts @@ -50,7 +50,7 @@ export interface IContextualMenu {} export interface IContextualMenuProps extends IBaseProps, React.RefAttributes, - // eslint-disable-next-line deprecation/deprecation + // eslint-disable-next-line @typescript-eslint/no-deprecated IWithResponsiveModeState { /** * Optional callback to access the IContextualMenu interface. Use this instead of ref for accessing @@ -232,7 +232,7 @@ export interface IContextualMenuProps * Method to provide the classnames to style the contextual menu. * @deprecated Use `styles` instead to leverage mergeStyles API. */ - // eslint-disable-next-line deprecation/deprecation + // eslint-disable-next-line @typescript-eslint/no-deprecated getMenuClassNames?: (theme: ITheme, className?: string) => IContextualMenuClassNames; /** Custom render function for a submenu. */ @@ -466,7 +466,7 @@ export interface IContextualMenuItem { iconClassName?: string, subMenuClassName?: string, primaryDisabled?: boolean, - ) => // eslint-disable-next-line deprecation/deprecation + ) => // eslint-disable-next-line @typescript-eslint/no-deprecated IMenuItemClassNames; /** @@ -479,7 +479,7 @@ export interface IContextualMenuItem { * Default value is the `getSplitButtonVerticalDividerClassNames` func defined in `ContextualMenu.classnames.ts`. * @defaultvalue getSplitButtonVerticalDividerClassNames */ - // eslint-disable-next-line deprecation/deprecation + // eslint-disable-next-line @typescript-eslint/no-deprecated getSplitButtonVerticalDividerClassNames?: (theme: ITheme) => IVerticalDividerClassNames; /** diff --git a/packages/react/src/components/ContextualMenu/ContextualMenuItem.base.tsx b/packages/react/src/components/ContextualMenu/ContextualMenuItem.base.tsx index bc1d1e70003d46..12512ae28e9f99 100644 --- a/packages/react/src/components/ContextualMenu/ContextualMenuItem.base.tsx +++ b/packages/react/src/components/ContextualMenu/ContextualMenuItem.base.tsx @@ -42,11 +42,11 @@ const renderCheckMarkIcon = ({ onCheckmarkClick, item, classNames }: IContextual }; const renderItemName = ({ item, classNames }: IContextualMenuItemProps) => { - /* eslint-disable deprecation/deprecation */ + /* eslint-disable @typescript-eslint/no-deprecated */ if (item.text || item.name) { return {item.text || item.name}; } - /* eslint-enable deprecation/deprecation */ + /* eslint-enable @typescript-eslint/no-deprecated */ return null; }; diff --git a/packages/react/src/components/ContextualMenu/ContextualMenuItem.test.tsx b/packages/react/src/components/ContextualMenu/ContextualMenuItem.test.tsx index 96e327c93c5314..ae509c0a94decc 100644 --- a/packages/react/src/components/ContextualMenu/ContextualMenuItem.test.tsx +++ b/packages/react/src/components/ContextualMenu/ContextualMenuItem.test.tsx @@ -12,7 +12,7 @@ describe('ContextMenuItemChildren', () => { describe('when a checkmark icon', () => { let onCheckmarkClick: jest.Mock; let menuItem: IContextualMenuItem; - // eslint-disable-next-line deprecation/deprecation + // eslint-disable-next-line @typescript-eslint/no-deprecated let menuClassNames: IMenuItemClassNames; let wrapper: ShallowWrapper; @@ -52,7 +52,7 @@ describe('ContextMenuItemChildren', () => { describe('when hide checkmark icon for toggle command', () => { let onCheckmarkClick: jest.Mock; let menuItem: IContextualMenuItem; - // eslint-disable-next-line deprecation/deprecation + // eslint-disable-next-line @typescript-eslint/no-deprecated let menuClassNames: IMenuItemClassNames; let wrapper: ShallowWrapper; @@ -96,7 +96,7 @@ describe('ContextMenuItemChildren', () => { describe('when it has icons', () => { describe('when it has iconProps', () => { let menuItem: IContextualMenuItem; - // eslint-disable-next-line deprecation/deprecation + // eslint-disable-next-line @typescript-eslint/no-deprecated let menuClassNames: IMenuItemClassNames; let wrapper: ShallowWrapper; @@ -116,7 +116,7 @@ describe('ContextMenuItemChildren', () => { describe('when it doesnt have iconProps', () => { let menuItem: IContextualMenuItem; - // eslint-disable-next-line deprecation/deprecation + // eslint-disable-next-line @typescript-eslint/no-deprecated let menuClassNames: IMenuItemClassNames; let wrapper: ShallowWrapper; @@ -137,7 +137,7 @@ describe('ContextMenuItemChildren', () => { describe('when it has a sub menu', () => { let menuItem: IContextualMenuItem; - // eslint-disable-next-line deprecation/deprecation + // eslint-disable-next-line @typescript-eslint/no-deprecated let menuClassNames: IMenuItemClassNames; let wrapper: ShallowWrapper; @@ -157,7 +157,7 @@ describe('ContextMenuItemChildren', () => { }); }); -// eslint-disable-next-line deprecation/deprecation +// eslint-disable-next-line @typescript-eslint/no-deprecated function getMenuItemClassNames(): IMenuItemClassNames { return { item: 'item', diff --git a/packages/react/src/components/ContextualMenu/ContextualMenuItem.types.ts b/packages/react/src/components/ContextualMenu/ContextualMenuItem.types.ts index 7a282139185ef2..87717484ba4bdb 100644 --- a/packages/react/src/components/ContextualMenu/ContextualMenuItem.types.ts +++ b/packages/react/src/components/ContextualMenu/ContextualMenuItem.types.ts @@ -59,7 +59,7 @@ export interface IContextualMenuItemProps extends React.HTMLAttributes { describe('creates a normal button', () => { let menuItem: IContextualMenuItem; - // eslint-disable-next-line deprecation/deprecation + // eslint-disable-next-line @typescript-eslint/no-deprecated let menuClassNames: IMenuItemClassNames; beforeEach(() => { @@ -77,7 +77,7 @@ describe('ContextualMenuButton', () => { }); }); -// eslint-disable-next-line deprecation/deprecation +// eslint-disable-next-line @typescript-eslint/no-deprecated function getMenuItemClassNames(): IMenuItemClassNames { return { item: 'item', diff --git a/packages/react/src/components/ContextualMenu/ContextualMenuItemWrapper/ContextualMenuAnchor.tsx b/packages/react/src/components/ContextualMenu/ContextualMenuItemWrapper/ContextualMenuAnchor.tsx index 1332938bf43c39..0229de4526a7ba 100644 --- a/packages/react/src/components/ContextualMenu/ContextualMenuItemWrapper/ContextualMenuAnchor.tsx +++ b/packages/react/src/components/ContextualMenu/ContextualMenuItemWrapper/ContextualMenuAnchor.tsx @@ -102,7 +102,7 @@ export class ContextualMenuAnchor extends ContextualMenuItemWrapper { aria-posinset={focusableElementIndex + 1} aria-setsize={totalItemCount} aria-disabled={isItemDisabled(item)} - // eslint-disable-next-line deprecation/deprecation + // eslint-disable-next-line @typescript-eslint/no-deprecated style={item.style} onClick={this._onItemClick} onMouseEnter={this._onItemMouseEnter} diff --git a/packages/react/src/components/ContextualMenu/ContextualMenuItemWrapper/ContextualMenuButton.test.tsx b/packages/react/src/components/ContextualMenu/ContextualMenuItemWrapper/ContextualMenuButton.test.tsx index 0d7dd4aa6a0ec9..d7af3d0b3944ea 100644 --- a/packages/react/src/components/ContextualMenu/ContextualMenuItemWrapper/ContextualMenuButton.test.tsx +++ b/packages/react/src/components/ContextualMenu/ContextualMenuItemWrapper/ContextualMenuButton.test.tsx @@ -8,7 +8,7 @@ import type { IMenuItemClassNames } from '../ContextualMenu.classNames'; describe('ContextualMenuButton', () => { describe('creates a normal button', () => { let menuItem: IContextualMenuItem; - // eslint-disable-next-line deprecation/deprecation + // eslint-disable-next-line @typescript-eslint/no-deprecated let menuClassNames: IMenuItemClassNames; beforeEach(() => { @@ -108,7 +108,7 @@ describe('ContextualMenuButton', () => { }); }); -// eslint-disable-next-line deprecation/deprecation +// eslint-disable-next-line @typescript-eslint/no-deprecated function getMenuItemClassNames(): IMenuItemClassNames { return { item: 'item', diff --git a/packages/react/src/components/ContextualMenu/ContextualMenuItemWrapper/ContextualMenuButton.tsx b/packages/react/src/components/ContextualMenu/ContextualMenuItemWrapper/ContextualMenuButton.tsx index 2e0110c0294b9c..deb0f288f57adb 100644 --- a/packages/react/src/components/ContextualMenu/ContextualMenuItemWrapper/ContextualMenuButton.tsx +++ b/packages/react/src/components/ContextualMenu/ContextualMenuItemWrapper/ContextualMenuButton.tsx @@ -103,7 +103,7 @@ export class ContextualMenuButton extends ContextualMenuItemWrapper { (itemRole === 'menuitemcheckbox' || itemRole === 'menuitemradio') && canCheck ? !!isChecked : undefined, 'aria-selected': itemRole === 'menuitem' && canCheck ? !!isChecked : undefined, role: itemRole, - // eslint-disable-next-line deprecation/deprecation + // eslint-disable-next-line @typescript-eslint/no-deprecated style: item.style, }; diff --git a/packages/react/src/components/ContextualMenu/ContextualMenuItemWrapper/ContextualMenuItemWrapper.types.ts b/packages/react/src/components/ContextualMenu/ContextualMenuItemWrapper/ContextualMenuItemWrapper.types.ts index ded2c689bd511f..4f396f47e4c98c 100644 --- a/packages/react/src/components/ContextualMenu/ContextualMenuItemWrapper/ContextualMenuItemWrapper.types.ts +++ b/packages/react/src/components/ContextualMenu/ContextualMenuItemWrapper/ContextualMenuItemWrapper.types.ts @@ -19,7 +19,7 @@ export interface IContextualMenuItemWrapperProps extends React.ClassAttributes { describe('creates a normal split button', () => { let menuItem: IContextualMenuItem; - // eslint-disable-next-line deprecation/deprecation + // eslint-disable-next-line @typescript-eslint/no-deprecated let menuClassNames: IMenuItemClassNames; beforeEach(() => { @@ -53,7 +53,7 @@ describe('ContextualMenuSplitButton', () => { }); }); -// eslint-disable-next-line deprecation/deprecation +// eslint-disable-next-line @typescript-eslint/no-deprecated function getMenuItemClassNames(): IMenuItemClassNames { return { item: 'item', diff --git a/packages/react/src/components/ContextualMenu/ContextualMenuItemWrapper/ContextualMenuSplitButton.tsx b/packages/react/src/components/ContextualMenu/ContextualMenuItemWrapper/ContextualMenuSplitButton.tsx index cc31624a6acadb..451765bcf0b6cf 100644 --- a/packages/react/src/components/ContextualMenu/ContextualMenuItemWrapper/ContextualMenuSplitButton.tsx +++ b/packages/react/src/components/ContextualMenu/ContextualMenuItemWrapper/ContextualMenuSplitButton.tsx @@ -136,7 +136,7 @@ export class ContextualMenuSplitButton extends ContextualMenuItemWrapper { protected _onItemKeyDown = (ev: React.KeyboardEvent): void => { const { item, onItemKeyDown } = this.props; - // eslint-disable-next-line deprecation/deprecation + // eslint-disable-next-line @typescript-eslint/no-deprecated if (ev.which === KeyCodes.enter) { this._executeItemClick(ev); ev.preventDefault(); @@ -161,7 +161,7 @@ export class ContextualMenuSplitButton extends ContextualMenuItemWrapper { private _renderSplitPrimaryButton( item: IContextualMenuItem, - // eslint-disable-next-line deprecation/deprecation + // eslint-disable-next-line @typescript-eslint/no-deprecated classNames: IMenuItemClassNames, index: number, hasCheckmarks: boolean, @@ -172,11 +172,11 @@ export class ContextualMenuSplitButton extends ContextualMenuItemWrapper { const itemProps: IContextualMenuItem = { key: item.key, disabled: isItemDisabled(item) || item.primaryDisabled, - /* eslint-disable deprecation/deprecation */ + /* eslint-disable @typescript-eslint/no-deprecated */ name: item.name, text: item.text || item.name, secondaryText: item.secondaryText, - /* eslint-enable deprecation/deprecation */ + /* eslint-enable @typescript-eslint/no-deprecated */ className: classNames.splitPrimary, canCheck: item.canCheck, isChecked: item.isChecked, @@ -214,7 +214,7 @@ export class ContextualMenuSplitButton extends ContextualMenuItemWrapper { private _renderSplitIconButton( item: IContextualMenuItem, - classNames: IMenuItemClassNames, // eslint-disable-line deprecation/deprecation + classNames: IMenuItemClassNames, // eslint-disable-line @typescript-eslint/no-deprecated index: number, keytipAttributes: any, ) { diff --git a/packages/react/src/components/ContextualMenu/index.ts b/packages/react/src/components/ContextualMenu/index.ts index 8af110d1a174a0..3271595d5d54f5 100644 --- a/packages/react/src/components/ContextualMenu/index.ts +++ b/packages/react/src/components/ContextualMenu/index.ts @@ -6,9 +6,8 @@ export * from './ContextualMenuItem.base'; export * from './ContextualMenuItem.types'; export { getMenuItemStyles } from './ContextualMenu.cnstyles'; export { - // eslint-disable-next-line deprecation/deprecation getItemClassNames as getContextualMenuItemClassNames, getItemStyles as getContextualMenuItemStyles, } from './ContextualMenu.classNames'; -// eslint-disable-next-line deprecation/deprecation + export type { IContextualMenuClassNames, IMenuItemClassNames } from './ContextualMenu.classNames'; diff --git a/packages/react/src/components/DatePicker/DatePicker.base.tsx b/packages/react/src/components/DatePicker/DatePicker.base.tsx index 57412493d53eb0..17e37f7ffee89b 100644 --- a/packages/react/src/components/DatePicker/DatePicker.base.tsx +++ b/packages/react/src/components/DatePicker/DatePicker.base.tsx @@ -344,7 +344,7 @@ export const DatePickerBase: React.FunctionComponent = React.f }; const onTextFieldKeyDown = (ev: React.KeyboardEvent): void => { - // eslint-disable-next-line deprecation/deprecation + // eslint-disable-next-line @typescript-eslint/no-deprecated switch (ev.which) { case KeyCodes.enter: ev.preventDefault(); diff --git a/packages/react/src/components/DetailsList/DetailsColumn.base.tsx b/packages/react/src/components/DetailsList/DetailsColumn.base.tsx index 2fdd35162ea6f1..813de6d01e08b5 100644 --- a/packages/react/src/components/DetailsList/DetailsColumn.base.tsx +++ b/packages/react/src/components/DetailsList/DetailsColumn.base.tsx @@ -371,11 +371,11 @@ export class DetailsColumnBase extends React.Component { }; private _updateHeaderDragInfo = (itemIndex: number, event?: MouseEvent) => { - /* eslint-disable deprecation/deprecation */ + /* eslint-disable @typescript-eslint/no-deprecated */ if (this.props.setDraggedItemIndex) { this.props.setDraggedItemIndex(itemIndex); } - /* eslint-enable deprecation/deprecation */ + /* eslint-enable @typescript-eslint/no-deprecated */ if (this.props.updateDragInfo) { this.props.updateDragInfo({ itemIndex }, event); } diff --git a/packages/react/src/components/DetailsList/DetailsHeader.base.tsx b/packages/react/src/components/DetailsList/DetailsHeader.base.tsx index d53de17bcfe6ab..7d96fc6898d74f 100644 --- a/packages/react/src/components/DetailsList/DetailsHeader.base.tsx +++ b/packages/react/src/components/DetailsList/DetailsHeader.base.tsx @@ -413,10 +413,10 @@ export class DetailsHeaderBase targetIndex, }; columnReorderProps.onColumnDrop(dragDropDetails); - /* eslint-disable deprecation/deprecation */ + /* eslint-disable @typescript-eslint/no-deprecated */ } else if (columnReorderProps.handleColumnReorder) { columnReorderProps.handleColumnReorder(this._draggedColumnIndex, targetIndex); - /* eslint-enable deprecation/deprecation */ + /* eslint-enable @typescript-eslint/no-deprecated */ } } } @@ -773,7 +773,7 @@ export class DetailsHeaderBase const columnIndex = Number(columnIndexAttr); if (!columnResizeDetails) { - // eslint-disable-next-line deprecation/deprecation + // eslint-disable-next-line @typescript-eslint/no-deprecated if (ev.which === KeyCodes.enter) { this.setState({ columnResizeDetails: { @@ -788,7 +788,7 @@ export class DetailsHeaderBase } else { let increment: number | undefined; - // eslint-disable-next-line deprecation/deprecation + // eslint-disable-next-line @typescript-eslint/no-deprecated if (ev.which === KeyCodes.enter) { this.setState({ columnResizeDetails: undefined, @@ -796,10 +796,10 @@ export class DetailsHeaderBase ev.preventDefault(); ev.stopPropagation(); - // eslint-disable-next-line deprecation/deprecation + // eslint-disable-next-line @typescript-eslint/no-deprecated } else if (ev.which === KeyCodes.left) { increment = getRTL(this.props.theme) ? 1 : -1; - // eslint-disable-next-line deprecation/deprecation + // eslint-disable-next-line @typescript-eslint/no-deprecated } else if (ev.which === KeyCodes.right) { increment = getRTL(this.props.theme) ? -1 : 1; } diff --git a/packages/react/src/components/DetailsList/DetailsList.base.tsx b/packages/react/src/components/DetailsList/DetailsList.base.tsx index 3102537a9234b6..ddf29a64d3d212 100644 --- a/packages/react/src/components/DetailsList/DetailsList.base.tsx +++ b/packages/react/src/components/DetailsList/DetailsList.base.tsx @@ -141,11 +141,11 @@ const DetailsListInner: React.ComponentType = ( selectionMode = selection.mode, selectionPreservedOnEmptyClick, selectionZoneProps, - // eslint-disable-next-line deprecation/deprecation + // eslint-disable-next-line @typescript-eslint/no-deprecated ariaLabel, ariaLabelForGrid, rowElementEventMap, - // eslint-disable-next-line deprecation/deprecation + // eslint-disable-next-line @typescript-eslint/no-deprecated shouldApplyApplicationRole = false, getKey, listProps, @@ -593,7 +593,7 @@ const DetailsListInner: React.ComponentType = ( const isRightArrow = React.useCallback( (event: React.KeyboardEvent) => { - // eslint-disable-next-line deprecation/deprecation + // eslint-disable-next-line @typescript-eslint/no-deprecated return event.which === getRTLSafeKeyCode(KeyCodes.right, theme); }, [theme], @@ -657,7 +657,7 @@ const DetailsListInner: React.ComponentType = ( const onHeaderKeyDown = React.useCallback( (ev: React.KeyboardEvent): void => { - // eslint-disable-next-line deprecation/deprecation + // eslint-disable-next-line @typescript-eslint/no-deprecated if (ev.which === KeyCodes.down) { if (focusZoneRef.current && focusZoneRef.current.focus()) { // select the first item in list after down arrow key event @@ -676,7 +676,7 @@ const DetailsListInner: React.ComponentType = ( const onContentKeyDown = React.useCallback( (ev: React.KeyboardEvent): void => { - // eslint-disable-next-line deprecation/deprecation + // eslint-disable-next-line @typescript-eslint/no-deprecated if (ev.which === KeyCodes.up && !ev.altKey) { if (headerRef.current && headerRef.current.focus()) { ev.preventDefault(); @@ -918,10 +918,10 @@ export class DetailsListBase extends React.Component= overflowWidth || !(column.isCollapsible || column.isCollapsable)) { const originalWidth = column.calculatedWidth!; if (minimumWidth < availableWidth) { diff --git a/packages/react/src/components/DetailsList/DetailsRowCheck.tsx b/packages/react/src/components/DetailsList/DetailsRowCheck.tsx index 67c404e0f9c6f4..1fc85ff4bc6cd4 100644 --- a/packages/react/src/components/DetailsList/DetailsRowCheck.tsx +++ b/packages/react/src/components/DetailsList/DetailsRowCheck.tsx @@ -60,7 +60,7 @@ const DetailsRowCheckBase: React.FunctionComponent = prop
= prop {onRenderCheckbox(detailsCheckboxProps)}
) : ( - // eslint-disable-next-line deprecation/deprecation + // eslint-disable-next-line @typescript-eslint/no-deprecated
); }; diff --git a/packages/react/src/components/Dialog/Dialog.base.tsx b/packages/react/src/components/Dialog/Dialog.base.tsx index 16856684294365..34f7185188ad3b 100644 --- a/packages/react/src/components/Dialog/Dialog.base.tsx +++ b/packages/react/src/components/Dialog/Dialog.base.tsx @@ -27,7 +27,7 @@ const DefaultDialogContentProps: IDialogContentProps = { topButtonsProps: [], }; -// eslint-disable-next-line deprecation/deprecation +// eslint-disable-next-line @typescript-eslint/no-deprecated @withResponsiveMode export class DialogBase extends React.Component { public static defaultProps: IDialogProps = { @@ -67,7 +67,7 @@ export class DialogBase extends React.Component { public render(): JSX.Element { const props = this.props; const { - /* eslint-disable deprecation/deprecation */ + /* eslint-disable @typescript-eslint/no-deprecated */ className, containerClassName, contentClassName, @@ -90,7 +90,7 @@ export class DialogBase extends React.Component { title, topButtonsProps, type, - /* eslint-enable deprecation/deprecation */ + /* eslint-enable @typescript-eslint/no-deprecated */ minWidth, maxWidth, modalProps, @@ -142,7 +142,7 @@ export class DialogBase extends React.Component { ...props.dialogContentProps, draggableHeaderClassName: dialogDraggableClassName, titleProps: { - // eslint-disable-next-line deprecation/deprecation + // eslint-disable-next-line @typescript-eslint/no-deprecated id: props.dialogContentProps?.titleId || this._defaultTitleTextId, ...props.dialogContentProps?.titleProps, }, @@ -179,7 +179,7 @@ export class DialogBase extends React.Component { } private _getSubTextId = (): string | undefined => { - // eslint-disable-next-line deprecation/deprecation + // eslint-disable-next-line @typescript-eslint/no-deprecated const { ariaDescribedById, modalProps, dialogContentProps, subText } = this.props; let id = (modalProps && modalProps.subtitleAriaId) || ariaDescribedById; @@ -191,7 +191,7 @@ export class DialogBase extends React.Component { }; private _getTitleTextId = (): string | undefined => { - // eslint-disable-next-line deprecation/deprecation + // eslint-disable-next-line @typescript-eslint/no-deprecated const { ariaLabelledById, modalProps, dialogContentProps, title } = this.props; let id = (modalProps && modalProps.titleAriaId) || ariaLabelledById; diff --git a/packages/react/src/components/Dialog/Dialog.styles.ts b/packages/react/src/components/Dialog/Dialog.styles.ts index 0870266ded3697..8e46df0c425ff7 100644 --- a/packages/react/src/components/Dialog/Dialog.styles.ts +++ b/packages/react/src/components/Dialog/Dialog.styles.ts @@ -8,7 +8,7 @@ const GlobalClassNames = { export const getStyles = (props: IDialogStyleProps): IDialogStyles => { const { className, - containerClassName, // eslint-disable-line deprecation/deprecation + containerClassName, // eslint-disable-line @typescript-eslint/no-deprecated dialogDefaultMinWidth = '288px', dialogDefaultMaxWidth = '340px', hidden, diff --git a/packages/react/src/components/Dialog/Dialog.types.ts b/packages/react/src/components/Dialog/Dialog.types.ts index f3544a5c0d5995..7936c9f13a7e49 100644 --- a/packages/react/src/components/Dialog/Dialog.types.ts +++ b/packages/react/src/components/Dialog/Dialog.types.ts @@ -20,7 +20,7 @@ export interface IDialog {} */ export interface IDialogProps extends React.ClassAttributes, - // eslint-disable-next-line deprecation/deprecation + // eslint-disable-next-line @typescript-eslint/no-deprecated IWithResponsiveModeState, IAccessiblePopupProps { children?: React.ReactNode; diff --git a/packages/react/src/components/Dialog/DialogContent.base.tsx b/packages/react/src/components/Dialog/DialogContent.base.tsx index 4f3eabbe3f9066..9db6078f82c21d 100644 --- a/packages/react/src/components/Dialog/DialogContent.base.tsx +++ b/packages/react/src/components/Dialog/DialogContent.base.tsx @@ -13,7 +13,7 @@ const DialogFooterType = (() as React.ReactElement { public static defaultProps: IDialogContentProps = { @@ -41,7 +41,7 @@ export class DialogContentBase extends React.Component subTextId, subText, titleProps = {}, - // eslint-disable-next-line deprecation/deprecation + // eslint-disable-next-line @typescript-eslint/no-deprecated titleId, title, type, diff --git a/packages/react/src/components/Divider/VerticalDivider.base.tsx b/packages/react/src/components/Divider/VerticalDivider.base.tsx index 16d14aa3d9d19c..cac56ddde068e0 100644 --- a/packages/react/src/components/Divider/VerticalDivider.base.tsx +++ b/packages/react/src/components/Divider/VerticalDivider.base.tsx @@ -12,7 +12,7 @@ export const VerticalDividerBase: React.FunctionComponent HTMLDivElement, IVerticalDividerProps >((props, ref) => { - // eslint-disable-next-line deprecation/deprecation + // eslint-disable-next-line @typescript-eslint/no-deprecated const { styles, theme, getClassNames: deprecatedGetClassNames, className } = props; const classNames = getClassNames(styles, { theme, getClassNames: deprecatedGetClassNames, className }); return ( diff --git a/packages/react/src/components/Divider/VerticalDivider.classNames.ts b/packages/react/src/components/Divider/VerticalDivider.classNames.ts index 03e0b7eb32193d..961511a8a75674 100644 --- a/packages/react/src/components/Divider/VerticalDivider.classNames.ts +++ b/packages/react/src/components/Divider/VerticalDivider.classNames.ts @@ -7,7 +7,7 @@ import type { IVerticalDividerClassNames } from './VerticalDivider.types'; * @deprecated use getStyles exported from VerticalDivider.styles.ts */ export const getDividerClassNames = memoizeFunction( - // eslint-disable-next-line deprecation/deprecation + // eslint-disable-next-line @typescript-eslint/no-deprecated (theme: ITheme): IVerticalDividerClassNames => { return mergeStyleSets({ wrapper: { diff --git a/packages/react/src/components/Divider/VerticalDivider.styles.ts b/packages/react/src/components/Divider/VerticalDivider.styles.ts index 166a0fa3a97cd8..8f86e4d5456181 100644 --- a/packages/react/src/components/Divider/VerticalDivider.styles.ts +++ b/packages/react/src/components/Divider/VerticalDivider.styles.ts @@ -4,7 +4,7 @@ import type { IStyleFunction } from '../../Utilities'; export const getStyles: IStyleFunction = ( props: IVerticalDividerPropsStyles, ): IVerticalDividerStyles => { - // eslint-disable-next-line deprecation/deprecation + // eslint-disable-next-line @typescript-eslint/no-deprecated const { theme, getClassNames, className } = props; if (!theme) { diff --git a/packages/react/src/components/Divider/VerticalDivider.types.ts b/packages/react/src/components/Divider/VerticalDivider.types.ts index 44ea500f5c450b..388f106d72d554 100644 --- a/packages/react/src/components/Divider/VerticalDivider.types.ts +++ b/packages/react/src/components/Divider/VerticalDivider.types.ts @@ -11,7 +11,7 @@ export interface IVerticalDividerProps extends React.HTMLAttributes * Optional function to generate the class names for the divider for custom styling * @deprecated Use `styles` instead. */ - // eslint-disable-next-line deprecation/deprecation + // eslint-disable-next-line @typescript-eslint/no-deprecated getClassNames?: (theme: ITheme) => IVerticalDividerClassNames; /** * The theme that should be used to render the vertical divider. diff --git a/packages/react/src/components/DocumentCard/DocumentCard.base.tsx b/packages/react/src/components/DocumentCard/DocumentCard.base.tsx index 78bbf79439ba1e..3f6ce4bb9f67e1 100644 --- a/packages/react/src/components/DocumentCard/DocumentCard.base.tsx +++ b/packages/react/src/components/DocumentCard/DocumentCard.base.tsx @@ -48,7 +48,7 @@ export class DocumentCardBase extends React.Component i } public render(): JSX.Element { - // eslint-disable-next-line deprecation/deprecation + // eslint-disable-next-line @typescript-eslint/no-deprecated const { onClick, onClickHref, children, type, accentColor, styles, theme, className } = this.props; const nativeProps = getNativeProps>(this.props, divProperties, [ 'className', @@ -104,7 +104,7 @@ export class DocumentCardBase extends React.Component i }; private _onKeyDown = (ev: React.KeyboardEvent): void => { - // eslint-disable-next-line deprecation/deprecation + // eslint-disable-next-line @typescript-eslint/no-deprecated if (ev.which === KeyCodes.enter || ev.which === KeyCodes.space) { this._onAction(ev); } diff --git a/packages/react/src/components/DocumentCard/DocumentCardLogo.styles.ts b/packages/react/src/components/DocumentCard/DocumentCardLogo.styles.ts index 68e00221a5f5e4..b6beaba76e5984 100644 --- a/packages/react/src/components/DocumentCard/DocumentCardLogo.styles.ts +++ b/packages/react/src/components/DocumentCard/DocumentCardLogo.styles.ts @@ -15,7 +15,7 @@ export const getStyles = (props: IDocumentCardLogoStyleProps): IDocumentCardLogo root: [ classNames.root, { - // eslint-disable-next-line deprecation/deprecation + // eslint-disable-next-line @typescript-eslint/no-deprecated fontSize: fonts.xxLargePlus.fontSize, color: palette.themePrimary, display: 'block', diff --git a/packages/react/src/components/DocumentCard/DocumentCardPreview.base.tsx b/packages/react/src/components/DocumentCard/DocumentCardPreview.base.tsx index 8fbaa6c86ae175..a3ca9f83a62f6c 100644 --- a/packages/react/src/components/DocumentCard/DocumentCardPreview.base.tsx +++ b/packages/react/src/components/DocumentCard/DocumentCardPreview.base.tsx @@ -46,13 +46,13 @@ export class DocumentCardPreviewBase extends React.Component diff --git a/packages/react/src/components/Dropdown/Dropdown.base.tsx b/packages/react/src/components/Dropdown/Dropdown.base.tsx index 70498f5ac23212..574a5bd22d686b 100644 --- a/packages/react/src/components/Dropdown/Dropdown.base.tsx +++ b/packages/react/src/components/Dropdown/Dropdown.base.tsx @@ -57,7 +57,7 @@ const COMPONENT_NAME = 'Dropdown'; const getClassNames = classNamesFunction(); /** Internal only props interface to support mixing in responsive mode */ -// eslint-disable-next-line deprecation/deprecation +// eslint-disable-next-line @typescript-eslint/no-deprecated interface IDropdownInternalProps extends Omit, IWithResponsiveModeState { hoisted: { rootRef: React.RefObject; @@ -146,7 +146,7 @@ function useSelectedItemsState({ if (searchKey != null) { return option.key === searchKey; } else { - // eslint-disable-next-line deprecation/deprecation + // eslint-disable-next-line @typescript-eslint/no-deprecated return !!option.selected || !!option.isSelected; } }); @@ -324,7 +324,7 @@ class DropdownInternal extends React.Component { - // eslint-disable-next-line deprecation/deprecation + // eslint-disable-next-line @typescript-eslint/no-deprecated const { onChange, onChanged } = this.props; if (onChange || onChanged) { // for single-select, option passed in will always be selected. @@ -506,7 +506,7 @@ class DropdownInternal extends React.Component { - // eslint-disable-next-line deprecation/deprecation + // eslint-disable-next-line @typescript-eslint/no-deprecated return this.props.placeholder || this.props.placeHolder; }; @@ -1048,7 +1048,7 @@ class DropdownInternal extends React.Component): boolean { - // eslint-disable-next-line deprecation/deprecation + // eslint-disable-next-line @typescript-eslint/no-deprecated return ev.which === KeyCodes.alt || ev.key === 'Meta'; } @@ -1187,7 +1187,7 @@ class DropdownInternal extends React.Component boolean | undefined = () => { let { disabled } = this.props; - // eslint-disable-next-line deprecation/deprecation + // eslint-disable-next-line @typescript-eslint/no-deprecated const { isDisabled } = this.props; // Remove this deprecation workaround at 1.0.0 diff --git a/packages/react/src/components/ExtendedPicker/BaseExtendedPicker.tsx b/packages/react/src/components/ExtendedPicker/BaseExtendedPicker.tsx index 557be878741ecc..5807f75fcbb5f9 100644 --- a/packages/react/src/components/ExtendedPicker/BaseExtendedPicker.tsx +++ b/packages/react/src/components/ExtendedPicker/BaseExtendedPicker.tsx @@ -193,7 +193,7 @@ export class BaseExtendedPicker): void => { - // eslint-disable-next-line deprecation/deprecation + // eslint-disable-next-line @typescript-eslint/no-deprecated if (ev.which !== KeyCodes.backspace) { return; } diff --git a/packages/react/src/components/Fabric/Fabric.base.tsx b/packages/react/src/components/Fabric/Fabric.base.tsx index 9d42d03677541e..5ede2ddd12d90b 100644 --- a/packages/react/src/components/Fabric/Fabric.base.tsx +++ b/packages/react/src/components/Fabric/Fabric.base.tsx @@ -72,7 +72,7 @@ function useRenderedContent( if (needsTheme) { // Disabling ThemeProvider here because theme doesn't need to be re-provided by ThemeProvider if dir has changed. renderedContent = ( - // eslint-disable-next-line deprecation/deprecation + // eslint-disable-next-line @typescript-eslint/no-deprecated {renderedContent} ); } diff --git a/packages/react/src/components/Fabric/Fabric.test.tsx b/packages/react/src/components/Fabric/Fabric.test.tsx index 8b428b5c6eecb8..8f2c71837058e2 100644 --- a/packages/react/src/components/Fabric/Fabric.test.tsx +++ b/packages/react/src/components/Fabric/Fabric.test.tsx @@ -1,4 +1,4 @@ -/* eslint-disable deprecation/deprecation */ +/* eslint-disable @typescript-eslint/no-deprecated */ import * as React from 'react'; import { create } from '@fluentui/test-utilities'; //import { Customizer } from '@fluentui/utilities'; diff --git a/packages/react/src/components/Facepile/Facepile.base.tsx b/packages/react/src/components/Facepile/Facepile.base.tsx index bb412e7c22bba2..a082851ab6fe6a 100644 --- a/packages/react/src/components/Facepile/Facepile.base.tsx +++ b/packages/react/src/components/Facepile/Facepile.base.tsx @@ -40,7 +40,7 @@ export class FacepileBase extends React.Component { public render(): JSX.Element { let { overflowButtonProps } = this.props; const { - chevronButtonProps, // eslint-disable-line deprecation/deprecation + chevronButtonProps, // eslint-disable-line @typescript-eslint/no-deprecated maxDisplayablePersonas, personas, overflowPersonas, diff --git a/packages/react/src/components/FloatingPicker/BaseFloatingPicker.tsx b/packages/react/src/components/FloatingPicker/BaseFloatingPicker.tsx index 1e15c290f237d9..4738d7d5a967c7 100644 --- a/packages/react/src/components/FloatingPicker/BaseFloatingPicker.tsx +++ b/packages/react/src/components/FloatingPicker/BaseFloatingPicker.tsx @@ -253,7 +253,7 @@ export class BaseFloatingPicker JSX.Element
diff --git a/packages/react/src/components/FloatingPicker/Suggestions/SuggestionsStore.ts b/packages/react/src/components/FloatingPicker/Suggestions/SuggestionsStore.ts index 893ced2fa91f77..972f279e6da5dd 100644 --- a/packages/react/src/components/FloatingPicker/Suggestions/SuggestionsStore.ts +++ b/packages/react/src/components/FloatingPicker/Suggestions/SuggestionsStore.ts @@ -54,7 +54,7 @@ export class SuggestionsStore { ? this.getAriaLabel(suggestion) : (suggestion as any as ITag).name || (suggestion).text || - // eslint-disable-next-line deprecation/deprecation + // eslint-disable-next-line @typescript-eslint/no-deprecated (suggestion).primaryText, }; } diff --git a/packages/react/src/components/FocusTrapZone/FocusTrapZone.tsx b/packages/react/src/components/FocusTrapZone/FocusTrapZone.tsx index 8fa3eabcd97117..e99993f9249e4c 100644 --- a/packages/react/src/components/FocusTrapZone/FocusTrapZone.tsx +++ b/packages/react/src/components/FocusTrapZone/FocusTrapZone.tsx @@ -87,10 +87,10 @@ export const FocusTrapZone: React.FunctionComponent & { disableFirstFocus, forceFocusInsideTrap, focusPreviouslyFocusedInnerElement, - // eslint-disable-next-line deprecation/deprecation + // eslint-disable-next-line @typescript-eslint/no-deprecated firstFocusableSelector, firstFocusableTarget, - // eslint-disable-next-line deprecation/deprecation + // eslint-disable-next-line @typescript-eslint/no-deprecated disableRestoreFocus = props.ignoreExternalFocusing, isClickableOutsideFocusTrap, enableAriaHiddenSiblings, diff --git a/packages/react/src/components/GroupedList/GroupHeader.base.tsx b/packages/react/src/components/GroupedList/GroupHeader.base.tsx index c519260c424ae2..9dbec7301ebc7b 100644 --- a/packages/react/src/components/GroupedList/GroupHeader.base.tsx +++ b/packages/react/src/components/GroupedList/GroupHeader.base.tsx @@ -66,12 +66,13 @@ export class GroupHeaderBase extends React.Component= 7.0 */ - // eslint-disable-next-line deprecation/deprecation + // eslint-disable-next-line @typescript-eslint/no-deprecated styles?: IStyleFunctionOrObject; /** Count of spacer(s) */ diff --git a/packages/react/src/components/GroupedList/GroupedList.base.tsx b/packages/react/src/components/GroupedList/GroupedList.base.tsx index 557c8bb695377a..ccc831276d1085 100644 --- a/packages/react/src/components/GroupedList/GroupedList.base.tsx +++ b/packages/react/src/components/GroupedList/GroupedList.base.tsx @@ -356,7 +356,7 @@ export class GroupedListBase extends React.Component): boolean => { - // eslint-disable-next-line deprecation/deprecation + // eslint-disable-next-line @typescript-eslint/no-deprecated return ev.which === getRTLSafeKeyCode(KeyCodes.right); }; diff --git a/packages/react/src/components/GroupedList/GroupedListV2.base.tsx b/packages/react/src/components/GroupedList/GroupedListV2.base.tsx index c146f58278cd67..6ee3a2e130ca76 100644 --- a/packages/react/src/components/GroupedList/GroupedListV2.base.tsx +++ b/packages/react/src/components/GroupedList/GroupedListV2.base.tsx @@ -199,7 +199,7 @@ const setGroupsCollapsedState = (groups: IGroup[] | undefined, isCollapsed: bool }; const isInnerZoneKeystroke = (ev: React.KeyboardEvent): boolean => { - // eslint-disable-next-line deprecation/deprecation + // eslint-disable-next-line @typescript-eslint/no-deprecated return ev.which === getRTLSafeKeyCode(KeyCodes.right); }; @@ -285,7 +285,6 @@ export const GroupedListV2FC: React.FC = props => { const [version, setVersion] = React.useState({}); const [toggleVersion, setToggleVersion] = React.useState({}); - // eslint-disable-next-line deprecation/deprecation const { shouldEnterInnerZone = isInnerZoneKeystroke } = focusZoneProps; const listView = React.useMemo(() => { diff --git a/packages/react/src/components/HoverCard/ExpandingCard.base.tsx b/packages/react/src/components/HoverCard/ExpandingCard.base.tsx index b199cb0361d295..3e8ec1a8c373a7 100644 --- a/packages/react/src/components/HoverCard/ExpandingCard.base.tsx +++ b/packages/react/src/components/HoverCard/ExpandingCard.base.tsx @@ -70,7 +70,7 @@ export class ExpandingCardBase extends React.Component): void => { - // eslint-disable-next-line deprecation/deprecation + // eslint-disable-next-line @typescript-eslint/no-deprecated if (ev.which === KeyCodes.escape) { this.props.onLeave && this.props.onLeave(ev); } diff --git a/packages/react/src/components/HoverCard/HoverCard.base.tsx b/packages/react/src/components/HoverCard/HoverCard.base.tsx index 7f93ef0c5283ec..fb059fd0223086 100644 --- a/packages/react/src/components/HoverCard/HoverCard.base.tsx +++ b/packages/react/src/components/HoverCard/HoverCard.base.tsx @@ -193,7 +193,7 @@ export class HoverCardBase extends React.Component { - // eslint-disable-next-line deprecation/deprecation + // eslint-disable-next-line @typescript-eslint/no-deprecated if (this._shouldBlockHoverCard() || (ev.type === 'keydown' && !(ev.which === this.props.openHotKey))) { return; } @@ -239,13 +239,13 @@ export class HoverCardBase extends React.Component { } private _onKeyDown = (ev: React.KeyboardEvent): void => { - // eslint-disable-next-line deprecation/deprecation + // eslint-disable-next-line @typescript-eslint/no-deprecated if (ev.which === KeyCodes.escape) { this.props.onLeave && this.props.onLeave(ev); } diff --git a/packages/react/src/components/Icon/Icon.base.tsx b/packages/react/src/components/Icon/Icon.base.tsx index 2010c045978299..5e4505ecec16ab 100644 --- a/packages/react/src/components/Icon/Icon.base.tsx +++ b/packages/react/src/components/Icon/Icon.base.tsx @@ -31,7 +31,7 @@ export class IconBase extends React.Component { const { children, className, styles, iconName, imageErrorAs, theme } = this.props; const isPlaceholder = typeof iconName === 'string' && iconName.length === 0; const isImage = - // eslint-disable-next-line deprecation/deprecation + // eslint-disable-next-line @typescript-eslint/no-deprecated !!this.props.imageProps || this.props.iconType === IconType.image || this.props.iconType === IconType.Image; const iconContent = getIconContent(iconName) || {}; const { iconClassName, children: iconContentChildren, mergeImageProps } = iconContent; @@ -55,7 +55,7 @@ export class IconBase extends React.Component { }; const ImageType = (imageLoadError && imageErrorAs) || Image; - // eslint-disable-next-line deprecation/deprecation + // eslint-disable-next-line @typescript-eslint/no-deprecated const ariaLabel = this.props['aria-label'] || this.props.ariaLabel; const accessibleName = imageProps.alt || ariaLabel || this.props.title; const hasName = !!( diff --git a/packages/react/src/components/Icon/Icon.styles.ts b/packages/react/src/components/Icon/Icon.styles.ts index d7c6c5a4b285e6..f683a57403007b 100644 --- a/packages/react/src/components/Icon/Icon.styles.ts +++ b/packages/react/src/components/Icon/Icon.styles.ts @@ -34,7 +34,7 @@ export const getStyles = (props: IIconStyleProps): IIconStyles => { iconClassName, className, styles && styles.root, - // eslint-disable-next-line deprecation/deprecation + // eslint-disable-next-line @typescript-eslint/no-deprecated styles && styles.imageContainer, ], }; diff --git a/packages/react/src/components/Icon/Icon.types.ts b/packages/react/src/components/Icon/Icon.types.ts index c06b7133f2019d..0f6ed6ef687259 100644 --- a/packages/react/src/components/Icon/Icon.types.ts +++ b/packages/react/src/components/Icon/Icon.types.ts @@ -51,7 +51,7 @@ export interface IIconProps extends IBaseProps, React.HTMLAttributes = React.forwardRef< hostId, insertFirst, onLayerDidMount = () => undefined, - // eslint-disable-next-line deprecation/deprecation + // eslint-disable-next-line @typescript-eslint/no-deprecated onLayerMounted = () => undefined, onLayerWillUnmount, styles, @@ -216,7 +216,7 @@ export const LayerBase: React.FunctionComponent = React.forwardRef< {layerRef.current && ReactDOM.createPortal( - {/* eslint-disable deprecation/deprecation */} + {/* eslint-disable @typescript-eslint/no-deprecated */} = React.forwardRef< > {children} - {/* eslint-enable deprecation/deprecation */} + {/* eslint-enable @typescript-eslint/no-deprecated */} , layerRef.current, )} diff --git a/packages/react/src/components/Link/Link.test.tsx b/packages/react/src/components/Link/Link.test.tsx index 853e913af8a7c7..91439b8b7eb3ac 100644 --- a/packages/react/src/components/Link/Link.test.tsx +++ b/packages/react/src/components/Link/Link.test.tsx @@ -96,7 +96,7 @@ describe('Link', () => { expect( /ms-Link($| )/.test( ReactDOM.renderToStaticMarkup( - // eslint-disable-next-line deprecation/deprecation + // eslint-disable-next-line @typescript-eslint/no-deprecated My Link , diff --git a/packages/react/src/components/MessageBar/MessageBar.base.tsx b/packages/react/src/components/MessageBar/MessageBar.base.tsx index 708771114cce56..e8e6d8731dca75 100644 --- a/packages/react/src/components/MessageBar/MessageBar.base.tsx +++ b/packages/react/src/components/MessageBar/MessageBar.base.tsx @@ -50,7 +50,7 @@ export const MessageBarBase: React.FunctionComponent = React.f actions, className, children, - // eslint-disable-next-line deprecation/deprecation + // eslint-disable-next-line @typescript-eslint/no-deprecated overflowButtonAriaLabel, dismissIconProps, styles, diff --git a/packages/react/src/components/MessageBar/MessageBar.types.ts b/packages/react/src/components/MessageBar/MessageBar.types.ts index 46ca8f89d30b7a..e41a2ed4d72f31 100644 --- a/packages/react/src/components/MessageBar/MessageBar.types.ts +++ b/packages/react/src/components/MessageBar/MessageBar.types.ts @@ -41,7 +41,7 @@ export interface IMessageBarProps extends React.HTMLAttributes, Rea * If null, we don't show a dismiss button. * @defaultvalue null */ - // eslint-disable-next-line deprecation/deprecation + // eslint-disable-next-line @typescript-eslint/no-deprecated onDismiss?: (ev?: React.MouseEvent) => any; /** diff --git a/packages/react/src/components/Modal/Modal.base.tsx b/packages/react/src/components/Modal/Modal.base.tsx index 627d401fc44e1e..795344ab95720c 100644 --- a/packages/react/src/components/Modal/Modal.base.tsx +++ b/packages/react/src/components/Modal/Modal.base.tsx @@ -105,7 +105,7 @@ export const ModalBase: React.FunctionComponent = React.forwardRef< firstFocusableSelector, focusTrapZoneProps, forceFocusInsideTrap, - // eslint-disable-next-line deprecation/deprecation + // eslint-disable-next-line @typescript-eslint/no-deprecated disableRestoreFocus = props.ignoreExternalFocusing, isBlocking, isAlert, @@ -121,12 +121,12 @@ export const ModalBase: React.FunctionComponent = React.forwardRef< theme, topOffsetFixed, responsiveMode, - // eslint-disable-next-line deprecation/deprecation + // eslint-disable-next-line @typescript-eslint/no-deprecated onLayerDidMount, isModeless, dragOptions, onDismissed, - // eslint-disable-next-line deprecation/deprecation + // eslint-disable-next-line @typescript-eslint/no-deprecated enableAriaHiddenSiblings, popupProps, } = props; @@ -278,7 +278,7 @@ export const ModalBase: React.FunctionComponent = React.forwardRef< // We need a global handleKeyDown event when we are in the move mode so that we can // handle the key presses and the components inside the modal do not get the events const handleKeyDown = (ev: React.KeyboardEvent): void => { - // eslint-disable-next-line deprecation/deprecation + // eslint-disable-next-line @typescript-eslint/no-deprecated if (ev.altKey && ev.ctrlKey && ev.keyCode === KeyCodes.space) { // CTRL + ALT + SPACE is handled during keyUp ev.preventDefault(); @@ -286,13 +286,13 @@ export const ModalBase: React.FunctionComponent = React.forwardRef< return; } - // eslint-disable-next-line deprecation/deprecation + // eslint-disable-next-line @typescript-eslint/no-deprecated const newLocal = ev.altKey || ev.keyCode === KeyCodes.escape; if (isModalMenuOpen && newLocal) { setModalMenuClose(); } - // eslint-disable-next-line deprecation/deprecation + // eslint-disable-next-line @typescript-eslint/no-deprecated if (internalState.isInKeyboardMoveMode && (ev.keyCode === KeyCodes.escape || ev.keyCode === KeyCodes.enter)) { internalState.isInKeyboardMoveMode = false; ev.preventDefault(); @@ -303,7 +303,7 @@ export const ModalBase: React.FunctionComponent = React.forwardRef< let handledEvent = true; const delta = getMoveDelta(ev); - // eslint-disable-next-line deprecation/deprecation + // eslint-disable-next-line @typescript-eslint/no-deprecated switch (ev.keyCode) { /* eslint-disable no-fallthrough */ case KeyCodes.escape: @@ -364,7 +364,7 @@ export const ModalBase: React.FunctionComponent = React.forwardRef< const handleKeyUp = (ev: React.KeyboardEvent): void => { // Needs to handle the CTRL + ALT + SPACE key during keyup due to FireFox bug: // https://bugzilla.mozilla.org/show_bug.cgi?id=1220143 - // eslint-disable-next-line deprecation/deprecation + // eslint-disable-next-line @typescript-eslint/no-deprecated if (ev.altKey && ev.ctrlKey && ev.keyCode === KeyCodes.space) { if (elementContains(internalState.scrollableContent, ev.target as HTMLElement)) { toggleModalMenuOpen(); @@ -433,7 +433,7 @@ export const ModalBase: React.FunctionComponent = React.forwardRef< } disableRestoreFocus={focusTrapZoneProps?.disableRestoreFocus ?? disableRestoreFocus} forceFocusInsideTrap={(focusTrapZoneProps?.forceFocusInsideTrap ?? forceFocusInsideTrap) && !isModeless} - // eslint-disable-next-line deprecation/deprecation + // eslint-disable-next-line @typescript-eslint/no-deprecated firstFocusableSelector={focusTrapZoneProps?.firstFocusableSelector || firstFocusableSelector} focusPreviouslyFocusedInnerElement={focusTrapZoneProps?.focusPreviouslyFocusedInnerElement ?? true} onBlur={internalState.isInKeyboardMoveMode ? handleExitKeyboardMoveMode : undefined} diff --git a/packages/react/src/components/Modal/Modal.styles.ts b/packages/react/src/components/Modal/Modal.styles.ts index 574c85d2202d07..6094cd02d63c16 100644 --- a/packages/react/src/components/Modal/Modal.styles.ts +++ b/packages/react/src/components/Modal/Modal.styles.ts @@ -116,7 +116,7 @@ export const getStyles = (props: IModalStyleProps): IModalStyles => { padding: '3px 0px', }, keyboardMoveIcon: { - // eslint-disable-next-line deprecation/deprecation + // eslint-disable-next-line @typescript-eslint/no-deprecated fontSize: fonts.xLargePlus.fontSize, width: '24px', }, diff --git a/packages/react/src/components/Nav/Nav.base.tsx b/packages/react/src/components/Nav/Nav.base.tsx index 189df5ae062ec9..1eff274bd87165 100644 --- a/packages/react/src/components/Nav/Nav.base.tsx +++ b/packages/react/src/components/Nav/Nav.base.tsx @@ -148,7 +148,7 @@ export class NavBase extends React.Component implements IN private _renderCompositeLink(link: INavLink, linkIndex: number, nestingLevel: number): React.ReactElement<{}> { const divProps: React.HTMLProps = { ...getNativeProps(link, divProperties, ['onClick']) }; - // eslint-disable-next-line deprecation/deprecation + // eslint-disable-next-line @typescript-eslint/no-deprecated const { expandButtonAriaLabel, styles, groups, theme } = this.props; const classNames = getClassNames(styles!, { theme: theme!, @@ -254,7 +254,7 @@ export class NavBase extends React.Component implements IN }; private _renderGroupHeader = (group: IRenderGroupHeaderProps): React.ReactElement<{}> => { - // eslint-disable-next-line deprecation/deprecation + // eslint-disable-next-line @typescript-eslint/no-deprecated const { styles, groups, theme, expandButtonAriaLabel } = this.props; const { isExpanded } = group; @@ -267,7 +267,7 @@ export class NavBase extends React.Component implements IN }); // respect deprecated collapseAriaLabel, but default to expandAriaLabel for both states - // eslint-disable-next-line deprecation/deprecation + // eslint-disable-next-line @typescript-eslint/no-deprecated const collapseAriaLabel = group.collapseAriaLabel ?? group.expandAriaLabel; const label = (isExpanded ? collapseAriaLabel : group.expandAriaLabel) || expandButtonAriaLabel; diff --git a/packages/react/src/components/Panel/Panel.base.tsx b/packages/react/src/components/Panel/Panel.base.tsx index cf1ab7e072740f..527285aa738ab5 100644 --- a/packages/react/src/components/Panel/Panel.base.tsx +++ b/packages/react/src/components/Panel/Panel.base.tsx @@ -157,7 +157,7 @@ export class PanelBase extends React.Component impleme const { className = '', elementToFocusOnDismiss, - /* eslint-disable deprecation/deprecation */ + /* eslint-disable @typescript-eslint/no-deprecated */ firstFocusableSelector, focusTrapZoneProps, forceFocusInsideTrap, diff --git a/packages/react/src/components/Persona/Persona.base.tsx b/packages/react/src/components/Persona/Persona.base.tsx index 92bf285c051bfb..9a5086b9935328 100644 --- a/packages/react/src/components/Persona/Persona.base.tsx +++ b/packages/react/src/components/Persona/Persona.base.tsx @@ -44,7 +44,7 @@ export const PersonaBase: React.FunctionComponent = React.forward * Deprecation helper for getting text. */ const getText = (): string => { - // eslint-disable-next-line deprecation/deprecation + // eslint-disable-next-line @typescript-eslint/no-deprecated return props.text || props.primaryText || ''; }; @@ -130,7 +130,7 @@ export const PersonaBase: React.FunctionComponent = React.forward initialsTextColor, isOutOfOffice, onPhotoLoadingStateChange, - // eslint-disable-next-line deprecation/deprecation + // eslint-disable-next-line @typescript-eslint/no-deprecated onRenderCoin, onRenderInitials, presence, @@ -192,14 +192,14 @@ export const PersonaBase: React.FunctionComponent = React.forward > {onRenderPersonaCoin(personaCoinProps, onRenderPersonaCoin)} { - /* eslint-disable deprecation/deprecation */ + /* eslint-disable @typescript-eslint/no-deprecated */ (!hidePersonaDetails || size === PersonaSize.size8 || size === PersonaSize.size10 || size === PersonaSize.tiny) && personaDetails - /* eslint-enable deprecation/deprecation */ + /* eslint-enable @typescript-eslint/no-deprecated */ }
); diff --git a/packages/react/src/components/Persona/PersonaCoin/PersonaCoin.base.tsx b/packages/react/src/components/Persona/PersonaCoin/PersonaCoin.base.tsx index d9444f3443acc5..5fdd51988bed2d 100644 --- a/packages/react/src/components/Persona/PersonaCoin/PersonaCoin.base.tsx +++ b/packages/react/src/components/Persona/PersonaCoin/PersonaCoin.base.tsx @@ -106,15 +106,15 @@ export const PersonaCoinBase: React.FunctionComponent = React initialsColor, initialsTextColor, isOutOfOffice, - // eslint-disable-next-line deprecation/deprecation + // eslint-disable-next-line @typescript-eslint/no-deprecated onRenderCoin = renderCoin, - // eslint-disable-next-line deprecation/deprecation + onRenderPersonaCoin = onRenderCoin, onRenderInitials = renderPersonaCoinInitials, presence, presenceTitle, presenceColors, - // eslint-disable-next-line deprecation/deprecation + // eslint-disable-next-line @typescript-eslint/no-deprecated primaryText, showInitialsUntilImageLoads, text, @@ -155,7 +155,7 @@ export const PersonaCoinBase: React.FunctionComponent = React
{ // Render PersonaCoin if size is not size8. size10 and tiny need to removed after a deprecation cleanup. - // eslint-disable-next-line deprecation/deprecation + // eslint-disable-next-line @typescript-eslint/no-deprecated size !== PersonaSize.size8 && size !== PersonaSize.size10 && size !== PersonaSize.tiny ? (
{shouldRenderInitials && ( @@ -234,7 +234,7 @@ const renderPersonaCoinInitials = ({ allowPhoneInitials, showUnknownPersonaCoin, text, - // eslint-disable-next-line deprecation/deprecation + // eslint-disable-next-line @typescript-eslint/no-deprecated primaryText, theme, }: IPersonaCoinProps): JSX.Element => { diff --git a/packages/react/src/components/Persona/PersonaConsts.tsx b/packages/react/src/components/Persona/PersonaConsts.tsx index 325fc33468c915..6376682b9e9615 100644 --- a/packages/react/src/components/Persona/PersonaConsts.tsx +++ b/packages/react/src/components/Persona/PersonaConsts.tsx @@ -38,7 +38,7 @@ export namespace personaPresenceSize { // TODO: remove the deprecated parts in a future major release. export const sizeBoolean = (size: PersonaSize) => ({ isSize8: size === PersonaSize.size8, - /* eslint-disable deprecation/deprecation */ + /* eslint-disable @typescript-eslint/no-deprecated */ isSize10: size === PersonaSize.size10 || size === PersonaSize.tiny, isSize16: size === PersonaSize.size16, isSize24: size === PersonaSize.size24 || size === PersonaSize.extraExtraSmall, @@ -67,7 +67,7 @@ export const sizeToPixels: { [key: number]: number } = { [PersonaSize.size16]: 16, // TODO: deprecated (not in the design specs) [PersonaSize.size24]: 24, [PersonaSize.size28]: 28, // TODO: deprecated (not in the design specs) - /* eslint-enable deprecation/deprecation */ + /* eslint-enable @typescript-eslint/no-deprecated */ [PersonaSize.size32]: 32, [PersonaSize.size40]: 40, [PersonaSize.size48]: 48, diff --git a/packages/react/src/components/Persona/PersonaInitialsColor.ts b/packages/react/src/components/Persona/PersonaInitialsColor.ts index f5fe9c45f87656..c16169c8497995 100644 --- a/packages/react/src/components/Persona/PersonaInitialsColor.ts +++ b/packages/react/src/components/Persona/PersonaInitialsColor.ts @@ -77,7 +77,7 @@ function personaInitialsColorToHexCode(personaInitialsColor: PersonaInitialsColo return '#5C2E91'; case PersonaInitialsColor.orange: return '#CA5010'; - // eslint-disable-next-line deprecation/deprecation + // eslint-disable-next-line @typescript-eslint/no-deprecated case PersonaInitialsColor.red: return '#EE1111'; case PersonaInitialsColor.lightRed: @@ -100,7 +100,7 @@ function personaInitialsColorToHexCode(personaInitialsColor: PersonaInitialsColo return '#8E562E'; case PersonaInitialsColor.coolGray: return '#69797E'; - // eslint-disable-next-line deprecation/deprecation + // eslint-disable-next-line @typescript-eslint/no-deprecated case PersonaInitialsColor.black: return '#1D1D1D'; case PersonaInitialsColor.gray: @@ -120,7 +120,7 @@ export function initialsColorPropToColorCode(props: IPersonaProps): string { * @returns Hex color string prefixed with # */ export function getPersonaInitialsColor(props: Pick): string { - // eslint-disable-next-line deprecation/deprecation + // eslint-disable-next-line @typescript-eslint/no-deprecated const { primaryText, text } = props; let { initialsColor } = props; let initialsColorCode: string; diff --git a/packages/react/src/components/Pivot/Pivot.base.tsx b/packages/react/src/components/Pivot/Pivot.base.tsx index 9f62ca73599905..70d18af3bc30aa 100644 --- a/packages/react/src/components/Pivot/Pivot.base.tsx +++ b/packages/react/src/components/Pivot/Pivot.base.tsx @@ -41,7 +41,7 @@ const getLinkItems = (props: IPivotProps, pivotId: string): PivotLinkCollection React.Children.forEach(React.Children.toArray(props.children), (child: React.ReactNode, index: number) => { if (isPivotItem(child)) { - // eslint-disable-next-line deprecation/deprecation + // eslint-disable-next-line @typescript-eslint/no-deprecated const { linkText, ...pivotItemProps } = child.props; const itemKey = child.props.itemKey || index.toString(); result.links.push({ @@ -177,7 +177,7 @@ export const PivotBase: React.FunctionComponent = React.forwardRef< }; const onKeyDown = (itemKey: string, ev: React.KeyboardEvent): void => { - // eslint-disable-next-line deprecation/deprecation + // eslint-disable-next-line @typescript-eslint/no-deprecated if (ev.which === KeyCodes.enter) { ev.preventDefault(); updateSelectedItem(itemKey); diff --git a/packages/react/src/components/Popup/Popup.tsx b/packages/react/src/components/Popup/Popup.tsx index a55f2e0ab4de38..6d035cb80aecff 100644 --- a/packages/react/src/components/Popup/Popup.tsx +++ b/packages/react/src/components/Popup/Popup.tsx @@ -123,7 +123,7 @@ function useRestoreFocus(props: IPopupProps, root: React.RefObject) { - // eslint-disable-next-line deprecation/deprecation + // eslint-disable-next-line @typescript-eslint/no-deprecated const shouldHideSiblings = String(props['aria-modal']).toLowerCase() === 'true' && props.enableAriaHiddenSiblings; React.useEffect(() => { @@ -157,7 +157,7 @@ export const Popup: React.FunctionComponent = React.forwardRef | KeyboardEvent): void => { - // eslint-disable-next-line deprecation/deprecation + // eslint-disable-next-line @typescript-eslint/no-deprecated switch (ev.which) { case KeyCodes.escape: if (onDismiss) { diff --git a/packages/react/src/components/ProgressIndicator/ProgressIndicator.base.tsx b/packages/react/src/components/ProgressIndicator/ProgressIndicator.base.tsx index fe8573e7780827..1e38e297b1471e 100644 --- a/packages/react/src/components/ProgressIndicator/ProgressIndicator.base.tsx +++ b/packages/react/src/components/ProgressIndicator/ProgressIndicator.base.tsx @@ -38,7 +38,7 @@ export class ProgressIndicatorBase extends React.Component = React.forwardRe disabled, getAriaLabel, styles, - // eslint-disable-next-line deprecation/deprecation + // eslint-disable-next-line @typescript-eslint/no-deprecated min: minFromProps = props.allowZeroStars ? 0 : 1, max = 5, readOnly, @@ -146,7 +146,7 @@ export const RatingBase: React.FunctionComponent = React.forwardRe }; const onStarKeyDown = (event: React.KeyboardEvent) => { - // eslint-disable-next-line deprecation/deprecation + // eslint-disable-next-line @typescript-eslint/no-deprecated const { which } = event; let newRating = starNum; switch (which) { diff --git a/packages/react/src/components/SearchBox/SearchBox.base.tsx b/packages/react/src/components/SearchBox/SearchBox.base.tsx index 6113e66fde8a0e..6a7cb27d61ca6e 100644 --- a/packages/react/src/components/SearchBox/SearchBox.base.tsx +++ b/packages/react/src/components/SearchBox/SearchBox.base.tsx @@ -41,9 +41,9 @@ export const SearchBoxBase: React.FunctionComponent = React.for disabled, underlined, styles, - // eslint-disable-next-line deprecation/deprecation + // eslint-disable-next-line @typescript-eslint/no-deprecated labelText, - // eslint-disable-next-line deprecation/deprecation + placeholder = labelText, theme, clearButtonProps = defaultClearButtonProps, @@ -57,7 +57,7 @@ export const SearchBoxBase: React.FunctionComponent = React.for iconProps, role, onChange, - // eslint-disable-next-line deprecation/deprecation + // eslint-disable-next-line @typescript-eslint/no-deprecated onChanged, } = props; @@ -156,7 +156,7 @@ export const SearchBoxBase: React.FunctionComponent = React.for }; const onKeyDown = (ev: React.KeyboardEvent) => { - // eslint-disable-next-line deprecation/deprecation + // eslint-disable-next-line @typescript-eslint/no-deprecated switch (ev.which) { case KeyCodes.escape: customOnEscape?.(ev); diff --git a/packages/react/src/components/SelectedItemsList/BaseSelectedItemsList.tsx b/packages/react/src/components/SelectedItemsList/BaseSelectedItemsList.tsx index 45391a414cc160..bd5e3dc7a13838 100644 --- a/packages/react/src/components/SelectedItemsList/BaseSelectedItemsList.tsx +++ b/packages/react/src/components/SelectedItemsList/BaseSelectedItemsList.tsx @@ -225,7 +225,7 @@ export class BaseSelectedItemsList): void { - // eslint-disable-next-line deprecation/deprecation + // eslint-disable-next-line @typescript-eslint/no-deprecated if (ev.which === KeyCodes.backspace || ev.which === KeyCodes.del) { ev.stopPropagation(); } diff --git a/packages/react/src/components/Shimmer/ShimmerCircle/ShimmerCircle.base.tsx b/packages/react/src/components/Shimmer/ShimmerCircle/ShimmerCircle.base.tsx index 1c0185c4bd4438..f47d36a9ad13e5 100644 --- a/packages/react/src/components/Shimmer/ShimmerCircle/ShimmerCircle.base.tsx +++ b/packages/react/src/components/Shimmer/ShimmerCircle/ShimmerCircle.base.tsx @@ -5,7 +5,7 @@ import type { IShimmerCircleProps, IShimmerCircleStyleProps, IShimmerCircleStyle const getClassNames = classNamesFunction(); export const ShimmerCircleBase: React.FunctionComponent = props => { - // eslint-disable-next-line deprecation/deprecation + // eslint-disable-next-line @typescript-eslint/no-deprecated const { height, styles, borderStyle, theme } = props; const classNames = getClassNames(styles!, { theme: theme!, diff --git a/packages/react/src/components/Shimmer/ShimmerCircle/ShimmerCircle.styles.ts b/packages/react/src/components/Shimmer/ShimmerCircle/ShimmerCircle.styles.ts index 590bbfc3e61ef7..f8fe47cfe5a5ee 100644 --- a/packages/react/src/components/Shimmer/ShimmerCircle/ShimmerCircle.styles.ts +++ b/packages/react/src/components/Shimmer/ShimmerCircle/ShimmerCircle.styles.ts @@ -8,7 +8,7 @@ const GlobalClassNames = { }; export function getStyles(props: IShimmerCircleStyleProps): IShimmerCircleStyles { - // eslint-disable-next-line deprecation/deprecation + // eslint-disable-next-line @typescript-eslint/no-deprecated const { height, borderStyle, theme } = props; const { semanticColors } = theme; diff --git a/packages/react/src/components/Shimmer/ShimmerGap/ShimmerGap.base.tsx b/packages/react/src/components/Shimmer/ShimmerGap/ShimmerGap.base.tsx index 08b0b83fa88e0f..2d75b1da5c8d4f 100644 --- a/packages/react/src/components/Shimmer/ShimmerGap/ShimmerGap.base.tsx +++ b/packages/react/src/components/Shimmer/ShimmerGap/ShimmerGap.base.tsx @@ -8,7 +8,7 @@ const getClassNames = classNamesFunction = props => { - // eslint-disable-next-line deprecation/deprecation + // eslint-disable-next-line @typescript-eslint/no-deprecated const { height, styles, width = '10px', borderStyle, theme } = props; const classNames = getClassNames(styles!, { diff --git a/packages/react/src/components/Shimmer/ShimmerGap/ShimmerGap.styles.ts b/packages/react/src/components/Shimmer/ShimmerGap/ShimmerGap.styles.ts index d9d1ae91ff1a19..cf8dbddba30dd0 100644 --- a/packages/react/src/components/Shimmer/ShimmerGap/ShimmerGap.styles.ts +++ b/packages/react/src/components/Shimmer/ShimmerGap/ShimmerGap.styles.ts @@ -7,7 +7,7 @@ const GlobalClassNames = { }; export function getStyles(props: IShimmerGapStyleProps): IShimmerGapStyles { - // eslint-disable-next-line deprecation/deprecation + // eslint-disable-next-line @typescript-eslint/no-deprecated const { height, borderStyle, theme } = props; const { semanticColors } = theme; diff --git a/packages/react/src/components/Shimmer/ShimmerLine/ShimmerLine.base.tsx b/packages/react/src/components/Shimmer/ShimmerLine/ShimmerLine.base.tsx index 511e6c8634cc16..2d3e1bd6285058 100644 --- a/packages/react/src/components/Shimmer/ShimmerLine/ShimmerLine.base.tsx +++ b/packages/react/src/components/Shimmer/ShimmerLine/ShimmerLine.base.tsx @@ -8,7 +8,7 @@ const getClassNames = classNamesFunction = props => { - // eslint-disable-next-line deprecation/deprecation + // eslint-disable-next-line @typescript-eslint/no-deprecated const { height, styles, width = '100%', borderStyle, theme } = props; const classNames = getClassNames(styles!, { diff --git a/packages/react/src/components/Shimmer/ShimmerLine/ShimmerLine.styles.ts b/packages/react/src/components/Shimmer/ShimmerLine/ShimmerLine.styles.ts index e4096b4831f661..aab86f77cb1686 100644 --- a/packages/react/src/components/Shimmer/ShimmerLine/ShimmerLine.styles.ts +++ b/packages/react/src/components/Shimmer/ShimmerLine/ShimmerLine.styles.ts @@ -11,7 +11,7 @@ const GlobalClassNames = { }; export function getStyles(props: IShimmerLineStyleProps): IShimmerLineStyles { - // eslint-disable-next-line deprecation/deprecation + // eslint-disable-next-line @typescript-eslint/no-deprecated const { height, borderStyle, theme } = props; const { semanticColors } = theme; diff --git a/packages/react/src/components/Slider/useSlider.ts b/packages/react/src/components/Slider/useSlider.ts index bdb30715087204..e72d0f4eaa5af6 100644 --- a/packages/react/src/components/Slider/useSlider.ts +++ b/packages/react/src/components/Slider/useSlider.ts @@ -216,7 +216,7 @@ export const useSlider = (props: ISliderProps, ref: React.ForwardedRef { - // eslint-disable-next-line deprecation/deprecation + // eslint-disable-next-line @typescript-eslint/no-deprecated const sliderPositionRect: ClientRect = sliderLine.current!.getBoundingClientRect(); const sliderLength: number = !props.vertical ? sliderPositionRect.width : sliderPositionRect.height; const stepLength: number = sliderLength / steps; diff --git a/packages/react/src/components/SpinButton/SpinButton.base.tsx b/packages/react/src/components/SpinButton/SpinButton.base.tsx index 5fc5c254c85b73..816d0a275931d5 100644 --- a/packages/react/src/components/SpinButton/SpinButton.base.tsx +++ b/packages/react/src/components/SpinButton/SpinButton.base.tsx @@ -345,7 +345,7 @@ export const SpinButtonBase: React.FunctionComponent = React.f const handleKeyDown = (ev: React.KeyboardEvent): void => { // eat the up and down arrow keys to keep focus in the spinButton // (especially when a spinButton is inside of a FocusZone) - // eslint-disable-next-line deprecation/deprecation + // eslint-disable-next-line @typescript-eslint/no-deprecated if (ev.which === KeyCodes.up || ev.which === KeyCodes.down || ev.which === KeyCodes.enter) { ev.preventDefault(); ev.stopPropagation(); @@ -357,7 +357,7 @@ export const SpinButtonBase: React.FunctionComponent = React.f let spinDirection = KeyboardSpinDirection.notSpinning; - // eslint-disable-next-line deprecation/deprecation + // eslint-disable-next-line @typescript-eslint/no-deprecated switch (ev.which) { case KeyCodes.up: spinDirection = KeyboardSpinDirection.up; @@ -386,7 +386,7 @@ export const SpinButtonBase: React.FunctionComponent = React.f /** Stop spinning on keyUp if the up or down arrow key fired this event */ const handleKeyUp = React.useCallback( (ev: React.KeyboardEvent): void => { - // eslint-disable-next-line deprecation/deprecation + // eslint-disable-next-line @typescript-eslint/no-deprecated if (disabled || ev.which === KeyCodes.up || ev.which === KeyCodes.down) { stop(); return; diff --git a/packages/react/src/components/SpinButton/SpinButton.test.tsx b/packages/react/src/components/SpinButton/SpinButton.test.tsx index 2c2f3023494586..1715d792d89359 100644 --- a/packages/react/src/components/SpinButton/SpinButton.test.tsx +++ b/packages/react/src/components/SpinButton/SpinButton.test.tsx @@ -696,7 +696,7 @@ describe('SpinButton', () => { const onChange = jest.fn(); let keyCode: number | undefined; const onValidate = jest.fn((value: string, event?: React.SyntheticEvent) => { - // eslint-disable-next-line deprecation/deprecation + // eslint-disable-next-line @typescript-eslint/no-deprecated keyCode = (event as React.KeyboardEvent).which; return value; }); diff --git a/packages/react/src/components/Spinner/Spinner.base.tsx b/packages/react/src/components/Spinner/Spinner.base.tsx index 710ddf11a44794..81ba20450cff1c 100644 --- a/packages/react/src/components/Spinner/Spinner.base.tsx +++ b/packages/react/src/components/Spinner/Spinner.base.tsx @@ -13,7 +13,7 @@ export class SpinnerBase extends React.Component { }; public render() { - // eslint-disable-next-line deprecation/deprecation + // eslint-disable-next-line @typescript-eslint/no-deprecated const { type, size, ariaLabel, ariaLive, styles, label, theme, className, labelPosition } = this.props; const statusMessage = ariaLabel; const nativeProps = getNativeProps>(this.props, divProperties, ['size']); @@ -23,7 +23,7 @@ export class SpinnerBase extends React.Component { // finally goes away we should delete this. let styleSize = size; if (styleSize === undefined && type !== undefined) { - // eslint-disable-next-line deprecation/deprecation + // eslint-disable-next-line @typescript-eslint/no-deprecated styleSize = type === SpinnerType.large ? SpinnerSize.large : SpinnerSize.medium; } diff --git a/packages/react/src/components/Spinner/Spinner.types.ts b/packages/react/src/components/Spinner/Spinner.types.ts index 14800c32c87b6f..eb7e36666ff8fa 100644 --- a/packages/react/src/components/Spinner/Spinner.types.ts +++ b/packages/react/src/components/Spinner/Spinner.types.ts @@ -21,7 +21,7 @@ export interface ISpinnerProps extends React.HTMLAttributes { /** * @deprecated Use `size` instead. Will be removed at \>= 2.0.0. */ - // eslint-disable-next-line deprecation/deprecation + // eslint-disable-next-line @typescript-eslint/no-deprecated type?: SpinnerType; /** diff --git a/packages/react/src/components/Stack/Stack.styles.ts b/packages/react/src/components/Stack/Stack.styles.ts index 0a2c8b5d9fe298..ee2346a6fcd44a 100644 --- a/packages/react/src/components/Stack/Stack.styles.ts +++ b/packages/react/src/components/Stack/Stack.styles.ts @@ -30,12 +30,12 @@ export const styles: IStackComponent['styles'] = (props, theme, tokens): IStackS const classNames = getGlobalClassNames(GlobalClassNames, theme); - /* eslint-disable deprecation/deprecation */ + /* eslint-disable @typescript-eslint/no-deprecated */ const childrenGap = tokens && tokens.childrenGap ? tokens.childrenGap : props.gap; const maxHeight = tokens && tokens.maxHeight ? tokens.maxHeight : props.maxHeight; const maxWidth = tokens && tokens.maxWidth ? tokens.maxWidth : props.maxWidth; const padding = tokens && tokens.padding ? tokens.padding : props.padding; - /* eslint-enable deprecation/deprecation */ + /* eslint-enable @typescript-eslint/no-deprecated */ const { rowGap, columnGap } = parseGap(childrenGap, theme); diff --git a/packages/react/src/components/Stack/Stack.test.tsx b/packages/react/src/components/Stack/Stack.test.tsx index e18f76beda414f..998dd3d46b6536 100644 --- a/packages/react/src/components/Stack/Stack.test.tsx +++ b/packages/react/src/components/Stack/Stack.test.tsx @@ -202,7 +202,7 @@ describe('Stack', () => { it('renders horizontal Stack with a gap in rtl context correctly', () => { const component = renderer.create( - // eslint-disable-next-line deprecation/deprecation + // eslint-disable-next-line @typescript-eslint/no-deprecated Item 1 diff --git a/packages/react/src/components/Stack/Stack.tsx b/packages/react/src/components/Stack/Stack.tsx index 259f45c7a26fce..30cf4eaea89e5f 100644 --- a/packages/react/src/components/Stack/Stack.tsx +++ b/packages/react/src/components/Stack/Stack.tsx @@ -13,7 +13,7 @@ const StackView: IStackComponent['view'] = props => { const { as: RootType = 'div', disableShrink = false, - // eslint-disable-next-line deprecation/deprecation + // eslint-disable-next-line @typescript-eslint/no-deprecated doNotRenderFalsyValues = false, enableScopedSelectors = false, wrap, diff --git a/packages/react/src/components/SwatchColorPicker/ColorPickerGridCell.base.tsx b/packages/react/src/components/SwatchColorPicker/ColorPickerGridCell.base.tsx index 1b7f5b957e787e..5c023c190d3de8 100644 --- a/packages/react/src/components/SwatchColorPicker/ColorPickerGridCell.base.tsx +++ b/packages/react/src/components/SwatchColorPicker/ColorPickerGridCell.base.tsx @@ -67,7 +67,7 @@ const getColorPickerGridCellButtonClassNames = memoizeFunction( export const ColorPickerGridCellBase: React.FunctionComponent = props => { const { item, - // eslint-disable-next-line deprecation/deprecation + // eslint-disable-next-line @typescript-eslint/no-deprecated idPrefix = props.id, isRadio, selected = false, diff --git a/packages/react/src/components/SwatchColorPicker/SwatchColorPicker.base.tsx b/packages/react/src/components/SwatchColorPicker/SwatchColorPicker.base.tsx index d2aaaa6ba45532..8aba7a3b805877 100644 --- a/packages/react/src/components/SwatchColorPicker/SwatchColorPicker.base.tsx +++ b/packages/react/src/components/SwatchColorPicker/SwatchColorPicker.base.tsx @@ -68,7 +68,7 @@ export const SwatchColorPickerBase: React.FunctionComponent): void => { if ( - // eslint-disable-next-line deprecation/deprecation + // eslint-disable-next-line @typescript-eslint/no-deprecated ev.which === KeyCodes.up || - // eslint-disable-next-line deprecation/deprecation + // eslint-disable-next-line @typescript-eslint/no-deprecated ev.which === KeyCodes.down || - // eslint-disable-next-line deprecation/deprecation + // eslint-disable-next-line @typescript-eslint/no-deprecated ev.which === KeyCodes.left || - // eslint-disable-next-line deprecation/deprecation + // eslint-disable-next-line @typescript-eslint/no-deprecated ev.which === KeyCodes.right ) { setNavigationTimeout(); diff --git a/packages/react/src/components/TeachingBubble/TeachingBubble.base.tsx b/packages/react/src/components/TeachingBubble/TeachingBubble.base.tsx index f50adf04ac1978..a3105f614d053f 100644 --- a/packages/react/src/components/TeachingBubble/TeachingBubble.base.tsx +++ b/packages/react/src/components/TeachingBubble/TeachingBubble.base.tsx @@ -44,10 +44,10 @@ export const TeachingBubbleBase: React.FunctionComponent = const mergedRootRef = useMergedRefs(rootElementRef, forwardedRef); const { calloutProps: setCalloutProps, - // eslint-disable-next-line deprecation/deprecation + // eslint-disable-next-line @typescript-eslint/no-deprecated targetElement, onDismiss, - // eslint-disable-next-line deprecation/deprecation + // eslint-disable-next-line @typescript-eslint/no-deprecated hasCloseButton = props.hasCloseIcon, isWide, styles, diff --git a/packages/react/src/components/TeachingBubble/TeachingBubbleContent.base.tsx b/packages/react/src/components/TeachingBubble/TeachingBubbleContent.base.tsx index e25d246f429de3..b30cb0ca199ead 100644 --- a/packages/react/src/components/TeachingBubble/TeachingBubbleContent.base.tsx +++ b/packages/react/src/components/TeachingBubble/TeachingBubbleContent.base.tsx @@ -48,7 +48,7 @@ export const TeachingBubbleContentBase: React.FunctionComponent | KeyboardEvent): void => { if (onDismiss) { - // eslint-disable-next-line deprecation/deprecation + // eslint-disable-next-line @typescript-eslint/no-deprecated if (ev.which === KeyCodes.escape) { onDismiss(ev); } diff --git a/packages/react/src/components/TextField/MaskedTextField/MaskedTextField.tsx b/packages/react/src/components/TextField/MaskedTextField/MaskedTextField.tsx index d9108ab0c4c9e9..d978282b2177b4 100644 --- a/packages/react/src/components/TextField/MaskedTextField/MaskedTextField.tsx +++ b/packages/react/src/components/TextField/MaskedTextField/MaskedTextField.tsx @@ -221,7 +221,7 @@ export const MaskedTextField: React.FunctionComponent = R const charsSelected = selectionEnd - selectionStart; const charCount = inputValue.length + charsSelected - displayValue.length; const startPos = selectionStart; - // eslint-disable-next-line deprecation/deprecation + // eslint-disable-next-line @typescript-eslint/no-deprecated const pastedString = inputValue.substr(startPos, charCount); // Clear any selected characters @@ -252,7 +252,7 @@ export const MaskedTextField: React.FunctionComponent = R // This case is if the user added characters const charCount = inputValue.length - displayValue.length; const startPos = selectionEnd - charCount; - // eslint-disable-next-line deprecation/deprecation + // eslint-disable-next-line @typescript-eslint/no-deprecated const enteredString = inputValue.substr(startPos, charCount); cursorPos = insertString(internalState.maskCharData, startPos, enteredString); @@ -264,7 +264,7 @@ export const MaskedTextField: React.FunctionComponent = R const charCount = 1; const selectCount = displayValue.length + charCount - inputValue.length; const startPos = selectionEnd - charCount; - // eslint-disable-next-line deprecation/deprecation + // eslint-disable-next-line @typescript-eslint/no-deprecated const enteredString = inputValue.substr(startPos, charCount); // Clear the selected range @@ -292,7 +292,7 @@ export const MaskedTextField: React.FunctionComponent = R internalState.changeSelectionData = null; if (textField.current && textField.current.value) { - // eslint-disable-next-line deprecation/deprecation + // eslint-disable-next-line @typescript-eslint/no-deprecated const { keyCode, ctrlKey, metaKey } = ev; // Ignore ctrl and meta keydown diff --git a/packages/react/src/components/TextField/TextField.base.tsx b/packages/react/src/components/TextField/TextField.base.tsx index 36395f784bd3ae..5b7625ce812c43 100644 --- a/packages/react/src/components/TextField/TextField.base.tsx +++ b/packages/react/src/components/TextField/TextField.base.tsx @@ -246,7 +246,7 @@ export class TextFieldBase })); return ( - // eslint-disable-next-line deprecation/deprecation + // eslint-disable-next-line @typescript-eslint/no-deprecated
{onRenderLabel(this.props, this._onRenderLabel)} diff --git a/packages/react/src/components/TimePicker/TimePicker.tsx b/packages/react/src/components/TimePicker/TimePicker.tsx index aafe9edf8f7eba..473d207f1ea8ce 100644 --- a/packages/react/src/components/TimePicker/TimePicker.tsx +++ b/packages/react/src/components/TimePicker/TimePicker.tsx @@ -191,7 +191,7 @@ export const TimePicker: React.FunctionComponent = ({ ); const evaluatePressedKey = (event: React.KeyboardEvent) => { - // eslint-disable-next-line deprecation/deprecation + // eslint-disable-next-line @typescript-eslint/no-deprecated const charCode = event.charCode; if ( !onFormatDate && diff --git a/packages/react/src/components/Toggle/Toggle.base.tsx b/packages/react/src/components/Toggle/Toggle.base.tsx index c5413d9f06e138..1d0ed33e5b9d0e 100644 --- a/packages/react/src/components/Toggle/Toggle.base.tsx +++ b/packages/react/src/components/Toggle/Toggle.base.tsx @@ -19,13 +19,13 @@ export const ToggleBase: React.FunctionComponent = React.forwardRe disabled, inlineLabel, label, - // eslint-disable-next-line deprecation/deprecation + // eslint-disable-next-line @typescript-eslint/no-deprecated offAriaLabel, offText, - // eslint-disable-next-line deprecation/deprecation + // eslint-disable-next-line @typescript-eslint/no-deprecated onAriaLabel, onChange, - // eslint-disable-next-line deprecation/deprecation + // eslint-disable-next-line @typescript-eslint/no-deprecated onChanged, onClick: onToggleClick, onText, diff --git a/packages/react/src/components/Tooltip/TooltipHost.base.tsx b/packages/react/src/components/Tooltip/TooltipHost.base.tsx index b769ccafd20edd..966fc56845d877 100644 --- a/packages/react/src/components/Tooltip/TooltipHost.base.tsx +++ b/packages/react/src/components/Tooltip/TooltipHost.base.tsx @@ -67,7 +67,7 @@ export class TooltipHostBase extends React.Component): void => { - // eslint-disable-next-line deprecation/deprecation + // eslint-disable-next-line @typescript-eslint/no-deprecated if ((ev.which === KeyCodes.escape || ev.ctrlKey) && this.state.isTooltipVisible) { this._hideTooltip(); ev.stopPropagation(); diff --git a/packages/react/src/components/WeeklyDayPicker/WeeklyDayPicker.base.tsx b/packages/react/src/components/WeeklyDayPicker/WeeklyDayPicker.base.tsx index 59379d5241fccf..986fc13dfd078c 100644 --- a/packages/react/src/components/WeeklyDayPicker/WeeklyDayPicker.base.tsx +++ b/packages/react/src/components/WeeklyDayPicker/WeeklyDayPicker.base.tsx @@ -280,7 +280,7 @@ export class WeeklyDayPickerBase extends React.Component) => { - // eslint-disable-next-line deprecation/deprecation + // eslint-disable-next-line @typescript-eslint/no-deprecated switch (ev.which) { case KeyCodes.enter: ev.preventDefault(); @@ -297,7 +297,7 @@ export class WeeklyDayPickerBase extends React.Component void): ((ev: React.KeyboardEvent) => void) => { return (ev: React.KeyboardEvent) => { - // eslint-disable-next-line deprecation/deprecation + // eslint-disable-next-line @typescript-eslint/no-deprecated switch (ev.which) { case KeyCodes.enter: callback(); diff --git a/packages/react/src/components/pickers/BasePicker.tsx b/packages/react/src/components/pickers/BasePicker.tsx index 2bf94ebfddb693..f9a15be205724e 100644 --- a/packages/react/src/components/pickers/BasePicker.tsx +++ b/packages/react/src/components/pickers/BasePicker.tsx @@ -119,7 +119,7 @@ export class BasePicker> protected SuggestionOfProperType = Suggestions as new (props: ISuggestionsProps) => Suggestions; protected currentPromise: PromiseLike | undefined; protected _ariaMap: IPickerAriaIds; - // eslint-disable-next-line deprecation/deprecation + // eslint-disable-next-line @typescript-eslint/no-deprecated private _styledSuggestions = getStyledSuggestions(this.SuggestionOfProperType); private _id: string; private _async: Async; @@ -527,7 +527,7 @@ export class BasePicker> protected onEmptyInputFocus() { const emptyResolveSuggestions = this.props.onEmptyResolveSuggestions ? this.props.onEmptyResolveSuggestions - : // eslint-disable-next-line deprecation/deprecation + : // eslint-disable-next-line @typescript-eslint/no-deprecated this.props.onEmptyInputFocus; // Only attempt to resolve suggestions if it exists @@ -706,7 +706,7 @@ export class BasePicker> }; protected onKeyDown = (ev: React.KeyboardEvent): void => { - // eslint-disable-next-line deprecation/deprecation + // eslint-disable-next-line @typescript-eslint/no-deprecated const keyCode = ev.which; switch (keyCode) { case KeyCodes.escape: @@ -954,7 +954,7 @@ export class BasePicker> protected _shouldFocusZoneEnterInnerZone = (ev: React.KeyboardEvent): boolean => { // If suggestions are shown const up/down keys control them, otherwise allow them through to control the focusZone. if (this.state.suggestionsVisible) { - // eslint-disable-next-line deprecation/deprecation + // eslint-disable-next-line @typescript-eslint/no-deprecated switch (ev.which) { case KeyCodes.up: case KeyCodes.down: @@ -962,7 +962,7 @@ export class BasePicker> } } - // eslint-disable-next-line deprecation/deprecation + // eslint-disable-next-line @typescript-eslint/no-deprecated if (ev.which === KeyCodes.enter) { return true; } @@ -1023,7 +1023,7 @@ export class BasePicker> return (
{ - // eslint-disable-next-line deprecation/deprecation + // eslint-disable-next-line @typescript-eslint/no-deprecated this.getSuggestionsAlert(alertClassName) } {removedItemText} diff --git a/packages/react/src/components/pickers/PeoplePicker/PeoplePickerItems/PeoplePickerItem.types.ts b/packages/react/src/components/pickers/PeoplePicker/PeoplePickerItems/PeoplePickerItem.types.ts index ef05058274fd0f..ba9d4f61182d1c 100644 --- a/packages/react/src/components/pickers/PeoplePicker/PeoplePickerItems/PeoplePickerItem.types.ts +++ b/packages/react/src/components/pickers/PeoplePicker/PeoplePickerItems/PeoplePickerItem.types.ts @@ -118,7 +118,7 @@ export interface IPeoplePickerItemSuggestionStyles { * PeoplePickerItemWithMenu props interface. * @deprecated Do not use. Will be removed in \>= 7.0 */ -// eslint-disable-next-line deprecation/deprecation +// eslint-disable-next-line @typescript-eslint/no-deprecated export interface IPeoplePickerItemWithMenuProps extends IPickerItemProps {} /** diff --git a/packages/react/src/components/pickers/PeoplePicker/PeoplePickerItems/SelectedItemDefault.tsx b/packages/react/src/components/pickers/PeoplePicker/PeoplePickerItems/SelectedItemDefault.tsx index 6d842d969844e9..675e786142ef69 100644 --- a/packages/react/src/components/pickers/PeoplePicker/PeoplePickerItems/SelectedItemDefault.tsx +++ b/packages/react/src/components/pickers/PeoplePicker/PeoplePickerItems/SelectedItemDefault.tsx @@ -45,7 +45,7 @@ export const SelectedItemDefault: (props: IPeoplePickerItemSelectedProps) => JSX
{ - const { styles, theme, children } = props; + const { styles, theme, children, ...rest } = props; const classNames = getClassNames(styles, { theme: theme!, }); - return
{children}
; + return ( +
+ {' '} + {children}{' '} +
+ ); }; export const TagItemSuggestion = styled< diff --git a/packages/react/src/index.ts b/packages/react/src/index.ts index e930a8da1676cb..470021f579e42f 100644 --- a/packages/react/src/index.ts +++ b/packages/react/src/index.ts @@ -6,7 +6,6 @@ export { Announced, AnnouncedBase } from './Announced'; export type { IAnnouncedProps, IAnnouncedStyleProps, IAnnouncedStyles } from './Announced'; export { Breadcrumb, BreadcrumbBase } from './Breadcrumb'; export type { - // eslint-disable-next-line deprecation/deprecation IBreadCrumbData, IBreadcrumb, IBreadcrumbData, @@ -19,7 +18,6 @@ export type { export { ActionButton, BaseButton, - // eslint-disable-next-line deprecation/deprecation Button, ButtonGlobalClassNames, ButtonType, @@ -58,7 +56,6 @@ export { FirstWeekOfYear, defaultCalendarNavigationIcons, defaultCalendarStrings, - // eslint-disable-next-line deprecation/deprecation defaultDayPickerStrings, } from './Calendar'; export type { @@ -71,9 +68,7 @@ export type { ICalendarDayProps, ICalendarDayStyleProps, ICalendarDayStyles, - // eslint-disable-next-line deprecation/deprecation ICalendarFormatDateCallbacks, - // eslint-disable-next-line deprecation/deprecation ICalendarIconStrings, ICalendarMonth, ICalendarMonthProps, @@ -126,7 +121,6 @@ export type { ICoachmarkProps, ICoachmarkStyleProps, ICoachmarkStyles, - // eslint-disable-next-line deprecation/deprecation ICoachmarkTypes, IEntityRect, } from './Coachmark'; @@ -135,7 +129,6 @@ export { MAX_COLOR_ALPHA, MAX_COLOR_HUE, MAX_COLOR_RGB, - // eslint-disable-next-line deprecation/deprecation MAX_COLOR_RGBA, MAX_COLOR_SATURATION, MAX_COLOR_VALUE, @@ -218,7 +211,6 @@ export { ContextualMenuItemBase, ContextualMenuItemType, canAnyMenuItemsCheck, - // eslint-disable-next-line deprecation/deprecation getContextualMenuItemClassNames, getContextualMenuItemStyles, getMenuItemStyles, @@ -226,7 +218,6 @@ export { } from './ContextualMenu'; export type { IContextualMenu, - // eslint-disable-next-line deprecation/deprecation IContextualMenuClassNames, IContextualMenuItem, IContextualMenuItemProps, @@ -241,7 +232,6 @@ export type { IContextualMenuStyleProps, IContextualMenuStyles, IContextualMenuSubComponentStyles, - // eslint-disable-next-line deprecation/deprecation IMenuItemClassNames, IMenuItemStyles, } from './ContextualMenu'; @@ -401,7 +391,6 @@ export type { } from './Dialog'; export { VerticalDivider } from './Divider'; export type { - // eslint-disable-next-line deprecation/deprecation IVerticalDividerClassNames, IVerticalDividerProps, IVerticalDividerPropsStyles, @@ -484,11 +473,7 @@ export type { IExtendedPeoplePickerProps, IPeoplePickerItemProps, } from './ExtendedPicker'; -export { - // eslint-disable-next-line deprecation/deprecation - Fabric, - FabricBase, -} from './Fabric'; +export { Fabric, FabricBase } from './Fabric'; export type { IFabricProps, IFabricStyleProps, IFabricStyles } from './Fabric'; export { Facepile, FacepileBase, OverflowButtonType } from './Facepile'; export type { IFacepile, IFacepilePersona, IFacepileProps, IFacepileStyleProps, IFacepileStyles } from './Facepile'; @@ -543,9 +528,7 @@ export type { IGroupShowAllStyleProps, IGroupShowAllStyles, IGroupSpacerProps, - // eslint-disable-next-line deprecation/deprecation IGroupSpacerStyleProps, - // eslint-disable-next-line deprecation/deprecation IGroupSpacerStyles, IGroupedListSectionProps, IGroupedListSectionState, @@ -586,16 +569,7 @@ export type { IPlainCardStyleProps, IPlainCardStyles, } from './HoverCard'; -export { - FontIcon, - Icon, - IconBase, - // eslint-disable-next-line deprecation/deprecation - IconType, - ImageIcon, - getFontIcon, - getIconContent, -} from './Icon'; +export { FontIcon, Icon, IconBase, IconType, ImageIcon, getFontIcon, getIconContent } from './Icon'; export type { IFontIconProps, IIconContent, @@ -606,10 +580,7 @@ export type { IImageIconProps, } from './Icon'; export { initializeIcons } from './Icons'; -export type { - // eslint-disable-next-line deprecation/deprecation - IconNames, -} from './Icons'; +export type { IconNames } from './Icons'; export { Image, ImageBase, ImageCoverStyle, ImageFit, ImageLoadState } from './Image'; export type { IImage, IImageProps, IImageState, IImageStyleProps, IImageStyles } from './Image'; export { @@ -677,14 +648,7 @@ export { } from './Layer'; export type { ILayer, ILayerHost, ILayerHostProps, ILayerProps, ILayerStyleProps, ILayerStyles } from './Layer'; export { Link, LinkBase } from './Link'; -export type { - ILink, - // eslint-disable-next-line deprecation/deprecation - ILinkHTMLAttributes, - ILinkProps, - ILinkStyleProps, - ILinkStyles, -} from './Link'; +export type { ILink, ILinkHTMLAttributes, ILinkProps, ILinkStyleProps, ILinkStyles } from './Link'; export { List, ScrollToMode } from './List'; export type { IList, @@ -818,10 +782,8 @@ export type { IPeoplePickerItemSuggestionProps, IPeoplePickerItemSuggestionStyleProps, IPeoplePickerItemSuggestionStyles, - // eslint-disable-next-line deprecation/deprecation IPeoplePickerItemWithMenuProps, IPeoplePickerProps, - // eslint-disable-next-line deprecation/deprecation IPersonaWithMenu, IPickerAriaIds, IPickerItem, @@ -847,15 +809,7 @@ export type { ITagItemRemoveButtonProps, ITagPickerProps, } from './Pickers'; -export { - Pivot, - PivotBase, - PivotItem, - // eslint-disable-next-line deprecation/deprecation - PivotLinkFormat, - // eslint-disable-next-line deprecation/deprecation - PivotLinkSize, -} from './Pivot'; +export { Pivot, PivotBase, PivotItem, PivotLinkFormat, PivotLinkSize } from './Pivot'; export type { IPivot, IPivotItemProps, @@ -883,7 +837,6 @@ export type { ICalloutPositionedInfo, IElementPosition, IElementPositionInfo, - // eslint-disable-next-line deprecation/deprecation IPoint, IPosition, IPositionDirectionalHintData, @@ -897,7 +850,6 @@ export { PositioningContainer, useHeightOffset } from './PositioningContainer'; export type { IPositioningContainer, IPositioningContainerProps, - // eslint-disable-next-line deprecation/deprecation IPositioningContainerTypes, } from './PositioningContainer'; export { ProgressIndicator, ProgressIndicatorBase } from './ProgressIndicator'; @@ -930,13 +882,9 @@ export { initializeResponsiveMode, setResponsiveMode, useResponsiveMode, - // eslint-disable-next-line deprecation/deprecation withResponsiveMode, } from './ResponsiveMode'; -export type { - // eslint-disable-next-line deprecation/deprecation - IWithResponsiveModeState, -} from './ResponsiveMode'; +export type { IWithResponsiveModeState } from './ResponsiveMode'; export { ScrollablePane, ScrollablePaneBase, ScrollablePaneContext, ScrollbarVisibility } from './ScrollablePane'; export type { IScrollablePane, @@ -1021,13 +969,7 @@ export { Slider, SliderBase } from './Slider'; export type { ISlider, ISliderProps, ISliderStyleProps, ISliderStyles } from './Slider'; export { KeyboardSpinDirection, SpinButton } from './SpinButton'; export type { ISpinButton, ISpinButtonProps, ISpinButtonStyleProps, ISpinButtonStyles } from './SpinButton'; -export { - Spinner, - SpinnerBase, - SpinnerSize, - // eslint-disable-next-line deprecation/deprecation - SpinnerType, -} from './Spinner'; +export { Spinner, SpinnerBase, SpinnerSize, SpinnerType } from './Spinner'; export type { ISpinner, ISpinnerProps, ISpinnerStyleProps, ISpinnerStyles, SpinnerLabelPosition } from './Spinner'; export { Stack, StackItem } from './Stack'; export type { @@ -1059,7 +1001,6 @@ export { DefaultEffects, DefaultFontStyles, DefaultPalette, - // eslint-disable-next-line deprecation/deprecation EdgeChromiumHighContrastSelector, FontClassNames, FontSizes, @@ -1092,11 +1033,9 @@ export { createTheme, focusClear, fontFace, - // eslint-disable-next-line deprecation/deprecation getEdgeChromiumNoHighContrastAdjustSelector, getFadedOverflowStyle, getFocusOutlineStyle, - // eslint-disable-next-line deprecation/deprecation getFocusStyle, getGlobalClassNames, getHighContrastNoAdjustStyle, @@ -1224,10 +1163,8 @@ export type { export { Async, AutoScroll, - // eslint-disable-next-line deprecation/deprecation BaseComponent, Customizations, - // eslint-disable-next-line deprecation/deprecation Customizer, CustomizerContext, DATA_IS_SCROLLABLE_ATTRIBUTE, @@ -1308,7 +1245,6 @@ export { getRTL, getRTLSafeKeyCode, getRect, - // eslint-disable-next-line deprecation/deprecation getResourceUrl, getScrollbarWidth, getVirtualParent, @@ -1320,11 +1256,9 @@ export { hoistStatics, htmlElementProperties, iframeProperties, - // eslint-disable-next-line deprecation/deprecation imageProperties, imgProperties, initializeComponentRef, - // eslint-disable-next-line deprecation/deprecation initializeFocusRects, inputProperties, isControlled, @@ -1358,7 +1292,6 @@ export { optionProperties, portalContainsElement, precisionRound, - // eslint-disable-next-line deprecation/deprecation raiseClick, removeDirectionalKeyCode, removeIndex, @@ -1369,15 +1302,12 @@ export { safeRequestAnimationFrame, safeSetTimeout, selectProperties, - // eslint-disable-next-line deprecation/deprecation setBaseUrl, setFocusVisibility, - // eslint-disable-next-line deprecation/deprecation setLanguage, setMemoizeWeakMap, setPortalAttribute, setRTL, - // eslint-disable-next-line deprecation/deprecation setSSR, setVirtualParent, setWarningCallback, @@ -1416,7 +1346,6 @@ export type { ICancelable, IChangeDescription, IChangeEventCallback, - // eslint-disable-next-line deprecation/deprecation IClassNames, IClassNamesFunctionOptions, IComponentAs, @@ -1454,12 +1383,9 @@ export type { IStyleFunctionOrObject, IVirtualElement, IWarnControlledUsageParams, - // eslint-disable-next-line deprecation/deprecation Omit, RefObject, - // eslint-disable-next-line deprecation/deprecation Settings, - // eslint-disable-next-line deprecation/deprecation SettingsFunction, StyleFunction, } from './Utilities'; @@ -1485,19 +1411,8 @@ export type { WindowProviderProps } from './WindowProvider'; * Styles and Theme both exported the same names which causes conflicting * star exports with webpack5. See here: https://github.com/microsoft/fluentui/issues/21601. */ -export { - ThemeContext, - ThemeProvider, - // eslint-disable-next-line deprecation/deprecation - makeStyles, - useTheme, -} from './utilities/ThemeProvider/index'; -export type { - StylesClassMapping, - ThemeProviderProps, - // eslint-disable-next-line deprecation/deprecation - UseStylesOptions, -} from './utilities/ThemeProvider/index'; +export { ThemeContext, ThemeProvider, makeStyles, useTheme } from './utilities/ThemeProvider/index'; +export type { StylesClassMapping, ThemeProviderProps, UseStylesOptions } from './utilities/ThemeProvider/index'; export { CommunicationColors, DefaultSpacing, diff --git a/packages/react/src/utilities/ButtonGrid/ButtonGrid.base.tsx b/packages/react/src/utilities/ButtonGrid/ButtonGrid.base.tsx index 287fb5a42a45e4..13216ef3c370aa 100644 --- a/packages/react/src/utilities/ButtonGrid/ButtonGrid.base.tsx +++ b/packages/react/src/utilities/ButtonGrid/ButtonGrid.base.tsx @@ -17,9 +17,9 @@ export const ButtonGridBase: React.FunctionComponent = React.f columnCount, onRenderItem, isSemanticRadio, - // eslint-disable-next-line deprecation/deprecation + // eslint-disable-next-line @typescript-eslint/no-deprecated ariaPosInSet = props.positionInSet, - // eslint-disable-next-line deprecation/deprecation + // eslint-disable-next-line @typescript-eslint/no-deprecated ariaSetSize = props.setSize, styles, doNotContainWithinFocusZone, diff --git a/packages/react/src/utilities/DraggableZone/DraggableZone.tsx b/packages/react/src/utilities/DraggableZone/DraggableZone.tsx index 760e2612fa684e..0a69e4deca5e4a 100644 --- a/packages/react/src/utilities/DraggableZone/DraggableZone.tsx +++ b/packages/react/src/utilities/DraggableZone/DraggableZone.tsx @@ -269,7 +269,7 @@ export class DraggableZone extends React.Component { const stylesheet: Stylesheet = Stylesheet.getInstance(); - // eslint-disable-next-line deprecation/deprecation + // eslint-disable-next-line @typescript-eslint/no-deprecated const useThemedStyles = makeStyles(theme => ({ root: { background: theme.palette.themePrimary, @@ -27,7 +27,7 @@ describe('makeStyles', () => { const ThemeStyledComponent = () => ; - // eslint-disable-next-line deprecation/deprecation + // eslint-disable-next-line @typescript-eslint/no-deprecated const useStaticStyles = makeStyles({ root: { background: 'yellow', @@ -48,7 +48,7 @@ describe('makeStyles', () => { }); it('can create basic styles as an object (no type errors)', () => { - // eslint-disable-next-line deprecation/deprecation + // eslint-disable-next-line @typescript-eslint/no-deprecated makeStyles({ root: { alignItems: 'center', @@ -57,7 +57,7 @@ describe('makeStyles', () => { }); it('can create style functions (no type errors)', () => { - // eslint-disable-next-line deprecation/deprecation + // eslint-disable-next-line @typescript-eslint/no-deprecated makeStyles(() => ({ root: { alignItems: 'center', @@ -78,7 +78,7 @@ describe('makeStyles', () => { }); safeMount( - // eslint-disable-next-line deprecation/deprecation + // eslint-disable-next-line @typescript-eslint/no-deprecated , diff --git a/packages/react/src/utilities/ThemeProvider/makeStyles.ts b/packages/react/src/utilities/ThemeProvider/makeStyles.ts index 8e2609c53e8c31..a635e88fec1d1c 100644 --- a/packages/react/src/utilities/ThemeProvider/makeStyles.ts +++ b/packages/react/src/utilities/ThemeProvider/makeStyles.ts @@ -94,7 +94,7 @@ type WindowWithId = Window & { */ export function makeStyles( styleOrFunction: TStyleSet | ((theme: Theme) => TStyleSet), - // eslint-disable-next-line deprecation/deprecation + // eslint-disable-next-line @typescript-eslint/no-deprecated ): (options?: UseStylesOptions) => StylesClassMapping { // Create graph of inputs to map to output. const graph: Graph = new Map(); @@ -113,7 +113,7 @@ export function makeStyles => { let { theme } = options; let winId: string | undefined; diff --git a/packages/react/src/utilities/ThemeProvider/useThemeProviderClasses.tsx b/packages/react/src/utilities/ThemeProvider/useThemeProviderClasses.tsx index ae44f3a63b55a3..4b45e44480cf43 100644 --- a/packages/react/src/utilities/ThemeProvider/useThemeProviderClasses.tsx +++ b/packages/react/src/utilities/ThemeProvider/useThemeProviderClasses.tsx @@ -5,7 +5,7 @@ import { makeStyles } from './makeStyles'; import type { ThemeProviderState } from './ThemeProvider.types'; import type { Theme } from '@fluentui/theme'; -// eslint-disable-next-line deprecation/deprecation +// eslint-disable-next-line @typescript-eslint/no-deprecated const useThemeProviderStyles = makeStyles((theme: Theme) => { const { semanticColors, fonts } = theme; diff --git a/packages/react/src/utilities/contextualMenu/contextualMenuUtility.ts b/packages/react/src/utilities/contextualMenu/contextualMenuUtility.ts index 018e3051df284e..eb142245b0c83f 100644 --- a/packages/react/src/utilities/contextualMenu/contextualMenuUtility.ts +++ b/packages/react/src/utilities/contextualMenu/contextualMenuUtility.ts @@ -26,7 +26,7 @@ export function getIsChecked(item: IContextualMenuItem): boolean | null { } export function hasSubmenu(item: IContextualMenuItem): boolean { - // eslint-disable-next-line deprecation/deprecation + // eslint-disable-next-line @typescript-eslint/no-deprecated return !!(item.subMenuProps || item.items); } diff --git a/packages/react/src/utilities/decorators/withResponsiveMode.test.tsx b/packages/react/src/utilities/decorators/withResponsiveMode.test.tsx index 4e177ced66e7d4..19452ecd98d5d6 100644 --- a/packages/react/src/utilities/decorators/withResponsiveMode.test.tsx +++ b/packages/react/src/utilities/decorators/withResponsiveMode.test.tsx @@ -2,7 +2,7 @@ import * as React from 'react'; import * as ReactTestUtils from 'react-dom/test-utils'; import { setResponsiveMode, withResponsiveMode, ResponsiveMode } from './withResponsiveMode'; -// eslint-disable-next-line deprecation/deprecation +// eslint-disable-next-line @typescript-eslint/no-deprecated @withResponsiveMode class Example extends React.Component { public render(): JSX.Element { diff --git a/packages/react/src/utilities/decorators/withResponsiveMode.tsx b/packages/react/src/utilities/decorators/withResponsiveMode.tsx index fdc6df0303db26..fd60358a59f2a1 100644 --- a/packages/react/src/utilities/decorators/withResponsiveMode.tsx +++ b/packages/react/src/utilities/decorators/withResponsiveMode.tsx @@ -74,7 +74,7 @@ export function getInitialResponsiveMode(): ResponsiveMode { export function withResponsiveMode( ComposedComponent: new (props: TProps, ...args: any[]) => React.Component, ): any { - // eslint-disable-next-line deprecation/deprecation + // eslint-disable-next-line @typescript-eslint/no-deprecated const resultClass = class WithResponsiveMode extends BaseDecorator { public static contextType = WindowContext; public context: React.ContextType; diff --git a/packages/react/src/utilities/positioning/positioning.ts b/packages/react/src/utilities/positioning/positioning.ts index 3a68ce3f882701..9949978414b5fa 100644 --- a/packages/react/src/utilities/positioning/positioning.ts +++ b/packages/react/src/utilities/positioning/positioning.ts @@ -779,7 +779,7 @@ function _positionBeak(beakWidth: number, elementPosition: IElementPositionInfo) } function _getRectangleFromElement(element: Element): Rectangle { - // eslint-disable-next-line deprecation/deprecation + // eslint-disable-next-line @typescript-eslint/no-deprecated const clientRect: ClientRect = element.getBoundingClientRect(); return new Rectangle(clientRect.left, clientRect.right, clientRect.top, clientRect.bottom); @@ -802,9 +802,9 @@ function _getTargetRect(bounds: Rectangle, target: Element | MouseEvent | Point // HTMLImgElements can have x and y values. The check for it being a point must go last. } else { const rectOrPoint: Point & Rectangle = target as Point & Rectangle; - // eslint-disable-next-line deprecation/deprecation + // eslint-disable-next-line @typescript-eslint/no-deprecated const left = rectOrPoint.left || rectOrPoint.x; - // eslint-disable-next-line deprecation/deprecation + // eslint-disable-next-line @typescript-eslint/no-deprecated const top = rectOrPoint.top || rectOrPoint.y; const right = rectOrPoint.right || left; const bottom = rectOrPoint.bottom || top; @@ -993,9 +993,9 @@ function _getRectangleFromTarget(target: Element | MouseEvent | Point | Rectangl const rectOrPointTarget: Point & Rectangle = target as Point & Rectangle; let targetRect: Rectangle; - // eslint-disable-next-line deprecation/deprecation + // eslint-disable-next-line @typescript-eslint/no-deprecated const left = rectOrPointTarget.left ?? rectOrPointTarget.x; - // eslint-disable-next-line deprecation/deprecation + // eslint-disable-next-line @typescript-eslint/no-deprecated const top = rectOrPointTarget.top ?? rectOrPointTarget.y; const right = rectOrPointTarget.right ?? left; const bottom = rectOrPointTarget.bottom ?? top; @@ -1132,9 +1132,9 @@ function _getBoundsFromTargetWindow( } // If the target is not null get x-axis and y-axis coordinates directly. else if (target !== null) { - // eslint-disable-next-line deprecation/deprecation + // eslint-disable-next-line @typescript-eslint/no-deprecated x = (target as Point).left || (target as MouseEvent | Point).x; - // eslint-disable-next-line deprecation/deprecation + // eslint-disable-next-line @typescript-eslint/no-deprecated y = (target as Point).top || (target as MouseEvent | Point).y; } diff --git a/packages/react/src/utilities/positioning/positioning.types.ts b/packages/react/src/utilities/positioning/positioning.types.ts index 4810db92f5a9d6..6f1c32a4c1ddc9 100644 --- a/packages/react/src/utilities/positioning/positioning.types.ts +++ b/packages/react/src/utilities/positioning/positioning.types.ts @@ -123,5 +123,4 @@ export interface IRelativePositions { submenuDirection: DirectionalHint; } -// eslint-disable-next-line deprecation/deprecation export type { Point, IPoint } from '../../Utilities'; diff --git a/packages/react/src/utilities/selection/SelectionZone.tsx b/packages/react/src/utilities/selection/SelectionZone.tsx index 82ed097d3b7271..ecf1a4d35c7e26 100644 --- a/packages/react/src/utilities/selection/SelectionZone.tsx +++ b/packages/react/src/utilities/selection/SelectionZone.tsx @@ -522,9 +522,9 @@ export class SelectionZone extends React.Component).keyCode; this._isTabPressed = keyCode ? keyCode === KeyCodes.tab : false; } diff --git a/packages/set-version/.eslintrc.json b/packages/set-version/.eslintrc.json index 1aa83ab0565376..905bf718151d3a 100644 --- a/packages/set-version/.eslintrc.json +++ b/packages/set-version/.eslintrc.json @@ -2,8 +2,15 @@ "extends": ["plugin:@fluentui/eslint-plugin/react--legacy"], "root": true, "rules": { - "deprecation/deprecation": "off", "prefer-const": "off", "no-restricted-globals": "off" - } + }, + "overrides": [ + { + "files": ["**/*.{ts,tsx}"], + "rules": { + "@typescript-eslint/no-deprecated": "off" + } + } + ] } diff --git a/packages/storybook/package.json b/packages/storybook/package.json index 97be09debf8faf..fdace2fd7618c0 100644 --- a/packages/storybook/package.json +++ b/packages/storybook/package.json @@ -22,11 +22,11 @@ "@fluentui/scripts-tasks": "*" }, "dependencies": { - "@fluentui/react": "^8.122.6", + "@fluentui/react": "^8.122.7", "@fluentui/theme": "^2.6.64", "@storybook/addon-essentials": "7.6.20", - "@fluentui/azure-themes": "^8.6.119", - "@fluentui/theme-samples": "^8.7.195", + "@fluentui/azure-themes": "^8.6.120", + "@fluentui/theme-samples": "^8.7.196", "tslib": "^2.1.0" }, "peerDependencies": { diff --git a/packages/style-utilities/src/index.ts b/packages/style-utilities/src/index.ts index 207578d211c502..ee8546ea409e9a 100644 --- a/packages/style-utilities/src/index.ts +++ b/packages/style-utilities/src/index.ts @@ -14,7 +14,7 @@ export { hiddenContentStyle, PulsingBeaconAnimationStyles, getGlobalClassNames, - // eslint-disable-next-line deprecation/deprecation + // eslint-disable-next-line @typescript-eslint/no-deprecated getFocusStyle, getFocusOutlineStyle, getInputFocusStyle, @@ -29,7 +29,7 @@ export { HighContrastSelector, HighContrastSelectorWhite, HighContrastSelectorBlack, - // eslint-disable-next-line deprecation/deprecation + // eslint-disable-next-line @typescript-eslint/no-deprecated EdgeChromiumHighContrastSelector, ScreenWidthMinSmall, ScreenWidthMinMedium, @@ -45,7 +45,7 @@ export { ScreenWidthMinUhfMobile, getScreenSelector, getHighContrastNoAdjustStyle, - // eslint-disable-next-line deprecation/deprecation + // eslint-disable-next-line @typescript-eslint/no-deprecated getEdgeChromiumNoHighContrastAdjustSelector, normalize, noWrap, diff --git a/packages/style-utilities/src/styles/CommonStyles.ts b/packages/style-utilities/src/styles/CommonStyles.ts index d584824e241b1f..b805a1bdeb2893 100644 --- a/packages/style-utilities/src/styles/CommonStyles.ts +++ b/packages/style-utilities/src/styles/CommonStyles.ts @@ -47,10 +47,10 @@ export function getHighContrastNoAdjustStyle(): IRawStyle { * The style which turns off high contrast adjustment in (only) Edge Chromium browser. * @deprecated Use `getHighContrastNoAdjustStyle` */ -// eslint-disable-next-line deprecation/deprecation +// eslint-disable-next-line @typescript-eslint/no-deprecated export function getEdgeChromiumNoHighContrastAdjustSelector(): { [EdgeChromiumHighContrastSelector]: IRawStyle } { return { - // eslint-disable-next-line deprecation/deprecation + // eslint-disable-next-line @typescript-eslint/no-deprecated [EdgeChromiumHighContrastSelector]: { forcedColorAdjust: 'none', MsHighContrastAdjust: 'none', diff --git a/packages/style-utilities/src/utilities/icons.ts b/packages/style-utilities/src/utilities/icons.ts index 9c454f89215a39..56d11d014dc5e2 100644 --- a/packages/style-utilities/src/utilities/icons.ts +++ b/packages/style-utilities/src/utilities/icons.ts @@ -194,7 +194,7 @@ export function getIcon(name?: string): IIconRecord | undefined { } } } else { - // eslint-disable-next-line deprecation/deprecation + // eslint-disable-next-line @typescript-eslint/no-deprecated if (!options.disableWarnings && options.warnOnMissingIcons) { warn( `The icon "${name}" was used but not registered. See https://github.com/microsoft/fluentui/wiki/Using-icons for more information.`, diff --git a/packages/theme-samples/CHANGELOG.json b/packages/theme-samples/CHANGELOG.json index 694a5edcd67cdf..ff0fa6af1a1f81 100644 --- a/packages/theme-samples/CHANGELOG.json +++ b/packages/theme-samples/CHANGELOG.json @@ -1,6 +1,21 @@ { "name": "@fluentui/theme-samples", "entries": [ + { + "date": "Fri, 17 Jan 2025 07:21:32 GMT", + "tag": "@fluentui/theme-samples_v8.7.196", + "version": "8.7.196", + "comments": { + "patch": [ + { + "author": "beachball", + "package": "@fluentui/theme-samples", + "comment": "Bump @fluentui/react to v8.122.7", + "commit": "baf887d95f91874c814a7cae749c20e797f828be" + } + ] + } + }, { "date": "Mon, 13 Jan 2025 07:21:23 GMT", "tag": "@fluentui/theme-samples_v8.7.195", diff --git a/packages/theme-samples/CHANGELOG.md b/packages/theme-samples/CHANGELOG.md index e21be703fbb89f..6ed21c779e917d 100644 --- a/packages/theme-samples/CHANGELOG.md +++ b/packages/theme-samples/CHANGELOG.md @@ -1,9 +1,18 @@ # Change Log - @fluentui/theme-samples -This log was last generated on Mon, 13 Jan 2025 07:21:23 GMT and should not be manually modified. +This log was last generated on Fri, 17 Jan 2025 07:21:32 GMT and should not be manually modified. +## [8.7.196](https://github.com/microsoft/fluentui/tree/@fluentui/theme-samples_v8.7.196) + +Fri, 17 Jan 2025 07:21:32 GMT +[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/theme-samples_v8.7.195..@fluentui/theme-samples_v8.7.196) + +### Patches + +- Bump @fluentui/react to v8.122.7 ([commit](https://github.com/microsoft/fluentui/commit/baf887d95f91874c814a7cae749c20e797f828be) by beachball) + ## [8.7.195](https://github.com/microsoft/fluentui/tree/@fluentui/theme-samples_v8.7.195) Mon, 13 Jan 2025 07:21:23 GMT diff --git a/packages/theme-samples/package.json b/packages/theme-samples/package.json index c89e224f28e127..d46cde211cdeaa 100644 --- a/packages/theme-samples/package.json +++ b/packages/theme-samples/package.json @@ -1,6 +1,6 @@ { "name": "@fluentui/theme-samples", - "version": "8.7.195", + "version": "8.7.196", "description": "Sample themes for use with Fabric components.", "main": "lib-commonjs/index.js", "module": "lib/index.js", @@ -26,7 +26,7 @@ "@fluentui/scripts-webpack": "*" }, "dependencies": { - "@fluentui/react": "^8.122.6", + "@fluentui/react": "^8.122.7", "@fluentui/set-version": "^8.2.23", "@fluentui/scheme-utilities": "^8.3.65", "tslib": "^2.1.0" diff --git a/packages/theme/src/utilities/makeSemanticColors.ts b/packages/theme/src/utilities/makeSemanticColors.ts index b9924ec0d7afad..f4d9f57d45c782 100644 --- a/packages/theme/src/utilities/makeSemanticColors.ts +++ b/packages/theme/src/utilities/makeSemanticColors.ts @@ -132,7 +132,7 @@ export function getSemanticColors>( result.listItemBackgroundChecked = neutralLight; result.listHeaderBackgroundPressed = neutralLight; result.menuItemBackgroundPressed = neutralLight; - // eslint-disable-next-line deprecation/deprecation + // eslint-disable-next-line @typescript-eslint/no-deprecated result.menuItemBackgroundChecked = neutralLight; } if (neutralLighter) { @@ -227,12 +227,12 @@ function _fixDeprecatedSlots(s: ISemanticColors, depComments: boolean): ISemanti dep = ' /* @deprecated */'; } - /* eslint-disable deprecation/deprecation */ + /* eslint-disable @typescript-eslint/no-deprecated */ s.listTextColor = s.listText + dep; s.menuItemBackgroundChecked += dep; s.warningHighlight += dep; s.warningText = s.messageText + dep; s.successText += dep; - /* eslint-enable deprecation/deprecation */ + /* eslint-enable @typescript-eslint/no-deprecated */ return s; } diff --git a/packages/utilities/src/BaseComponent.test.tsx b/packages/utilities/src/BaseComponent.test.tsx index 3849bdbabc2cdd..8a3a69903db364 100644 --- a/packages/utilities/src/BaseComponent.test.tsx +++ b/packages/utilities/src/BaseComponent.test.tsx @@ -5,12 +5,12 @@ import { BaseComponent } from './BaseComponent'; describe('BaseComponent', () => { it('can resolve refs', () => { - // eslint-disable-next-line deprecation/deprecation + // eslint-disable-next-line @typescript-eslint/no-deprecated class Foo extends BaseComponent<{}, {}> { public root!: HTMLElement; public render(): JSX.Element { - // eslint-disable-next-line deprecation/deprecation + // eslint-disable-next-line @typescript-eslint/no-deprecated return
; } } diff --git a/packages/utilities/src/BaseComponent.ts b/packages/utilities/src/BaseComponent.ts index fe3cc82b45ac72..2788bf3977e872 100644 --- a/packages/utilities/src/BaseComponent.ts +++ b/packages/utilities/src/BaseComponent.ts @@ -49,7 +49,7 @@ export class BaseComponent, prototype: Object, methodNames: string[]): void { for (let i = 0, len = methodNames.length; i < len; i++) { _makeSafe(obj, prototype, methodNames[i]); } } -// eslint-disable-next-line deprecation/deprecation +// eslint-disable-next-line @typescript-eslint/no-deprecated function _makeSafe(obj: BaseComponent<{}, {}>, prototype: Object, methodName: string): void { /* eslint-disable @typescript-eslint/no-explicit-any */ let classMethod = (obj as any)[methodName]; diff --git a/packages/utilities/src/EventGroup.test.ts b/packages/utilities/src/EventGroup.test.ts index 69fbe727767cbc..3c6638edf1ce34 100644 --- a/packages/utilities/src/EventGroup.test.ts +++ b/packages/utilities/src/EventGroup.test.ts @@ -13,7 +13,7 @@ describe('EventGroup', () => { let ev = document.createEvent('HTMLEvents'); eg.on(sourceButton, 'click', parent.cb); - // eslint-disable-next-line deprecation/deprecation + // eslint-disable-next-line @typescript-eslint/no-deprecated ev.initEvent('click', true, true); sourceButton.dispatchEvent(ev); @@ -150,7 +150,7 @@ describe('EventGroup', () => { try { let ev = document.createEvent('HTMLEvents'); - // eslint-disable-next-line deprecation/deprecation + // eslint-disable-next-line @typescript-eslint/no-deprecated ev.initEvent('click', true, true); grandChildButton.dispatchEvent(ev); diff --git a/packages/utilities/src/EventGroup.ts b/packages/utilities/src/EventGroup.ts index 3ea6e16961a466..528307a3cba0db 100644 --- a/packages/utilities/src/EventGroup.ts +++ b/packages/utilities/src/EventGroup.ts @@ -76,7 +76,7 @@ export class EventGroup { if (typeof theDoc !== 'undefined' && theDoc.createEvent) { let ev = theDoc.createEvent('HTMLEvents'); - // eslint-disable-next-line deprecation/deprecation + // eslint-disable-next-line @typescript-eslint/no-deprecated ev.initEvent(eventName, bubbleEvent || false, true); assign(ev, eventArgs); diff --git a/packages/utilities/src/customizations/Customizer.test.tsx b/packages/utilities/src/customizations/Customizer.test.tsx index 2c2415f50aeef6..7e6c25d3d4258b 100644 --- a/packages/utilities/src/customizations/Customizer.test.tsx +++ b/packages/utilities/src/customizations/Customizer.test.tsx @@ -1,4 +1,4 @@ -/* eslint-disable deprecation/deprecation */ +/* eslint-disable @typescript-eslint/no-deprecated */ import * as React from 'react'; import { customizable } from './customizable'; import { Customizer } from './Customizer'; diff --git a/packages/utilities/src/customizations/customizable.test.tsx b/packages/utilities/src/customizations/customizable.test.tsx index 684f74ef09c837..56993647461b57 100644 --- a/packages/utilities/src/customizations/customizable.test.tsx +++ b/packages/utilities/src/customizations/customizable.test.tsx @@ -1,4 +1,4 @@ -/* eslint-disable deprecation/deprecation */ +/* eslint-disable @typescript-eslint/no-deprecated */ import * as React from 'react'; import * as ReactDOM from 'react-dom/server'; import { mount } from 'enzyme'; diff --git a/packages/utilities/src/dom.ts b/packages/utilities/src/dom.ts index 8738039b4d6ff5..8dd977bc331fa2 100644 --- a/packages/utilities/src/dom.ts +++ b/packages/utilities/src/dom.ts @@ -15,7 +15,7 @@ export { isVirtualElement } from './dom/isVirtualElement'; export { on } from './dom/on'; export { portalContainsElement } from './dom/portalContainsElement'; export { - // eslint-disable-next-line deprecation/deprecation + // eslint-disable-next-line @typescript-eslint/no-deprecated raiseClick, } from './dom/raiseClick'; export { DATA_PORTAL_ATTRIBUTE, setPortalAttribute } from './dom/setPortalAttribute'; diff --git a/packages/utilities/src/dom/canUseDOM.ts b/packages/utilities/src/dom/canUseDOM.ts index e7289568b5a152..2481a308eccb07 100644 --- a/packages/utilities/src/dom/canUseDOM.ts +++ b/packages/utilities/src/dom/canUseDOM.ts @@ -6,7 +6,7 @@ export function canUseDOM(): boolean { // eslint-disable-next-line no-restricted-globals typeof window !== 'undefined' && !!( - // eslint-disable-next-line no-restricted-globals, deprecation/deprecation + // eslint-disable-next-line no-restricted-globals, @typescript-eslint/no-deprecated (window.document && window.document.createElement) ) ); diff --git a/packages/utilities/src/dom/raiseClick.ts b/packages/utilities/src/dom/raiseClick.ts index fecf98ccca3b71..f9452a88f4e9f3 100644 --- a/packages/utilities/src/dom/raiseClick.ts +++ b/packages/utilities/src/dom/raiseClick.ts @@ -6,7 +6,7 @@ import { getDocument } from './getDocument'; export function raiseClick(target: Element, doc?: Document): void { const theDoc = doc ?? getDocument()!; const event = createNewEvent('MouseEvents', theDoc); - // eslint-disable-next-line deprecation/deprecation + // eslint-disable-next-line @typescript-eslint/no-deprecated event.initEvent('click', true, true); target.dispatchEvent(event); } @@ -19,7 +19,7 @@ function createNewEvent(eventName: string, doc: Document): Event { } else { // IE event = doc.createEvent('Event'); - // eslint-disable-next-line deprecation/deprecation + // eslint-disable-next-line @typescript-eslint/no-deprecated event.initEvent(eventName, true, true); } return event; diff --git a/packages/utilities/src/index.ts b/packages/utilities/src/index.ts index bc7e47059ddb0c..6e99fd0ab3c63f 100644 --- a/packages/utilities/src/index.ts +++ b/packages/utilities/src/index.ts @@ -2,7 +2,7 @@ export { Async } from './Async'; export type { ICancelable } from './Async'; export { AutoScroll } from './AutoScroll'; export { - // eslint-disable-next-line deprecation/deprecation + // eslint-disable-next-line @typescript-eslint/no-deprecated BaseComponent, nullRender, } from './BaseComponent'; @@ -17,13 +17,13 @@ export type { IPerfData, IPerfMeasurement, IPerfSummary } from './FabricPerforma export { GlobalSettings } from './GlobalSettings'; export type { IChangeDescription, IChangeEventCallback } from './GlobalSettings'; export type { - // eslint-disable-next-line deprecation/deprecation + // eslint-disable-next-line @typescript-eslint/no-deprecated IClassNames, } from './IClassNames'; export type { IComponentAs, IComponentAsProps } from './IComponentAs'; export type { IDisposable } from './IDisposable'; export type { - // eslint-disable-next-line deprecation/deprecation + // eslint-disable-next-line @typescript-eslint/no-deprecated IPoint, Point, } from './Point'; @@ -62,13 +62,13 @@ export type { ICustomizations, ISettings, ISettingsFunction, - // eslint-disable-next-line deprecation/deprecation + // eslint-disable-next-line @typescript-eslint/no-deprecated Settings, - // eslint-disable-next-line deprecation/deprecation + // eslint-disable-next-line @typescript-eslint/no-deprecated SettingsFunction, } from './customizations/Customizations'; export { - // eslint-disable-next-line deprecation/deprecation + // eslint-disable-next-line @typescript-eslint/no-deprecated Customizer, } from './customizations/Customizer'; export type { ICustomizerProps } from './customizations/Customizer.types'; @@ -95,7 +95,7 @@ export { isVirtualElement, on, portalContainsElement, - // eslint-disable-next-line deprecation/deprecation + // eslint-disable-next-line @typescript-eslint/no-deprecated raiseClick, setPortalAttribute, setVirtualParent, @@ -127,7 +127,7 @@ export { hoistMethods, unhoistMethods } from './hoist'; export { hoistStatics } from './hoistStatics'; export { initializeComponentRef } from './initializeComponentRef'; export { - // eslint-disable-next-line deprecation/deprecation + // eslint-disable-next-line @typescript-eslint/no-deprecated initializeFocusRects, } from './initializeFocusRects'; export { FocusRectsProvider } from './FocusRectsProvider'; @@ -138,7 +138,7 @@ export { getInitials } from './initials'; export { addDirectionalKeyCode, isDirectionalKeyCode, removeDirectionalKeyCode } from './keyboard'; export { getLanguage, - // eslint-disable-next-line deprecation/deprecation + // eslint-disable-next-line @typescript-eslint/no-deprecated setLanguage, } from './language'; export { calculatePrecision, fitContentToBounds, getDistanceBetweenPoints, precisionRound } from './math'; @@ -163,7 +163,7 @@ export { getNativeProps, htmlElementProperties, iframeProperties, - // eslint-disable-next-line deprecation/deprecation + // eslint-disable-next-line @typescript-eslint/no-deprecated imageProperties, imgProperties, inputProperties, @@ -181,9 +181,9 @@ export { } from './properties'; export { composeRenderFunction } from './renderFunction/composeRenderFunction'; export { - // eslint-disable-next-line deprecation/deprecation + // eslint-disable-next-line @typescript-eslint/no-deprecated getResourceUrl, - // eslint-disable-next-line deprecation/deprecation + // eslint-disable-next-line @typescript-eslint/no-deprecated setBaseUrl, } from './resources'; export { getRTL, getRTLSafeKeyCode, setRTL } from './rtl'; @@ -228,14 +228,14 @@ export { isIE11 } from './ie11Detector'; export { getPropsWithDefaults } from './getPropsWithDefaults'; export { setFocusVisibility, IsFocusVisibleClassName } from './setFocusVisibility'; export { canUseDOM } from './dom/canUseDOM'; -// eslint-disable-next-line deprecation/deprecation +// eslint-disable-next-line @typescript-eslint/no-deprecated export { setSSR } from './dom/setSSR'; export { createMergedRef } from './createMergedRef'; export { useIsomorphicLayoutEffect } from './useIsomorphicLayoutEffect'; import './version'; -// eslint-disable-next-line deprecation/deprecation +// eslint-disable-next-line @typescript-eslint/no-deprecated export type { IStyleFunctionOrObject, Omit } from '@fluentui/merge-styles'; export { diff --git a/packages/utilities/src/initializeFocusRects.test.ts b/packages/utilities/src/initializeFocusRects.test.ts index 42969ad28137ce..9f1fdab3b09ffc 100644 --- a/packages/utilities/src/initializeFocusRects.test.ts +++ b/packages/utilities/src/initializeFocusRects.test.ts @@ -38,7 +38,7 @@ describe('initializeFocusRects', () => { beforeEach(() => { classNames = []; - // eslint-disable-next-line deprecation/deprecation + // eslint-disable-next-line @typescript-eslint/no-deprecated initializeFocusRects(mockWindow as Window); }); diff --git a/packages/utilities/src/initializeFocusRects.ts b/packages/utilities/src/initializeFocusRects.ts index 30f4075886f52b..4fe8c9de82f587 100644 --- a/packages/utilities/src/initializeFocusRects.ts +++ b/packages/utilities/src/initializeFocusRects.ts @@ -50,6 +50,6 @@ function _onPointerDown(ev: PointerEvent): void { } function _onKeyDown(ev: KeyboardEvent): void { - // eslint-disable-next-line deprecation/deprecation + // eslint-disable-next-line @typescript-eslint/no-deprecated isDirectionalKeyCode(ev.which) && setFocusVisibility(true, ev.target as Element); } diff --git a/packages/utilities/src/math.ts b/packages/utilities/src/math.ts index ef34f23734b395..576c53474cfce8 100644 --- a/packages/utilities/src/math.ts +++ b/packages/utilities/src/math.ts @@ -6,13 +6,13 @@ import type { ISize } from './ISize'; * * @public */ -/* eslint-disable deprecation/deprecation */ +/* eslint-disable @typescript-eslint/no-deprecated */ export function getDistanceBetweenPoints(point1: Point, point2: Point): number { const left1 = point1.left || point1.x || 0; const top1 = point1.top || point1.y || 0; const left2 = point2.left || point2.x || 0; const top2 = point2.top || point2.y || 0; - /* eslint-enable deprecation/deprecation */ + /* eslint-enable @typescript-eslint/no-deprecated */ let distance = Math.sqrt(Math.pow(left1 - left2, 2) + Math.pow(top1 - top2, 2)); diff --git a/packages/utilities/src/styled.test.tsx b/packages/utilities/src/styled.test.tsx index 5c6464ba1c8f74..699438500d6b38 100644 --- a/packages/utilities/src/styled.test.tsx +++ b/packages/utilities/src/styled.test.tsx @@ -1,4 +1,4 @@ -/* eslint-disable deprecation/deprecation */ +/* eslint-disable @typescript-eslint/no-deprecated */ import * as React from 'react'; import * as ReactTestUtils from 'react-dom/test-utils'; import { styled } from './styled'; diff --git a/packages/utilities/src/useFocusRects.ts b/packages/utilities/src/useFocusRects.ts index e1fad6a9a085fb..b302c3e032cb86 100644 --- a/packages/utilities/src/useFocusRects.ts +++ b/packages/utilities/src/useFocusRects.ts @@ -180,14 +180,14 @@ function _onPointerDown(ev: PointerEvent, registeredProviders?: React.RefObject< // This works because `classList.add` is smart and will not duplicate a classname that already exists on the classList // when focus visibility is turned on. function _onKeyDown(ev: KeyboardEvent, registeredProviders?: React.RefObject[]): void { - // eslint-disable-next-line deprecation/deprecation + // eslint-disable-next-line @typescript-eslint/no-deprecated if (isDirectionalKeyCode(ev.which)) { setFocusVisibility(true, ev.target as Element, registeredProviders); } } function _onKeyUp(ev: KeyboardEvent, registeredProviders?: React.RefObject[]): void { - // eslint-disable-next-line deprecation/deprecation + // eslint-disable-next-line @typescript-eslint/no-deprecated if (isDirectionalKeyCode(ev.which)) { setFocusVisibility(true, ev.target as Element, registeredProviders); } diff --git a/packages/web-components/CHANGELOG.json b/packages/web-components/CHANGELOG.json index 910eaf1123eb5e..862108c9a70571 100644 --- a/packages/web-components/CHANGELOG.json +++ b/packages/web-components/CHANGELOG.json @@ -1,6 +1,35 @@ { "name": "@fluentui/web-components", "entries": [ + { + "date": "Fri, 17 Jan 2025 04:07:40 GMT", + "tag": "@fluentui/web-components_v3.0.0-beta.77", + "version": "3.0.0-beta.77", + "comments": { + "prerelease": [ + { + "author": "rupertdavid@microsoft.com", + "package": "@fluentui/web-components", + "commit": "00458f3bbe3f12c0cef556f8d8fd564ffa66983c", + "comment": "fix: revert logical properties in spinner to support rtl\"" + }, + { + "author": "rupertdavid@microsoft.com", + "package": "@fluentui/web-components", + "commit": "1e110d6492d33ca8959aaddc35e21cbd8992706b", + "comment": "fix: update disabled switch styles to GrayText for high-contrast mode" + } + ], + "none": [ + { + "author": "863023+radium-v@users.noreply.github.com", + "package": "@fluentui/web-components", + "commit": "e7e2987a4b0c8c36984dc9732937e2e58fb8fb35", + "comment": "build tokens package before running e2e tests" + } + ] + } + }, { "date": "Thu, 09 Jan 2025 04:07:00 GMT", "tag": "@fluentui/web-components_v3.0.0-beta.76", diff --git a/packages/web-components/CHANGELOG.md b/packages/web-components/CHANGELOG.md index baea4c5c33bbe3..470c51a4a5c90c 100644 --- a/packages/web-components/CHANGELOG.md +++ b/packages/web-components/CHANGELOG.md @@ -1,9 +1,19 @@ # Change Log - @fluentui/web-components -This log was last generated on Thu, 09 Jan 2025 04:07:00 GMT and should not be manually modified. +This log was last generated on Fri, 17 Jan 2025 04:07:40 GMT and should not be manually modified. +## [3.0.0-beta.77](https://github.com/microsoft/fluentui/tree/@fluentui/web-components_v3.0.0-beta.77) + +Fri, 17 Jan 2025 04:07:40 GMT +[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/web-components_v3.0.0-beta.76..@fluentui/web-components_v3.0.0-beta.77) + +### Changes + +- fix: revert logical properties in spinner to support rtl" ([PR #33654](https://github.com/microsoft/fluentui/pull/33654) by rupertdavid@microsoft.com) +- fix: update disabled switch styles to GrayText for high-contrast mode ([PR #33637](https://github.com/microsoft/fluentui/pull/33637) by rupertdavid@microsoft.com) + ## [3.0.0-beta.76](https://github.com/microsoft/fluentui/tree/@fluentui/web-components_v3.0.0-beta.76) Thu, 09 Jan 2025 04:07:00 GMT diff --git a/packages/web-components/package.json b/packages/web-components/package.json index 4b79588c2a395e..4328ee523c54d5 100644 --- a/packages/web-components/package.json +++ b/packages/web-components/package.json @@ -1,7 +1,7 @@ { "name": "@fluentui/web-components", "description": "A library of Fluent Web Components", - "version": "3.0.0-beta.76", + "version": "3.0.0-beta.77", "author": { "name": "Microsoft", "url": "https://discord.gg/FcSNfg4" diff --git a/packages/webpack-utilities/.eslintrc.json b/packages/webpack-utilities/.eslintrc.json index 9f62e5a326378a..a563e7abd8369c 100644 --- a/packages/webpack-utilities/.eslintrc.json +++ b/packages/webpack-utilities/.eslintrc.json @@ -3,7 +3,14 @@ "root": true, "rules": { "@typescript-eslint/no-explicit-any": "off", - "deprecation/deprecation": "off", "prefer-arrow-callback": "off" - } + }, + "overrides": [ + { + "files": ["**/*.{ts,tsx}"], + "rules": { + "@typescript-eslint/no-deprecated": "off" + } + } + ] } diff --git a/scripts/executors/src/generate-ui.ts b/scripts/executors/src/generate-ui.ts index d33049b7943ea6..f5edaf8adb0488 100644 --- a/scripts/executors/src/generate-ui.ts +++ b/scripts/executors/src/generate-ui.ts @@ -29,7 +29,7 @@ main() async function main() { const graph = await createProjectGraphAsync(); const projects = readProjectsConfigurationFromProjectGraph(graph); - // eslint-disable-next-line deprecation/deprecation + // eslint-disable-next-line @typescript-eslint/no-deprecated const nxJson = readNxJson(); if (!nxJson) { throw new Error('nx.json not found'); diff --git a/scripts/tasks/src/index.ts b/scripts/tasks/src/index.ts index b8525731e60e8a..51f89644e2127a 100644 --- a/scripts/tasks/src/index.ts +++ b/scripts/tasks/src/index.ts @@ -9,13 +9,11 @@ export { basicWebpackConfig, basicWebpackServeConfig, chain, - // eslint-disable-next-line deprecation/deprecation cleanTask, clearCache, condition, copyInstructions, copyInstructionsTask, - // eslint-disable-next-line deprecation/deprecation copyTask, createStylesOverlay, createTarTask, @@ -36,11 +34,8 @@ export { prettierCheckTask, prettierTask, resetResolvePaths, - // eslint-disable-next-line deprecation/deprecation resolve, - // eslint-disable-next-line deprecation/deprecation resolveCwd, - // eslint-disable-next-line deprecation/deprecation sassTask, series, spawn, diff --git a/syncpack.config.js b/syncpack.config.js index 4618b062fcb92e..0e3e0b1fcdc4a4 100644 --- a/syncpack.config.js +++ b/syncpack.config.js @@ -47,7 +47,6 @@ const config = { 'eslint-config-airbnb', 'eslint-config-prettier', 'eslint-import-resolver-typescript', - 'eslint-plugin-deprecation', 'eslint-plugin-import', 'eslint-plugin-jest', 'eslint-plugin-jsx-a11y', diff --git a/yarn.lock b/yarn.lock index e52755aa7c44f5..ccea6816c1add4 100644 --- a/yarn.lock +++ b/yarn.lock @@ -6188,7 +6188,7 @@ "@typescript-eslint/types" "8.8.1" "@typescript-eslint/typescript-estree" "8.8.1" -"@typescript-eslint/utils@^7.0.0", "@typescript-eslint/utils@^7.9.0": +"@typescript-eslint/utils@^7.9.0": version "7.18.0" resolved "https://registry.yarnpkg.com/@typescript-eslint/utils/-/utils-7.18.0.tgz#bca01cde77f95fc6a8d5b0dbcbfb3d6ca4be451f" integrity sha512-kK0/rNa2j74XuHVcoCZxdFBMF+aq/vH83CXAOHieC+2Gis4mF8jJXT5eAfyD3K0sAxtPuwxaIOIOvhwzVDt/kw== @@ -10886,15 +10886,6 @@ eslint-module-utils@^2.7.4, eslint-module-utils@^2.8.0: dependencies: debug "^3.2.7" -eslint-plugin-deprecation@3.0.0, eslint-plugin-deprecation@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/eslint-plugin-deprecation/-/eslint-plugin-deprecation-3.0.0.tgz#c0b6bce543c2a01f231d39a1c54fdfebf3560d48" - integrity sha512-JuVLdNg/uf0Adjg2tpTyYoYaMbwQNn/c78P1HcccokvhtRphgnRjZDKmhlxbxYptppex03zO76f97DD/yQHv7A== - dependencies: - "@typescript-eslint/utils" "^7.0.0" - ts-api-utils "^1.3.0" - tslib "^2.3.1" - eslint-plugin-es@4.1.0: version "4.1.0" resolved "https://registry.yarnpkg.com/eslint-plugin-es/-/eslint-plugin-es-4.1.0.tgz#f0822f0c18a535a97c3e714e89f88586a7641ec9"