From 28aada91c2847605c4d42303f7b308862e75d80c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=B4mulo=20Penido?= Date: Tue, 19 Dec 2023 16:55:23 -0300 Subject: [PATCH 01/23] fix: correctly use Dropzone's className prop (#2950) --- src/Dropzone/index.jsx | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/Dropzone/index.jsx b/src/Dropzone/index.jsx index c0f26b692a..8712f54301 100644 --- a/src/Dropzone/index.jsx +++ b/src/Dropzone/index.jsx @@ -178,8 +178,7 @@ function Dropzone({
0 || isDragReject, 'pgn__dropzone-active': isDragActive && !isDragReject, }), From f37c7ec89536ea65c54fb5b055696dcca1a8e4bf Mon Sep 17 00:00:00 2001 From: Brian Smith <112954497+brian-smith-tcril@users.noreply.github.com> Date: Tue, 19 Dec 2023 16:06:46 -0500 Subject: [PATCH 02/23] chore(deps-dev): update jest-dom (#2868) --- package-lock.json | 355 +++++++++++++++--- package.json | 4 +- .../tests/SelectableBoxSet.test.jsx | 2 +- 3 files changed, 315 insertions(+), 46 deletions(-) diff --git a/package-lock.json b/package-lock.json index 229d700538..fb4108e6fe 100644 --- a/package-lock.json +++ b/package-lock.json @@ -65,11 +65,11 @@ "@formatjs/cli": "^5.0.2", "@semantic-release/changelog": "^6.0.1", "@semantic-release/git": "^10.0.1", - "@testing-library/jest-dom": "^5.16.3", + "@testing-library/jest-dom": "^6.1.4", "@testing-library/react": "^12.1.4", "@testing-library/react-hooks": "^8.0.1", "@testing-library/user-event": "^13.5.0", - "@types/jest": "^27.5.0", + "@types/jest": "^29.5.10", "@types/react": "17.0.0", "@types/react-dom": "17.0.11", "@types/react-test-renderer": "^18.0.0", @@ -178,9 +178,10 @@ } }, "node_modules/@adobe/css-tools": { - "version": "4.2.0", - "dev": true, - "license": "MIT" + "version": "4.3.1", + "resolved": "https://registry.npmjs.org/@adobe/css-tools/-/css-tools-4.3.1.tgz", + "integrity": "sha512-/62yikz7NLScCGAAST5SHdnjaDJQBDq0M2muyRTpf2VQhw6StBg2ALiu73zSJQ4fMVLA+0uBhBHAle7Wg+2kSg==", + "dev": true }, "node_modules/@algolia/autocomplete-core": { "version": "1.7.4", @@ -7460,13 +7461,13 @@ } }, "node_modules/@testing-library/jest-dom": { - "version": "5.16.5", + "version": "6.1.4", + "resolved": "https://registry.npmjs.org/@testing-library/jest-dom/-/jest-dom-6.1.4.tgz", + "integrity": "sha512-wpoYrCYwSZ5/AxcrjLxJmCU6I5QAJXslEeSiMQqaWmP2Kzpd1LvF/qxmAIW2qposULGWq2gw30GgVNFLSc2Jnw==", "dev": true, - "license": "MIT", "dependencies": { - "@adobe/css-tools": "^4.0.1", + "@adobe/css-tools": "^4.3.1", "@babel/runtime": "^7.9.2", - "@types/testing-library__jest-dom": "^5.9.1", "aria-query": "^5.0.0", "chalk": "^3.0.0", "css.escape": "^1.5.1", @@ -7475,9 +7476,29 @@ "redent": "^3.0.0" }, "engines": { - "node": ">=8", + "node": ">=14", "npm": ">=6", "yarn": ">=1" + }, + "peerDependencies": { + "@jest/globals": ">= 28", + "@types/jest": ">= 28", + "jest": ">= 28", + "vitest": ">= 0.32" + }, + "peerDependenciesMeta": { + "@jest/globals": { + "optional": true + }, + "@types/jest": { + "optional": true + }, + "jest": { + "optional": true + }, + "vitest": { + "optional": true + } } }, "node_modules/@testing-library/jest-dom/node_modules/ansi-styles": { @@ -7916,12 +7937,163 @@ } }, "node_modules/@types/jest": { - "version": "27.5.2", + "version": "29.5.10", + "resolved": "https://registry.npmjs.org/@types/jest/-/jest-29.5.10.tgz", + "integrity": "sha512-tE4yxKEphEyxj9s4inideLHktW/x6DwesIwWZ9NN1FKf9zbJYsnhBoA9vrHA/IuIOKwPa5PcFBNV4lpMIOEzyQ==", + "dev": true, + "dependencies": { + "expect": "^29.0.0", + "pretty-format": "^29.0.0" + } + }, + "node_modules/@types/jest/node_modules/@jest/expect-utils": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/@jest/expect-utils/-/expect-utils-29.7.0.tgz", + "integrity": "sha512-GlsNBWiFQFCVi9QVSx7f5AgMeLxe9YCCs5PuP2O2LdjDAA8Jh9eX7lA1Jq/xdXw3Wb3hyvlFNfZIfcRetSzYcA==", + "dev": true, + "dependencies": { + "jest-get-type": "^29.6.3" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/@types/jest/node_modules/@jest/schemas": { + "version": "29.6.3", + "resolved": "https://registry.npmjs.org/@jest/schemas/-/schemas-29.6.3.tgz", + "integrity": "sha512-mo5j5X+jIZmJQveBKeS/clAueipV7KgiX1vMgCxam1RNYiqE1w62n0/tJJnHtjW8ZHcQco5gY85jA3mi0L+nSA==", + "dev": true, + "dependencies": { + "@sinclair/typebox": "^0.27.8" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/@types/jest/node_modules/@jest/types": { + "version": "29.6.3", + "resolved": "https://registry.npmjs.org/@jest/types/-/types-29.6.3.tgz", + "integrity": "sha512-u3UPsIilWKOM3F9CXtrG8LEJmNxwoCQC/XVj4IKYXvvpx7QIi/Kg1LI5uDmDpKlac62NUtX7eLjRh+jVZcLOzw==", + "dev": true, + "dependencies": { + "@jest/schemas": "^29.6.3", + "@types/istanbul-lib-coverage": "^2.0.0", + "@types/istanbul-reports": "^3.0.0", + "@types/node": "*", + "@types/yargs": "^17.0.8", + "chalk": "^4.0.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/@types/jest/node_modules/@sinclair/typebox": { + "version": "0.27.8", + "resolved": "https://registry.npmjs.org/@sinclair/typebox/-/typebox-0.27.8.tgz", + "integrity": "sha512-+Fj43pSMwJs4KRrH/938Uf+uAELIgVBmQzg/q1YG10djyfA3TnrU8N8XzqCh/okZdszqBQTZf96idMfE5lnwTA==", + "dev": true + }, + "node_modules/@types/jest/node_modules/ansi-styles": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-5.2.0.tgz", + "integrity": "sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA==", + "dev": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/@types/jest/node_modules/expect": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/expect/-/expect-29.7.0.tgz", + "integrity": "sha512-2Zks0hf1VLFYI1kbh0I5jP3KHHyCHpkfyHBzsSXRFgl/Bg9mWYfMW8oD+PdMPlEwy5HNsR9JutYy6pMeOh61nw==", + "dev": true, + "dependencies": { + "@jest/expect-utils": "^29.7.0", + "jest-get-type": "^29.6.3", + "jest-matcher-utils": "^29.7.0", + "jest-message-util": "^29.7.0", + "jest-util": "^29.7.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/@types/jest/node_modules/jest-get-type": { + "version": "29.6.3", + "resolved": "https://registry.npmjs.org/jest-get-type/-/jest-get-type-29.6.3.tgz", + "integrity": "sha512-zrteXnqYxfQh7l5FHyL38jL39di8H8rHoecLH3JNxH3BwOrBsNeabdap5e0I23lD4HHI8W5VFBZqG4Eaq5LNcw==", + "dev": true, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/@types/jest/node_modules/jest-message-util": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-message-util/-/jest-message-util-29.7.0.tgz", + "integrity": "sha512-GBEV4GRADeP+qtB2+6u61stea8mGcOT4mCtrYISZwfu9/ISHFJ/5zOMXYbpBE9RsS5+Gb63DW4FgmnKJ79Kf6w==", + "dev": true, + "dependencies": { + "@babel/code-frame": "^7.12.13", + "@jest/types": "^29.6.3", + "@types/stack-utils": "^2.0.0", + "chalk": "^4.0.0", + "graceful-fs": "^4.2.9", + "micromatch": "^4.0.4", + "pretty-format": "^29.7.0", + "slash": "^3.0.0", + "stack-utils": "^2.0.3" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/@types/jest/node_modules/jest-util": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-util/-/jest-util-29.7.0.tgz", + "integrity": "sha512-z6EbKajIpqGKU56y5KBUgy1dt1ihhQJgWzUlZHArA/+X2ad7Cb5iF+AK1EWVL/Bo7Rz9uurpqw6SiBCefUbCGA==", + "dev": true, + "dependencies": { + "@jest/types": "^29.6.3", + "@types/node": "*", + "chalk": "^4.0.0", + "ci-info": "^3.2.0", + "graceful-fs": "^4.2.9", + "picomatch": "^2.2.3" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/@types/jest/node_modules/pretty-format": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-29.7.0.tgz", + "integrity": "sha512-Pdlw/oPxN+aXdmM9R00JVC9WVFoCLTKJvDVLgmJ+qAffBMxsV85l/Lu7sNx4zSzPyoL2euImuEwHhOXdEgNFZQ==", "dev": true, - "license": "MIT", "dependencies": { - "jest-matcher-utils": "^27.0.0", - "pretty-format": "^27.0.0" + "@jest/schemas": "^29.6.3", + "ansi-styles": "^5.0.0", + "react-is": "^18.0.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/@types/jest/node_modules/react-is": { + "version": "18.2.0", + "resolved": "https://registry.npmjs.org/react-is/-/react-is-18.2.0.tgz", + "integrity": "sha512-xWGDIW6x921xtzPkhiULtthJHoJvBbF3q26fzloPCK0hsvxtPVelvftw3zjbHWSkR2km9Z+4uxbDDK/6Zw9B8w==", + "dev": true + }, + "node_modules/@types/jest/node_modules/slash": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz", + "integrity": "sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==", + "dev": true, + "engines": { + "node": ">=8" } }, "node_modules/@types/js-cookie": { @@ -8215,14 +8387,6 @@ "@types/estree": "*" } }, - "node_modules/@types/testing-library__jest-dom": { - "version": "5.14.5", - "dev": true, - "license": "MIT", - "dependencies": { - "@types/jest": "*" - } - }, "node_modules/@types/tmp": { "version": "0.0.33", "license": "MIT" @@ -14953,11 +15117,12 @@ "license": "MIT" }, "node_modules/diff-sequences": { - "version": "27.5.1", + "version": "29.6.3", + "resolved": "https://registry.npmjs.org/diff-sequences/-/diff-sequences-29.6.3.tgz", + "integrity": "sha512-EjePK1srD3P08o2j4f0ExnylqRs5B9tJjcp9t1krH2qRi8CCdsYfwe9JgSLurFBWwq4uOlipzfk5fHNvwFKr8Q==", "dev": true, - "license": "MIT", "engines": { - "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, "node_modules/dir-glob": { @@ -22497,27 +22662,79 @@ } }, "node_modules/jest-diff": { - "version": "27.5.1", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-diff/-/jest-diff-29.7.0.tgz", + "integrity": "sha512-LMIgiIrhigmPrs03JHpxUh2yISK3vLFPkAodPeo0+BuF7wA2FoQbkEg1u8gBYBThncu7e1oEDUfIXVuTqLRUjw==", "dev": true, - "license": "MIT", "dependencies": { "chalk": "^4.0.0", - "diff-sequences": "^27.5.1", - "jest-get-type": "^27.5.1", - "pretty-format": "^27.5.1" + "diff-sequences": "^29.6.3", + "jest-get-type": "^29.6.3", + "pretty-format": "^29.7.0" }, "engines": { - "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-diff/node_modules/@jest/schemas": { + "version": "29.6.3", + "resolved": "https://registry.npmjs.org/@jest/schemas/-/schemas-29.6.3.tgz", + "integrity": "sha512-mo5j5X+jIZmJQveBKeS/clAueipV7KgiX1vMgCxam1RNYiqE1w62n0/tJJnHtjW8ZHcQco5gY85jA3mi0L+nSA==", + "dev": true, + "dependencies": { + "@sinclair/typebox": "^0.27.8" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-diff/node_modules/@sinclair/typebox": { + "version": "0.27.8", + "resolved": "https://registry.npmjs.org/@sinclair/typebox/-/typebox-0.27.8.tgz", + "integrity": "sha512-+Fj43pSMwJs4KRrH/938Uf+uAELIgVBmQzg/q1YG10djyfA3TnrU8N8XzqCh/okZdszqBQTZf96idMfE5lnwTA==", + "dev": true + }, + "node_modules/jest-diff/node_modules/ansi-styles": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-5.2.0.tgz", + "integrity": "sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA==", + "dev": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" } }, "node_modules/jest-diff/node_modules/jest-get-type": { - "version": "27.5.1", + "version": "29.6.3", + "resolved": "https://registry.npmjs.org/jest-get-type/-/jest-get-type-29.6.3.tgz", + "integrity": "sha512-zrteXnqYxfQh7l5FHyL38jL39di8H8rHoecLH3JNxH3BwOrBsNeabdap5e0I23lD4HHI8W5VFBZqG4Eaq5LNcw==", "dev": true, - "license": "MIT", "engines": { - "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, + "node_modules/jest-diff/node_modules/pretty-format": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-29.7.0.tgz", + "integrity": "sha512-Pdlw/oPxN+aXdmM9R00JVC9WVFoCLTKJvDVLgmJ+qAffBMxsV85l/Lu7sNx4zSzPyoL2euImuEwHhOXdEgNFZQ==", + "dev": true, + "dependencies": { + "@jest/schemas": "^29.6.3", + "ansi-styles": "^5.0.0", + "react-is": "^18.0.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-diff/node_modules/react-is": { + "version": "18.2.0", + "resolved": "https://registry.npmjs.org/react-is/-/react-is-18.2.0.tgz", + "integrity": "sha512-xWGDIW6x921xtzPkhiULtthJHoJvBbF3q26fzloPCK0hsvxtPVelvftw3zjbHWSkR2km9Z+4uxbDDK/6Zw9B8w==", + "dev": true + }, "node_modules/jest-docblock": { "version": "28.1.1", "dev": true, @@ -23761,27 +23978,79 @@ "license": "MIT" }, "node_modules/jest-matcher-utils": { - "version": "27.5.1", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-matcher-utils/-/jest-matcher-utils-29.7.0.tgz", + "integrity": "sha512-sBkD+Xi9DtcChsI3L3u0+N0opgPYnCRPtGcQYrgXmR+hmt/fYfWAL0xRXYU8eWOdfuLgBe0YCW3AFtnRLagq/g==", "dev": true, - "license": "MIT", "dependencies": { "chalk": "^4.0.0", - "jest-diff": "^27.5.1", - "jest-get-type": "^27.5.1", - "pretty-format": "^27.5.1" + "jest-diff": "^29.7.0", + "jest-get-type": "^29.6.3", + "pretty-format": "^29.7.0" }, "engines": { - "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-matcher-utils/node_modules/@jest/schemas": { + "version": "29.6.3", + "resolved": "https://registry.npmjs.org/@jest/schemas/-/schemas-29.6.3.tgz", + "integrity": "sha512-mo5j5X+jIZmJQveBKeS/clAueipV7KgiX1vMgCxam1RNYiqE1w62n0/tJJnHtjW8ZHcQco5gY85jA3mi0L+nSA==", + "dev": true, + "dependencies": { + "@sinclair/typebox": "^0.27.8" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-matcher-utils/node_modules/@sinclair/typebox": { + "version": "0.27.8", + "resolved": "https://registry.npmjs.org/@sinclair/typebox/-/typebox-0.27.8.tgz", + "integrity": "sha512-+Fj43pSMwJs4KRrH/938Uf+uAELIgVBmQzg/q1YG10djyfA3TnrU8N8XzqCh/okZdszqBQTZf96idMfE5lnwTA==", + "dev": true + }, + "node_modules/jest-matcher-utils/node_modules/ansi-styles": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-5.2.0.tgz", + "integrity": "sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA==", + "dev": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" } }, "node_modules/jest-matcher-utils/node_modules/jest-get-type": { - "version": "27.5.1", + "version": "29.6.3", + "resolved": "https://registry.npmjs.org/jest-get-type/-/jest-get-type-29.6.3.tgz", + "integrity": "sha512-zrteXnqYxfQh7l5FHyL38jL39di8H8rHoecLH3JNxH3BwOrBsNeabdap5e0I23lD4HHI8W5VFBZqG4Eaq5LNcw==", "dev": true, - "license": "MIT", "engines": { - "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, + "node_modules/jest-matcher-utils/node_modules/pretty-format": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-29.7.0.tgz", + "integrity": "sha512-Pdlw/oPxN+aXdmM9R00JVC9WVFoCLTKJvDVLgmJ+qAffBMxsV85l/Lu7sNx4zSzPyoL2euImuEwHhOXdEgNFZQ==", + "dev": true, + "dependencies": { + "@jest/schemas": "^29.6.3", + "ansi-styles": "^5.0.0", + "react-is": "^18.0.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-matcher-utils/node_modules/react-is": { + "version": "18.2.0", + "resolved": "https://registry.npmjs.org/react-is/-/react-is-18.2.0.tgz", + "integrity": "sha512-xWGDIW6x921xtzPkhiULtthJHoJvBbF3q26fzloPCK0hsvxtPVelvftw3zjbHWSkR2km9Z+4uxbDDK/6Zw9B8w==", + "dev": true + }, "node_modules/jest-message-util": { "version": "28.1.3", "dev": true, diff --git a/package.json b/package.json index 212b8ae98d..75aaac31e7 100644 --- a/package.json +++ b/package.json @@ -100,11 +100,11 @@ "@formatjs/cli": "^5.0.2", "@semantic-release/changelog": "^6.0.1", "@semantic-release/git": "^10.0.1", - "@testing-library/jest-dom": "^5.16.3", + "@testing-library/jest-dom": "^6.1.4", "@testing-library/react": "^12.1.4", "@testing-library/react-hooks": "^8.0.1", "@testing-library/user-event": "^13.5.0", - "@types/jest": "^27.5.0", + "@types/jest": "^29.5.10", "@types/react": "17.0.0", "@types/react-dom": "17.0.11", "@types/react-test-renderer": "^18.0.0", diff --git a/src/SelectableBox/tests/SelectableBoxSet.test.jsx b/src/SelectableBox/tests/SelectableBoxSet.test.jsx index 9ec8d4b625..9f2f318bf0 100644 --- a/src/SelectableBox/tests/SelectableBoxSet.test.jsx +++ b/src/SelectableBox/tests/SelectableBoxSet.test.jsx @@ -1,6 +1,6 @@ import React from 'react'; import { render, screen } from '@testing-library/react'; -import '@testing-library/jest-dom/extend-expect'; +import '@testing-library/jest-dom'; import userEvent from '@testing-library/user-event'; import SelectableBox from '..'; From 73059551995e3dc2ee5d329d939c60ab3af56e48 Mon Sep 17 00:00:00 2001 From: Brian Smith Date: Thu, 19 Oct 2023 12:58:03 -0400 Subject: [PATCH 03/23] fix: prevent #NaN color picker values --- src/ColorPicker/ColorPicker.test.jsx | 26 +++++++++- src/ColorPicker/index.jsx | 72 +++++++++++++++++++++------- 2 files changed, 80 insertions(+), 18 deletions(-) diff --git a/src/ColorPicker/ColorPicker.test.jsx b/src/ColorPicker/ColorPicker.test.jsx index a79a24126e..7f156f51ea 100644 --- a/src/ColorPicker/ColorPicker.test.jsx +++ b/src/ColorPicker/ColorPicker.test.jsx @@ -29,13 +29,35 @@ describe('picker works as expected', () => { const color = 'wassap'; const setColor = jest.fn(); it('validates hex color', async () => { - const { rerender } = render(); + render(); + await act(async () => { await userEvent.click(screen.getByRole('button')); }); + expect(screen.queryByTestId('hex-input').value).toEqual('#wassap'); expect(screen.queryByText('Colors must be in hexadecimal format.')).toBeInTheDocument(); - rerender(); + await act(async () => { + await userEvent.clear(screen.getByTestId('hex-input')); + await userEvent.paste(screen.getByTestId('hex-input'), '32116c'); + }); + expect(screen.queryByTestId('hex-input').value).toEqual('#32116c'); + expect(screen.queryByText('Colors must be in hexadecimal format.')).not.toBeInTheDocument(); + + await act(async () => { + await userEvent.clear(screen.getByTestId('hex-input')); + await userEvent.paste(screen.getByTestId('hex-input'), 'yuk'); + }); + + expect(screen.queryByTestId('hex-input').value).toEqual('#yuk'); + expect(screen.queryByText('Colors must be in hexadecimal format.')).toBeInTheDocument(); + + await act(async () => { + await userEvent.clear(screen.getByTestId('hex-input')); + await userEvent.paste(screen.getByTestId('hex-input'), '#fad'); + }); + + expect(screen.queryByTestId('hex-input').value).toEqual('#fad'); expect(screen.queryByText('Colors must be in hexadecimal format.')).not.toBeInTheDocument(); }); }); diff --git a/src/ColorPicker/index.jsx b/src/ColorPicker/index.jsx index 1cef1c336b..2877ec6f23 100644 --- a/src/ColorPicker/index.jsx +++ b/src/ColorPicker/index.jsx @@ -1,4 +1,4 @@ -import React, { useCallback, useEffect } from 'react'; +import React from 'react'; import PropTypes from 'prop-types'; import classNames from 'classnames'; import { HexColorPicker } from 'react-colorful'; @@ -15,24 +15,63 @@ function ColorPicker({ }) { const [isOpen, open, close] = useToggle(false); const [target, setTarget] = React.useState(null); - const [hexValid, setHexValid] = React.useState(true); - const validateHex = useCallback((input) => { + const colorIsValid = (colorToValidate) => { const hexRegex = /^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$/; - if (input.length > 1 && !input.startsWith('#')) { - setColor(`#${input}`); - } else { - setColor(input); + return hexRegex.test(colorToValidate); + }; + + const formatHexColorString = (colorString) => { + if (!colorString.startsWith('#')) { + return `#${colorString}`.slice(0, 7); + } + + return colorString.slice(0, 7); + }; + + const [hexValid, setHexValid] = React.useState(() => (color === '' || colorIsValid(formatHexColorString(color)))); + + const [hexColorString, setHexColorString] = React.useState(() => { + if (color === '') { + return ''; + } + + return formatHexColorString(color); + }); + const [colorToDisplay, setColorToDisplay] = React.useState(() => { + const formattedColor = formatHexColorString(color); + if (colorIsValid(formattedColor)) { + return formattedColor; } - if (input === '' || hexRegex.test(input) === true) { + + return '#fff'; + }); + + const setValidatedColor = (newColor) => { + if (newColor === '') { setHexValid(true); - } else { - setHexValid(false); + setColor(''); + setHexColorString(''); + setColorToDisplay('#fff'); + return; } - }, [setColor]); - // this is needed for when a user changes the color through the sliders - useEffect(() => validateHex(color), [validateHex, color]); + const formattedColor = formatHexColorString(newColor); + + if (colorIsValid(formattedColor)) { + setHexValid(true); + setColor(formattedColor); + setHexColorString(formattedColor); + setColorToDisplay(formattedColor); + return; + } + + setHexValid(false); + setHexColorString(formattedColor); + + // ensure the picker value stays in sync with the textbox + setColor(formattedColor); + }; return ( <> @@ -65,16 +104,17 @@ function ColorPicker({ className="pgn__color-modal rounded shadow" style={{ textAlign: 'start' }} > - +
Hex validateHex(e.target.value)} + value={hexColorString} + onChange={(e) => setValidatedColor(e.target.value)} data-testid="hex-input" + spellCheck="false" />
{!hexValid && ( From d32e6d01dc9c9458f2456ace6ebb8da173a43e88 Mon Sep 17 00:00:00 2001 From: Brian Smith <112954497+brian-smith-tcril@users.noreply.github.com> Date: Tue, 19 Dec 2023 16:29:42 -0500 Subject: [PATCH 04/23] fix: associate labels with autosuggest input (#2755) --- src/Form/FormAutosuggest.jsx | 16 ++- src/Form/form-autosuggest.mdx | 152 +++++++++++++----------- src/Form/tests/FormAutosuggest.test.jsx | 21 ++++ 3 files changed, 112 insertions(+), 77 deletions(-) diff --git a/src/Form/FormAutosuggest.jsx b/src/Form/FormAutosuggest.jsx index a2ef755281..0e255d5553 100644 --- a/src/Form/FormAutosuggest.jsx +++ b/src/Form/FormAutosuggest.jsx @@ -6,7 +6,7 @@ import { v4 as uuidv4 } from 'uuid'; import { useIntl } from 'react-intl'; import { KeyboardArrowUp, KeyboardArrowDown } from '../../icons'; import Icon from '../Icon'; -import FormGroup from './FormGroup'; +import { FormGroupContextProvider, useFormGroupContext } from './FormGroupContext'; import FormControl from './FormControl'; import FormControlFeedback from './FormControlFeedback'; import IconButton from '../IconButton'; @@ -239,12 +239,18 @@ function FormAutosuggest({ setDisplayValue(e.target.value); }; + const { getControlProps } = useFormGroupContext(); + const controlProps = getControlProps(props); + return (
{`${state.dropDownItems.length} options found`}
- + 0).toString()} @@ -259,7 +265,7 @@ function FormAutosuggest({ onClick={handleClick} trailingElement={iconToggle} data-testid="autosuggest-textbox-input" - {...props} + {...controlProps} /> {helpMessage && !state.errorMessage && ( @@ -269,11 +275,11 @@ function FormAutosuggest({ )} {state.errorMessage && ( - + {errorMessageText} )} - +
    { - const [selected, setSelected] = useState(''); + const [selected, setSelected] = useState(''); - return ( - setSelected(value)} - > - JavaScript - Python - Rube - alert(e.currentTarget.getAttribute('data-value'))}> - Option with custom onClick - - - ); -} + return ( + + +

    Programming language

    +
    + setSelected(value)} + > + JavaScript + Python + Rube + alert(e.currentTarget.getAttribute('data-value'))}> + Option with custom onClick + + +
    + ); +}; ``` ## Search Usage ```jsx live () => { - const [selected, setSelected] = useState(''); + const [selected, setSelected] = useState(''); - return ( - setSelected(value)} - > - PHP - Java - Turbo Pascal - Flask - - ); -} + return ( + setSelected(value)} + > + PHP + Java + Turbo Pascal + Flask + + ); +}; ``` ## Loading state ```jsx live () => { - const [data, setData] = useState([]); - const [showLoading, setShowLoading] = useState(false); + const [data, setData] = useState([]); + const [showLoading, setShowLoading] = useState(false); - useEffect(() => { - setShowLoading(true); - fetch('https://api.sampleapis.com/coffee/hot') - .then(data => data.json()) - .then(items => { - setTimeout(() => { - setData(items); - setShowLoading(false); - }, 1500); - }); - }, []) + useEffect(() => { + setShowLoading(true); + fetch('https://api.sampleapis.com/coffee/hot') + .then(data => data.json()) + .then(items => { + setTimeout(() => { + setData(items); + setShowLoading(false); + }, 1500); + }); + }, []); - const searchCoffee = (title) => { - setShowLoading(true); - fetch('https://api.sampleapis.com/coffee/hot') - .then(data => data.json()) - .then(items => setTimeout(() => { - const filteredCoffee = items.filter(res => res.title.toLowerCase().includes(title.toLowerCase())); - setShowLoading(false); - if (filteredCoffee) { return filteredCoffee } - return { ...title, filteredCoffee } - }, 1500)); - }; + const searchCoffee = (title) => { + setShowLoading(true); + fetch('https://api.sampleapis.com/coffee/hot') + .then(data => data.json()) + .then(items => setTimeout(() => { + const filteredCoffee = items.filter(res => res.title.toLowerCase().includes(title.toLowerCase())); + setShowLoading(false); + if (filteredCoffee) { return filteredCoffee; } + return { ...title, filteredCoffee }; + }, 1500)); + }; - return ( - - {data.map((item, index) => {item.title})} - - ); -} + return ( + + +

    Café API

    +
    + + {data.map((item, index) => {item.title})} + +
    + ); +}; ``` diff --git a/src/Form/tests/FormAutosuggest.test.jsx b/src/Form/tests/FormAutosuggest.test.jsx index 9f4714dcfe..dce226f71a 100644 --- a/src/Form/tests/FormAutosuggest.test.jsx +++ b/src/Form/tests/FormAutosuggest.test.jsx @@ -6,6 +6,8 @@ import userEvent from '@testing-library/user-event'; import { IntlProvider } from 'react-intl'; import FormAutosuggest from '../FormAutosuggest'; import FormAutosuggestOption from '../FormAutosuggestOption'; +import FormGroup from '../FormGroup'; +import FormLabel from '../FormLabel'; function FormAutosuggestWrapper(props) { return ( @@ -31,6 +33,19 @@ function FormAutosuggestTestComponent(props) { ); } +function FormAutosuggestLabelTestComponent() { + return ( + + +

    Label

    +
    + + Option + +
    + ); +} + FormAutosuggestTestComponent.defaultProps = { onSelected: jest.fn(), onClick: jest.fn(), @@ -112,6 +127,12 @@ describe('render behavior', () => { expect(getByText('3 options found')).toBeInTheDocument(); }); + + it('associates labels with the input textbox', () => { + const { getByTestId } = render(); + + expect(getByTestId('autosuggest-label').getAttribute('for')).toEqual(getByTestId('autosuggest-textbox-input').getAttribute('id')); + }); }); describe('controlled behavior', () => { From 07b50cc62baf5533a70528eb682e37d50fced82e Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Wed, 20 Dec 2023 09:12:40 -0500 Subject: [PATCH 05/23] docs: update dependent-usage.json (#2956) --- dependent-usage.json | 330 +++++++++++++++++++++++-------------------- 1 file changed, 173 insertions(+), 157 deletions(-) diff --git a/dependent-usage.json b/dependent-usage.json index 7e1a03bb21..25dd9bb259 100644 --- a/dependent-usage.json +++ b/dependent-usage.json @@ -1,92 +1,6 @@ { - "lastModified": 1702994890304, + "lastModified": 1703081262125, "projectUsages": [ - { - "version": "20.9.2", - "name": "edx-ora2", - "repository": "https://github.com/openedx/edx-ora2.git", - "folderName": "edx-ora2", - "usages": { - "Alert": [ - { - "filePath": "openassessment/xblock/static/js/src/lms/components/WaitingStepContent.jsx", - "line": 40, - "column": 6, - "index": 1251 - }, - { - "filePath": "openassessment/xblock/static/js/src/lms/containers/WaitingStepDetailsContainer.jsx", - "line": 68, - "column": 12, - "index": 2171 - } - ], - "Button": [ - { - "filePath": "openassessment/xblock/static/js/src/lms/components/WaitingStepList.jsx", - "line": 15, - "column": 4, - "index": 445 - } - ], - "DataTable": [ - { - "filePath": "openassessment/xblock/static/js/src/lms/components/WaitingStepList.jsx", - "line": 19, - "column": 4, - "index": 534 - } - ], - "DataTable.TableControlBar": [ - { - "filePath": "openassessment/xblock/static/js/src/lms/components/WaitingStepList.jsx", - "line": 53, - "column": 6, - "index": 1347 - } - ], - "DataTable.Table": [ - { - "filePath": "openassessment/xblock/static/js/src/lms/components/WaitingStepList.jsx", - "line": 54, - "column": 6, - "index": 1383 - } - ], - "DataTable.TableFooter": [ - { - "filePath": "openassessment/xblock/static/js/src/lms/components/WaitingStepList.jsx", - "line": 55, - "column": 6, - "index": 1409 - } - ], - "Container": [ - { - "filePath": "openassessment/xblock/static/js/src/lms/containers/WaitingStepDetailsContainer.jsx", - "line": 50, - "column": 12, - "index": 1589 - } - ], - "Row": [ - { - "filePath": "openassessment/xblock/static/js/src/lms/containers/WaitingStepDetailsContainer.jsx", - "line": 51, - "column": 14, - "index": 1632 - } - ], - "Spinner": [ - { - "filePath": "openassessment/xblock/static/js/src/lms/containers/WaitingStepDetailsContainer.jsx", - "line": 52, - "column": 16, - "index": 1692 - } - ] - } - }, { "version": "2.6.4", "name": "edx", @@ -12984,9 +12898,9 @@ }, { "filePath": "src/studio-home/StudioHome.jsx", - "line": 99, + "line": 155, "column": 6, - "index": 2687 + "index": 4313 }, { "filePath": "src/taxonomy/taxonomy-detail/TaxonomyDetailPage.jsx", @@ -13238,9 +13152,9 @@ }, { "filePath": "src/studio-home/StudioHome.jsx", - "line": 112, - "column": 12, - "index": 3152 + "line": 123, + "column": 6, + "index": 3321 }, { "filePath": "src/studio-home/verify-email-layout/index.jsx", @@ -13390,15 +13304,15 @@ }, { "filePath": "src/studio-home/StudioHome.jsx", - "line": 119, - "column": 14, - "index": 3418 + "line": 130, + "column": 8, + "index": 3545 }, { "filePath": "src/studio-home/StudioHome.jsx", - "line": 133, - "column": 14, - "index": 4080 + "line": 145, + "column": 8, + "index": 4157 }, { "filePath": "src/studio-home/verify-email-layout/index.jsx", @@ -13938,15 +13852,15 @@ }, { "filePath": "src/studio-home/StudioHome.jsx", - "line": 58, + "line": 67, "column": 8, - "index": 1682 + "index": 1875 }, { "filePath": "src/studio-home/StudioHome.jsx", - "line": 76, + "line": 85, "column": 6, - "index": 2188 + "index": 2381 }, { "filePath": "src/studio-home/tabs-section/courses-tab/contact-administrator/index.jsx", @@ -14812,6 +14726,30 @@ "column": 16, "index": 1991 }, + { + "filePath": "src/studio-home/StudioHome.jsx", + "line": 112, + "column": 14, + "index": 3039 + }, + { + "filePath": "src/studio-home/tabs-section/archived-tab/index.jsx", + "line": 33, + "column": 12, + "index": 865 + }, + { + "filePath": "src/studio-home/tabs-section/courses-tab/index.jsx", + "line": 53, + "column": 12, + "index": 1635 + }, + { + "filePath": "src/studio-home/tabs-section/libraries-tab/index.jsx", + "line": 33, + "column": 12, + "index": 856 + }, { "filePath": "src/taxonomy/delete-dialog/index.jsx", "line": 50, @@ -14843,6 +14781,30 @@ "line": 13, "column": 10, "index": 373 + }, + { + "filePath": "src/studio-home/StudioHome.jsx", + "line": 112, + "column": 25, + "index": 3050 + }, + { + "filePath": "src/studio-home/tabs-section/archived-tab/index.jsx", + "line": 33, + "column": 23, + "index": 876 + }, + { + "filePath": "src/studio-home/tabs-section/courses-tab/index.jsx", + "line": 53, + "column": 23, + "index": 1646 + }, + { + "filePath": "src/studio-home/tabs-section/libraries-tab/index.jsx", + "line": 33, + "column": 23, + "index": 867 } ], "useToggle": [ @@ -17168,9 +17130,9 @@ }, { "filePath": "src/studio-home/StudioHome.jsx", - "line": 52, + "line": 61, "column": 8, - "index": 1494 + "index": 1687 } ], "IconButtonWithTooltip": [ @@ -17307,6 +17269,18 @@ "line": 61, "column": 26, "index": 1907 + }, + { + "filePath": "src/studio-home/StudioHome.jsx", + "line": 69, + "column": 22, + "index": 1941 + }, + { + "filePath": "src/studio-home/StudioHome.jsx", + "line": 87, + "column": 20, + "index": 2443 } ], "CalendarIcon": [ @@ -18279,6 +18253,48 @@ "line": 39, "column": 6, "index": 1189 + }, + { + "filePath": "src/studio-home/StudioHome.jsx", + "line": 111, + "column": 12, + "index": 2984 + }, + { + "filePath": "src/studio-home/tabs-section/archived-tab/index.jsx", + "line": 22, + "column": 6, + "index": 605 + }, + { + "filePath": "src/studio-home/tabs-section/archived-tab/index.jsx", + "line": 32, + "column": 10, + "index": 812 + }, + { + "filePath": "src/studio-home/tabs-section/courses-tab/index.jsx", + "line": 41, + "column": 6, + "index": 1374 + }, + { + "filePath": "src/studio-home/tabs-section/courses-tab/index.jsx", + "line": 52, + "column": 10, + "index": 1582 + }, + { + "filePath": "src/studio-home/tabs-section/libraries-tab/index.jsx", + "line": 22, + "column": 6, + "index": 596 + }, + { + "filePath": "src/studio-home/tabs-section/libraries-tab/index.jsx", + "line": 32, + "column": 10, + "index": 803 } ], "Close": [ @@ -18642,9 +18658,9 @@ }, { "filePath": "src/studio-home/tabs-section/index.jsx", - "line": 82, + "line": 106, "column": 4, - "index": 2431 + "index": 3505 } ], "Tab": [ @@ -18662,21 +18678,21 @@ }, { "filePath": "src/studio-home/tabs-section/index.jsx", - "line": 34, + "line": 43, "column": 6, - "index": 1136 + "index": 1706 }, { "filePath": "src/studio-home/tabs-section/index.jsx", - "line": 50, + "line": 61, "column": 8, - "index": 1579 + "index": 2229 }, { "filePath": "src/studio-home/tabs-section/index.jsx", - "line": 62, + "line": 77, "column": 8, - "index": 1882 + "index": 2638 } ], "Form": [ @@ -24758,9 +24774,9 @@ }, { "filePath": "src/components/dashboard/main-content/course-enrollments/course-cards/BaseCourseCard.jsx", - "line": 490, + "line": 488, "column": 12, - "index": 13801 + "index": 13794 }, { "filePath": "src/components/executive-education-2u/ExecutiveEducation2UPage.jsx", @@ -25728,7 +25744,7 @@ "filePath": "src/components/dashboard/main-content/course-enrollments/CourseAssignmentAlert.jsx", "line": 26, "column": 20, - "index": 885 + "index": 883 }, { "filePath": "src/components/dashboard/sidebar/SupportInformation.jsx", @@ -25838,7 +25854,7 @@ "filePath": "src/components/dashboard/main-content/course-enrollments/course-cards/AssignedCourseCard.jsx", "line": 18, "column": 4, - "index": 636 + "index": 634 }, { "filePath": "src/components/dashboard/main-content/course-enrollments/course-cards/ContinueLearningButton.jsx", @@ -25868,7 +25884,7 @@ "filePath": "src/components/dashboard/main-content/course-enrollments/CourseAssignmentAlert.jsx", "line": 26, "column": 8, - "index": 873 + "index": 871 }, { "filePath": "src/components/dashboard/main-content/CourseRecommendations.jsx", @@ -26102,15 +26118,15 @@ }, { "filePath": "src/components/dashboard/main-content/course-enrollments/course-cards/BaseCourseCard.jsx", - "line": 511, + "line": 509, "column": 14, - "index": 14684 + "index": 14677 }, { "filePath": "src/components/dashboard/main-content/course-enrollments/course-cards/BaseCourseCard.jsx", - "line": 519, + "line": 517, "column": 16, - "index": 15124 + "index": 15116 }, { "filePath": "src/components/dashboard/main-content/CoursesTabComponent.jsx", @@ -26392,9 +26408,9 @@ }, { "filePath": "src/components/dashboard/main-content/course-enrollments/course-cards/BaseCourseCard.jsx", - "line": 512, + "line": 510, "column": 16, - "index": 14735 + "index": 14728 }, { "filePath": "src/components/dashboard/sidebar/LearnerCreditSummaryCard.jsx", @@ -26634,9 +26650,9 @@ }, { "filePath": "src/components/dashboard/main-content/course-enrollments/course-cards/BaseCourseCard.jsx", - "line": 449, + "line": 447, "column": 13, - "index": 12328 + "index": 12325 }, { "filePath": "src/components/dashboard/sidebar/CouponCodesSummaryCard.jsx", @@ -26936,7 +26952,7 @@ "filePath": "src/components/dashboard/main-content/course-enrollments/CourseAssignmentAlert.jsx", "line": 21, "column": 4, - "index": 782 + "index": 780 }, { "filePath": "src/components/dashboard/main-content/course-enrollments/CourseEnrollmentsAlert.jsx", @@ -27452,21 +27468,21 @@ }, { "filePath": "src/components/dashboard/main-content/course-enrollments/course-cards/BaseCourseCard.jsx", - "line": 230, + "line": 228, "column": 22, - "index": 6316 + "index": 6313 }, { "filePath": "src/components/dashboard/main-content/course-enrollments/course-cards/BaseCourseCard.jsx", - "line": 318, + "line": 316, "column": 12, - "index": 9015 + "index": 9012 }, { "filePath": "src/components/dashboard/main-content/course-enrollments/course-cards/BaseCourseCard.jsx", - "line": 462, + "line": 460, "column": 8, - "index": 12897 + "index": 12892 }, { "filePath": "src/components/my-career/AddJobRole.jsx", @@ -27682,9 +27698,9 @@ }, { "filePath": "src/components/dashboard/main-content/course-enrollments/course-cards/BaseCourseCard.jsx", - "line": 309, + "line": 307, "column": 10, - "index": 8741 + "index": 8738 } ], "Popover": [ @@ -27772,7 +27788,7 @@ "filePath": "src/components/dashboard/main-content/course-enrollments/CourseAssignmentAlert.jsx", "line": 32, "column": 6, - "index": 1034 + "index": 1032 }, { "filePath": "src/components/enterprise-user-subsidy/enterprise-offers/EnterpriseOffersBalanceAlert.jsx", @@ -27924,9 +27940,9 @@ "Dropdown": [ { "filePath": "src/components/dashboard/main-content/course-enrollments/course-cards/BaseCourseCard.jsx", - "line": 226, + "line": 224, "column": 10, - "index": 6195 + "index": 6192 }, { "filePath": "src/components/error-page/ErrorPageHeader.jsx", @@ -27956,9 +27972,9 @@ "Dropdown.Toggle": [ { "filePath": "src/components/dashboard/main-content/course-enrollments/course-cards/BaseCourseCard.jsx", - "line": 227, + "line": 225, "column": 12, - "index": 6218 + "index": 6215 }, { "filePath": "src/components/error-page/ErrorPageHeader.jsx", @@ -27988,25 +28004,25 @@ "IconButton": [ { "filePath": "src/components/dashboard/main-content/course-enrollments/course-cards/BaseCourseCard.jsx", - "line": 228, + "line": 226, "column": 18, - "index": 6253 + "index": 6250 } ], "MoreVert": [ { "filePath": "src/components/dashboard/main-content/course-enrollments/course-cards/BaseCourseCard.jsx", - "line": 229, + "line": 227, "column": 19, - "index": 6284 + "index": 6281 } ], "Dropdown.Menu": [ { "filePath": "src/components/dashboard/main-content/course-enrollments/course-cards/BaseCourseCard.jsx", - "line": 235, + "line": 233, "column": 12, - "index": 6510 + "index": 6507 }, { "filePath": "src/components/error-page/ErrorPageHeader.jsx", @@ -28036,9 +28052,9 @@ "Dropdown.Item": [ { "filePath": "src/components/dashboard/main-content/course-enrollments/course-cards/BaseCourseCard.jsx", - "line": 237, + "line": 235, "column": 16, - "index": 6585 + "index": 6582 }, { "filePath": "src/components/error-page/ErrorPageHeader.jsx", @@ -28104,17 +28120,17 @@ "Tooltip": [ { "filePath": "src/components/dashboard/main-content/course-enrollments/course-cards/BaseCourseCard.jsx", - "line": 313, + "line": 311, "column": 14, - "index": 8863 + "index": 8860 } ], "InfoOutline": [ { "filePath": "src/components/dashboard/main-content/course-enrollments/course-cards/BaseCourseCard.jsx", - "line": 318, + "line": 316, "column": 23, - "index": 9026 + "index": 9023 }, { "filePath": "src/components/skills-quiz/JobDescriptions.jsx", @@ -28126,15 +28142,15 @@ "Info": [ { "filePath": "src/components/dashboard/main-content/course-enrollments/course-cards/BaseCourseCard.jsx", - "line": 462, + "line": 460, "column": 19, - "index": 12908 + "index": 12903 }, { "filePath": "src/components/dashboard/main-content/course-enrollments/CourseAssignmentAlert.jsx", "line": 23, "column": 12, - "index": 824 + "index": 822 } ], "Input": [ @@ -30476,7 +30492,7 @@ "filePath": "src/course-home/courseware-search/CoursewareSearchResults.jsx", "line": 48, "column": 61, - "index": 1274 + "index": 1279 }, { "filePath": "src/course-home/courseware-search/CoursewareSearchToggle.jsx", @@ -30696,7 +30712,7 @@ "filePath": "src/course-home/courseware-search/CoursewareResultsFilter.jsx", "line": 49, "column": 4, - "index": 1662 + "index": 1636 } ], "Tab": [ @@ -30704,7 +30720,7 @@ "filePath": "src/course-home/courseware-search/CoursewareResultsFilter.jsx", "line": 58, "column": 8, - "index": 1941 + "index": 1915 } ], "Close": [ From b8fd22bfb6d43ce4a782bb20fa1e2915d14faf4b Mon Sep 17 00:00:00 2001 From: Peter Kulko <93188219+PKulkoRaccoonGang@users.noreply.github.com> Date: Thu, 21 Dec 2023 08:30:58 +0200 Subject: [PATCH 06/23] docs: fixed links leading to the 7th version of the React-table package (#2955) --- src/DataTable/README.md | 6 +++--- src/DataTable/index.jsx | 2 +- src/DataTable/tablefilters.mdx | 6 +++--- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/DataTable/README.md b/src/DataTable/README.md index 193b3b2b7a..bfa6e99018 100644 --- a/src/DataTable/README.md +++ b/src/DataTable/README.md @@ -28,11 +28,11 @@ designStatus: 'Done' devStatus: 'In progress' --- -The DataTable component is a wrapper that uses the react-table library to +The DataTable component is a wrapper that uses the react-table library to create tables. It can be used as is, or its subcomponents can be used on their own, allowing the developer full control. Paragon also exports all React hooks from ``react-table`` allowing the developers to use them and make customizations more freely without adding ``react-table`` as a separate dependency to their project. -For full list of available hooks view react-table API reference. +For full list of available hooks view react-table API reference. ## How children get information @@ -49,7 +49,7 @@ const instance = useContext(DataTableContext) For small tables (less than ~10,000 rows), filtering, sorting and pagination can be done quickly and easily on the frontend. In this example, a default TextFilter component is used for all columns. A default filter can be passed in, -or a filter component can be defined on the column. See react-table filters documentation +or a filter component can be defined on the column. See react-table filters documentation for more information. ```jsx live diff --git a/src/DataTable/index.jsx b/src/DataTable/index.jsx index 2046d5aa50..f41ad3c5fa 100644 --- a/src/DataTable/index.jsx +++ b/src/DataTable/index.jsx @@ -329,7 +329,7 @@ DataTable.propTypes = { /** Function that will fetch table data. Called when page size, page index or filters change. * Meant to be used with manual filters and pagination */ fetchData: PropTypes.func, - /** Initial state passed to react-table's documentation https://react-table.tanstack.com/docs/api/useTable */ + /** Initial state passed to react-table's documentation https://github.com/TanStack/table/blob/v7/docs/src/pages/docs/api/useTable.md */ initialState: PropTypes.shape({ pageSize: requiredWhen(PropTypes.number, 'isPaginated'), pageIndex: requiredWhen(PropTypes.number, 'isPaginated'), diff --git a/src/DataTable/tablefilters.mdx b/src/DataTable/tablefilters.mdx index a339c58aa9..2b8547aa7f 100644 --- a/src/DataTable/tablefilters.mdx +++ b/src/DataTable/tablefilters.mdx @@ -14,18 +14,18 @@ devStatus: 'In progress' --- -The ``DataTable`` component is a wrapper that uses the react-table library to +The ``DataTable`` component is a wrapper that uses the react-table library to create tables. It can be used as is, or its subcomponents can be used on their own, allowing the developer full control. ## Filtering and sorting Paragon currently provides a variety of filter types, and you can also define your own filter types. In the example below, a default ``TextFilter`` component is used as the default filter for all columns. A default filter can be passed in, -or a filter component can be defined on the column using the ``Filter`` attribute. See react-table filters documentation +or a filter component can be defined on the column using the ``Filter`` attribute. See react-table filters documentation for more information. ## Available filter functions -A filtering function can be defined on the column as well as the filter component. Custom filtering functions can also be defined, see react-table filters documentation +A filtering function can be defined on the column as well as the filter component. Custom filtering functions can also be defined, see react-table filters documentation for more information. Filter functions are defined on the column as the ``filter`` attribute.
    From b75b866665bb99866e30e326c9b824368ca1028f Mon Sep 17 00:00:00 2001 From: Peter Kulko <93188219+PKulkoRaccoonGang@users.noreply.github.com> Date: Thu, 21 Dec 2023 09:00:56 +0200 Subject: [PATCH 07/23] fix: fixed border-radius of buttons with sizes lg and sm (#2786) * fix: fixed border-radius of buttons with sizes lg and sm * refactor: refactoring README file * refactor: refactoring after review * refactor: changed button focus stroke color --- scss/core/_variables.scss | 2 +- src/Button/README.md | 226 +++++++++++++++++++++++-------------- src/Button/_variables.scss | 4 +- src/Button/index.scss | 4 +- 4 files changed, 147 insertions(+), 89 deletions(-) diff --git a/scss/core/_variables.scss b/scss/core/_variables.scss index 3fe1f20d29..c53894661e 100644 --- a/scss/core/_variables.scss +++ b/scss/core/_variables.scss @@ -282,7 +282,7 @@ $element-color-levels: map-merge( "border": 200, "icon": 300, "active-border": 300, - "focus": 300, + "focus": 500, "graphic": 300, "default": 500, "light-text": 500, diff --git a/src/Button/README.md b/src/Button/README.md index 93e235e375..88585c78dc 100644 --- a/src/Button/README.md +++ b/src/Button/README.md @@ -22,11 +22,11 @@ This component utilizes `Button` from React-Bootstrap and extends it with an abi return ( - - - - - + + + + + )} ``` @@ -43,11 +43,11 @@ This component utilizes `Button` from React-Bootstrap and extends it with an abi gap={2} direction={ isExtraSmall ? "vertical" : "horizontal" } > - - - - - + + + + + )} ``` @@ -65,20 +65,20 @@ This component utilizes `Button` from React-Bootstrap and extends it with an abi gap={2} direction={ isExtraSmall ? "vertical" : "horizontal" } > - - - - + + + + - - - - - + + + + + )} @@ -92,34 +92,41 @@ This component utilizes `Button` from React-Bootstrap and extends it with an abi return ( <> - - - - - - - - - - + + + + + + + + + + + + -)} + ) +} ``` ### When to use the inline size @@ -127,13 +134,11 @@ This component utilizes `Button` from React-Bootstrap and extends it with an abi Use inline size buttons for when a button sits with a line of text. ```jsx live -<> -

    - 2 items selected. - - -

    - +

    + 2 items selected. + + +

    ``` ## Block Buttons @@ -152,21 +157,41 @@ Use inline size buttons for when a button sits with a line of text. ### Disabled ```jsx live -<> - - - - +() => { + const isExtraSmall = useMediaQuery({ maxWidth: breakpoints.extraSmall.maxWidth }); + + return ( + + + + + + ) +} ``` ### With empty href For link to be `disabled`, it must have href defined with some value. ```jsx live -<> - - - +() => { + const isExtraSmall = useMediaQuery({ maxWidth: breakpoints.extraSmall.maxWidth }); + + return ( + + + + + ) +} ``` ### With Icons before or after @@ -181,23 +206,24 @@ For link to be `disabled`, it must have href defined with some value. gap={2} direction={ isExtraSmall ? "vertical" : "horizontal" } > - - - - - -)} + ) +} ``` ## Stateful buttons @@ -219,33 +245,63 @@ user-friendly experience. ### (Deprecated) color variants ```jsx live -
    - Primary - Success - Danger - Light - Dark -
    +() => { + const isExtraSmall = useMediaQuery({ maxWidth: breakpoints.large.maxWidth }); + + return ( + + Primary + Success + Danger + Light + Dark + + ) +} ``` ### (Deprecated) outline variants ```jsx live -
    - Primary - Success - Danger -
    +() => { + const isExtraSmall = useMediaQuery({ maxWidth: breakpoints.extraSmall.maxWidth }); + + return ( + + Primary + Success + Danger + + ) +} ``` ### (Deprecated) inverse variants ```jsx live -
    - Primary - Success - Danger -
    +() => { + const isExtraSmall = useMediaQuery({ maxWidth: breakpoints.extraSmall.maxWidth }); + + return ( + + Primary + Success + Danger + + ) +} ``` ### (Deprecated) link variant diff --git a/src/Button/_variables.scss b/src/Button/_variables.scss index 5d92ed8271..5022877db9 100644 --- a/src/Button/_variables.scss +++ b/src/Button/_variables.scss @@ -19,7 +19,7 @@ $btn-border-width: $input-btn-border-width !default; $btn-font-weight: $font-weight-normal !default; $btn-box-shadow: inset 0 1px 0 rgba($white, .15), 0 1px 1px rgba($black, .075) !default; $btn-focus-width: 2px !default; -$btn-focus-gap: 1px !default; +$btn-focus-gap: $btn-focus-width !default; $btn-focus-box-shadow: $input-btn-focus-box-shadow !default; $btn-disabled-opacity: .65 !default; $btn-active-box-shadow: none; @@ -48,3 +48,5 @@ $btn-focus-border-gap: $btn-focus-width + $btn-focus-gap !default; $btn-focus-distance-to-border: $btn-focus-border-gap + $btn-border-width !default; $btn-focus-border-radius: calc(#{$btn-border-radius} + #{$btn-focus-border-gap}) !default; +$btn-focus-border-radius-lg: $btn-focus-border-radius !default; +$btn-focus-border-radius-sm: $btn-border-radius !default; diff --git a/src/Button/index.scss b/src/Button/index.scss index 52c3eae069..9580fcd588 100644 --- a/src/Button/index.scss +++ b/src/Button/index.scss @@ -150,11 +150,11 @@ } &.btn-lg::before { - border-radius: $btn-focus-border-radius; + border-radius: $btn-focus-border-radius-lg; } &.btn-sm::before { - border-radius: $btn-focus-border-radius; + border-radius: $btn-focus-border-radius-sm; } &:active, From 9a16ba1f6098b36f2f4d66b69663c26853fa57ad Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Thu, 21 Dec 2023 09:13:36 -0500 Subject: [PATCH 08/23] docs: update dependent-usage.json (#2958) --- dependent-usage.json | 3046 ++++++++++++++++++++++++------------------ 1 file changed, 1756 insertions(+), 1290 deletions(-) diff --git a/dependent-usage.json b/dependent-usage.json index 25dd9bb259..6b25032651 100644 --- a/dependent-usage.json +++ b/dependent-usage.json @@ -1,5 +1,5 @@ { - "lastModified": 1703081262125, + "lastModified": 1703167725243, "projectUsages": [ { "version": "2.6.4", @@ -12820,9 +12820,9 @@ }, { "filePath": "src/course-outline/CourseOutline.jsx", - "line": 53, + "line": 120, "column": 6, - "index": 1523 + "index": 3659 }, { "filePath": "src/course-rerun/index.jsx", @@ -12968,9 +12968,9 @@ }, { "filePath": "src/course-outline/CourseOutline.jsx", - "line": 55, + "line": 125, "column": 10, - "index": 1637 + "index": 3983 }, { "filePath": "src/files-and-videos/videos-page/transcript-settings/Cielo24Form.jsx", @@ -13092,9 +13092,9 @@ }, { "filePath": "src/course-outline/CourseOutline.jsx", - "line": 83, + "line": 154, "column": 10, - "index": 2884 + "index": 5289 }, { "filePath": "src/course-rerun/index.jsx", @@ -13184,15 +13184,15 @@ }, { "filePath": "src/course-outline/CourseOutline.jsx", - "line": 90, + "line": 161, "column": 12, - "index": 3140 + "index": 5545 }, { "filePath": "src/course-outline/CourseOutline.jsx", - "line": 104, + "line": 235, "column": 12, - "index": 3653 + "index": 9364 }, { "filePath": "src/course-rerun/index.jsx", @@ -13377,46 +13377,112 @@ "index": 4930 }, { - "filePath": "src/course-outline/enable-highlights-modal/EnableHighlightsModal.jsx", + "filePath": "src/course-outline/card-header/CardHeader.jsx", + "line": 92, + "column": 10, + "index": 2401 + }, + { + "filePath": "src/course-outline/configure-modal/ConfigureModal.jsx", + "line": 80, + "column": 10, + "index": 2793 + }, + { + "filePath": "src/course-outline/CourseOutline.jsx", + "line": 216, + "column": 26, + "index": 8596 + }, + { + "filePath": "src/course-outline/delete-modal/DeleteModal.jsx", "line": 27, "column": 10, - "index": 576 + "index": 755 }, { - "filePath": "src/course-outline/enable-highlights-modal/EnableHighlightsModal.jsx", + "filePath": "src/course-outline/delete-modal/DeleteModal.jsx", "line": 30, "column": 10, - "index": 706 + "index": 885 }, { - "filePath": "src/course-outline/header-navigations/HeaderNavigations.jsx", + "filePath": "src/course-outline/empty-placeholder/EmptyPlaceholder.jsx", + "line": 23, + "column": 8, + "index": 771 + }, + { + "filePath": "src/course-outline/enable-highlights-modal/EnableHighlightsModal.jsx", + "line": 31, + "column": 10, + "index": 707 + }, + { + "filePath": "src/course-outline/enable-highlights-modal/EnableHighlightsModal.jsx", "line": 34, + "column": 10, + "index": 837 + }, + { + "filePath": "src/course-outline/header-navigations/HeaderNavigations.jsx", + "line": 35, "column": 8, - "index": 923 + "index": 938 }, { "filePath": "src/course-outline/header-navigations/HeaderNavigations.jsx", - "line": 50, + "line": 51, "column": 10, - "index": 1476 + "index": 1491 }, { "filePath": "src/course-outline/header-navigations/HeaderNavigations.jsx", - "line": 59, - "column": 6, - "index": 1735 + "line": 62, + "column": 8, + "index": 1817 }, { "filePath": "src/course-outline/header-navigations/HeaderNavigations.jsx", - "line": 76, + "line": 80, "column": 8, - "index": 2307 + "index": 2414 + }, + { + "filePath": "src/course-outline/highlights-modal/HighlightsModal.jsx", + "line": 77, + "column": 16, + "index": 2616 + }, + { + "filePath": "src/course-outline/publish-modal/PublishModal.jsx", + "line": 70, + "column": 10, + "index": 2270 + }, + { + "filePath": "src/course-outline/section-card/SectionCard.jsx", + "line": 127, + "column": 12, + "index": 3394 + }, + { + "filePath": "src/course-outline/section-card/SectionCard.jsx", + "line": 141, + "column": 12, + "index": 3992 }, { "filePath": "src/course-outline/status-bar/StatusBar.jsx", - "line": 80, + "line": 84, "column": 12, - "index": 2766 + "index": 2911 + }, + { + "filePath": "src/course-outline/subsection-card/SubsectionCard.jsx", + "line": 107, + "column": 10, + "index": 3086 }, { "filePath": "src/course-rerun/index.jsx", @@ -14012,11 +14078,17 @@ "column": 2, "index": 413 }, + { + "filePath": "src/course-outline/delete-modal/DeleteModal.jsx", + "line": 21, + "column": 4, + "index": 586 + }, { "filePath": "src/course-outline/enable-highlights-modal/EnableHighlightsModal.jsx", - "line": 19, + "line": 23, "column": 4, - "index": 381 + "index": 512 }, { "filePath": "src/course-team/info-modal/InfoModal.jsx", @@ -14069,10 +14141,34 @@ "index": 1658 }, { - "filePath": "src/course-outline/enable-highlights-modal/EnableHighlightsModal.jsx", + "filePath": "src/course-outline/configure-modal/ConfigureModal.jsx", + "line": 76, + "column": 8, + "index": 2623 + }, + { + "filePath": "src/course-outline/delete-modal/DeleteModal.jsx", "line": 26, "column": 8, - "index": 554 + "index": 733 + }, + { + "filePath": "src/course-outline/enable-highlights-modal/EnableHighlightsModal.jsx", + "line": 30, + "column": 8, + "index": 685 + }, + { + "filePath": "src/course-outline/highlights-modal/HighlightsModal.jsx", + "line": 73, + "column": 14, + "index": 2422 + }, + { + "filePath": "src/course-outline/publish-modal/PublishModal.jsx", + "line": 66, + "column": 8, + "index": 2100 }, { "filePath": "src/course-rerun/index.jsx", @@ -14184,15 +14280,15 @@ }, { "filePath": "src/generic/sub-header/SubHeader.jsx", - "line": 21, + "line": 22, "column": 10, - "index": 528 + "index": 552 }, { "filePath": "src/generic/sub-header/SubHeader.jsx", - "line": 27, + "line": 28, "column": 8, - "index": 694 + "index": 718 }, { "filePath": "src/pages-and-resources/app-settings-modal/AppSettingsModal.jsx", @@ -14234,7 +14330,7 @@ "filePath": "src/studio-home/card-item/index.jsx", "line": 44, "column": 10, - "index": 1498 + "index": 1506 }, { "filePath": "src/studio-home/processing-courses/course-item/index.jsx", @@ -14268,6 +14364,12 @@ "column": 6, "index": 444 }, + { + "filePath": "src/course-outline/configure-modal/VisibilityTab.jsx", + "line": 22, + "column": 10, + "index": 768 + }, { "filePath": "src/generic/alert-message/index.jsx", "line": 6, @@ -14360,6 +14462,18 @@ "column": 24, "index": 3901 }, + { + "filePath": "src/course-outline/card-header/CardHeader.jsx", + "line": 103, + "column": 18, + "index": 2998 + }, + { + "filePath": "src/course-outline/card-header/CardHeader.jsx", + "line": 132, + "column": 20, + "index": 4071 + }, { "filePath": "src/course-team/course-team-member/CourseTeamMember.jsx", "line": 59, @@ -14604,7 +14718,7 @@ "filePath": "src/generic/course-upload-image/index.jsx", "line": 72, "column": 16, - "index": 1905 + "index": 1919 }, { "filePath": "src/generic/datepicker-control/DatepickerControl.jsx", @@ -14822,9 +14936,45 @@ }, { "filePath": "src/course-outline/hooks.jsx", - "line": 29, + "line": 53, "column": 95, - "index": 998 + "index": 1718 + }, + { + "filePath": "src/course-outline/hooks.jsx", + "line": 58, + "column": 77, + "index": 2089 + }, + { + "filePath": "src/course-outline/hooks.jsx", + "line": 59, + "column": 68, + "index": 2175 + }, + { + "filePath": "src/course-outline/hooks.jsx", + "line": 60, + "column": 74, + "index": 2267 + }, + { + "filePath": "src/course-outline/hooks.jsx", + "line": 61, + "column": 65, + "index": 2350 + }, + { + "filePath": "src/course-outline/section-card/SectionCard.jsx", + "line": 33, + "column": 44, + "index": 1036 + }, + { + "filePath": "src/course-outline/subsection-card/SubsectionCard.jsx", + "line": 28, + "column": 44, + "index": 942 }, { "filePath": "src/course-team/hooks.jsx", @@ -14952,7 +15102,7 @@ "filePath": "src/generic/course-upload-image/index.jsx", "line": 110, "column": 6, - "index": 2880 + "index": 2896 }, { "filePath": "src/import-page/file-section/FileSection.jsx", @@ -15018,7 +15168,7 @@ "filePath": "src/studio-home/card-item/index.jsx", "line": 29, "column": 4, - "index": 1068 + "index": 1074 }, { "filePath": "src/studio-home/processing-courses/course-item/index.jsx", @@ -15080,7 +15230,7 @@ "filePath": "src/generic/course-upload-image/index.jsx", "line": 111, "column": 8, - "index": 2895 + "index": 2911 }, { "filePath": "src/pages-and-resources/discussions/app-config-form/apps/shared/discussion-topics/TopicItem.jsx", @@ -15190,7 +15340,7 @@ "filePath": "src/studio-home/card-item/index.jsx", "line": 30, "column": 6, - "index": 1103 + "index": 1109 }, { "filePath": "src/studio-home/processing-courses/course-item/index.jsx", @@ -15224,6 +15374,18 @@ "column": 16, "index": 1728 }, + { + "filePath": "src/course-outline/card-header/CardHeader.jsx", + "line": 117, + "column": 10, + "index": 3438 + }, + { + "filePath": "src/course-outline/card-header/CardHeader.jsx", + "line": 129, + "column": 16, + "index": 3956 + }, { "filePath": "src/files-and-videos/files-page/FileInfoModalSidebar.jsx", "line": 65, @@ -15294,7 +15456,7 @@ "filePath": "src/generic/course-upload-image/index.jsx", "line": 69, "column": 6, - "index": 1831 + "index": 1845 }, { "filePath": "src/pages-and-resources/pages/PageCard.jsx", @@ -15534,6 +15696,12 @@ "column": 12, "index": 2741 }, + { + "filePath": "src/course-outline/card-header/CardHeader.jsx", + "line": 63, + "column": 8, + "index": 1468 + }, { "filePath": "src/course-team/add-user-form/AddUserForm.jsx", "line": 27, @@ -15628,7 +15796,7 @@ "filePath": "src/generic/course-upload-image/index.jsx", "line": 108, "column": 4, - "index": 2786 + "index": 2802 }, { "filePath": "src/generic/create-or-rerun-course/CreateOrRerunCourseForm.jsx", @@ -15902,6 +16070,12 @@ "column": 14, "index": 2784 }, + { + "filePath": "src/course-outline/card-header/CardHeader.jsx", + "line": 64, + "column": 10, + "index": 1507 + }, { "filePath": "src/files-and-videos/videos-page/transcript-settings/Cielo24Form.jsx", "line": 94, @@ -15930,7 +16104,7 @@ "filePath": "src/generic/course-upload-image/index.jsx", "line": 123, "column": 10, - "index": 3285 + "index": 3301 }, { "filePath": "src/generic/create-or-rerun-course/CreateOrRerunCourseForm.jsx", @@ -16146,6 +16320,12 @@ "column": 8, "index": 6022 }, + { + "filePath": "src/course-outline/section-card/SectionCard.jsx", + "line": 133, + "column": 14, + "index": 3623 + }, { "filePath": "src/course-team/course-team-member/CourseTeamMember.jsx", "line": 33, @@ -16349,258 +16529,36 @@ "index": 2411 } ], - "CheckCircleIcon": [ - { - "filePath": "src/course-outline/CourseOutline.jsx", - "line": 61, - "column": 22, - "index": 1893 - }, - { - "filePath": "src/schedule-and-details/index.jsx", - "line": 177, - "column": 18, - "index": 5429 - } - ], - "WarningIcon": [ - { - "filePath": "src/course-outline/CourseOutline.jsx", - "line": 127, - "column": 18, - "index": 4549 - }, - { - "filePath": "src/generic/internet-connection-alert/index.jsx", - "line": 53, - "column": 12, - "index": 1404 - }, - { - "filePath": "src/schedule-and-details/index.jsx", - "line": 354, - "column": 16, - "index": 12574 - }, - { - "filePath": "src/studio-home/processing-courses/course-item/index.jsx", - "line": 66, - "column": 27, - "index": 2002 - } - ], - "Hyperlink": [ - { - "filePath": "src/course-outline/enable-highlights-modal/EnableHighlightsModal.jsx", - "line": 39, - "column": 8, - "index": 1027 - }, - { - "filePath": "src/course-outline/outline-sidebar/OutlineSidebar.jsx", - "line": 45, - "column": 14, - "index": 1443 - }, - { - "filePath": "src/course-outline/status-bar/StatusBar.jsx", - "line": 46, - "column": 8, - "index": 1474 - }, - { - "filePath": "src/course-outline/status-bar/StatusBar.jsx", - "line": 64, - "column": 8, - "index": 2120 - }, - { - "filePath": "src/course-outline/status-bar/StatusBar.jsx", - "line": 84, - "column": 10, - "index": 2933 - }, - { - "filePath": "src/course-rerun/course-rerun-sidebar/index.jsx", - "line": 66, - "column": 14, - "index": 1847 - }, - { - "filePath": "src/custom-pages/CustomPages.jsx", - "line": 137, - "column": 10, - "index": 4541 - }, - { - "filePath": "src/export-page/export-sidebar/ExportSidebar.jsx", - "line": 39, - "column": 6, - "index": 2162 - }, - { - "filePath": "src/files-and-videos/generic/UsageMetricsMessage.jsx", - "line": 30, - "column": 12, - "index": 902 - }, - { - "filePath": "src/generic/course-upload-image/index.jsx", - "line": 90, - "column": 12, - "index": 2369 - }, - { - "filePath": "src/generic/help-sidebar/HelpSidebarLink.jsx", - "line": 9, - "column": 6, - "index": 247 - }, - { - "filePath": "src/import-page/import-sidebar/ImportSidebar.jsx", - "line": 41, - "column": 6, - "index": 2165 - }, - { - "filePath": "src/pages-and-resources/app-settings-modal/AppSettingsModal.jsx", - "line": 164, - "column": 4, - "index": 5026 - }, - { - "filePath": "src/pages-and-resources/discussions/app-config-form/apps/shared/AppExternalLinks.jsx", - "line": 30, - "column": 16, - "index": 834 - }, - { - "filePath": "src/pages-and-resources/discussions/app-config-form/apps/shared/DivisionByGroupFields.jsx", - "line": 75, - "column": 10, - "index": 2348 - }, - { - "filePath": "src/pages-and-resources/live/BBBSettings.jsx", - "line": 73, - "column": 6, - "index": 2336 - }, - { - "filePath": "src/pages-and-resources/live/BBBSettings.jsx", - "line": 94, - "column": 16, - "index": 3173 - }, - { - "filePath": "src/pages-and-resources/ora_settings/Settings.jsx", - "line": 27, - "column": 8, - "index": 913 - }, - { - "filePath": "src/pages-and-resources/pages/PageCard.jsx", - "line": 41, - "column": 8, - "index": 1293 - }, - { - "filePath": "src/pages-and-resources/PagesAndResources.jsx", - "line": 73, - "column": 10, - "index": 2882 - }, - { - "filePath": "src/pages-and-resources/proctoring/Settings.jsx", - "line": 248, - "column": 4, - "index": 9592 - }, - { - "filePath": "src/pages-and-resources/xpert-unit-summary/settings-modal/SettingsModal.jsx", - "line": 260, - "column": 6, - "index": 7471 - }, - { - "filePath": "src/pages-and-resources/xpert-unit-summary/settings-modal/SettingsModal.jsx", - "line": 273, - "column": 6, - "index": 7778 - }, + "OverlayTrigger": [ { - "filePath": "src/schedule-and-details/basic-section/index.jsx", - "line": 102, + "filePath": "src/course-outline/card-header/CardHeader.jsx", + "line": 81, "column": 8, - "index": 2806 - }, - { - "filePath": "src/schedule-and-details/introducing-section/index.jsx", - "line": 43, - "column": 10, - "index": 1217 - }, - { - "filePath": "src/schedule-and-details/introducing-section/index.jsx", - "line": 61, - "column": 10, - "index": 1734 + "index": 2066 }, { - "filePath": "src/schedule-and-details/license-section/license-icons/index.jsx", - "line": 18, + "filePath": "src/course-outline/empty-placeholder/EmptyPlaceholder.jsx", + "line": 15, "column": 6, - "index": 609 - }, - { - "filePath": "src/schedule-and-details/requirements-section/entrance-exam/index.jsx", - "line": 49, - "column": 22, - "index": 1598 - }, - { - "filePath": "src/studio-home/card-item/index.jsx", - "line": 33, - "column": 10, - "index": 1177 - }, - { - "filePath": "src/studio-home/card-item/index.jsx", - "line": 46, - "column": 14, - "index": 1558 - }, - { - "filePath": "src/studio-home/card-item/index.jsx", - "line": 50, - "column": 12, - "index": 1726 + "index": 548 }, - { - "filePath": "src/studio-home/processing-courses/course-item/index.jsx", - "line": 49, - "column": 16, - "index": 1497 - } - ], - "OverlayTrigger": [ { "filePath": "src/course-outline/header-navigations/HeaderNavigations.jsx", - "line": 26, + "line": 27, "column": 6, - "index": 668 + "index": 683 }, { "filePath": "src/course-outline/header-navigations/HeaderNavigations.jsx", - "line": 42, + "line": 43, "column": 8, - "index": 1143 + "index": 1158 }, { "filePath": "src/course-outline/header-navigations/HeaderNavigations.jsx", - "line": 68, + "line": 72, "column": 6, - "index": 2056 + "index": 2163 }, { "filePath": "src/files-and-videos/generic/table-components/table-custom-columns/AccessColumn.jsx", @@ -16640,23 +16598,35 @@ } ], "Tooltip": [ + { + "filePath": "src/course-outline/card-header/CardHeader.jsx", + "line": 84, + "column": 12, + "index": 2150 + }, + { + "filePath": "src/course-outline/empty-placeholder/EmptyPlaceholder.jsx", + "line": 18, + "column": 10, + "index": 620 + }, { "filePath": "src/course-outline/header-navigations/HeaderNavigations.jsx", - "line": 29, + "line": 30, "column": 10, - "index": 740 + "index": 755 }, { "filePath": "src/course-outline/header-navigations/HeaderNavigations.jsx", - "line": 45, + "line": 46, "column": 12, - "index": 1248 + "index": 1263 }, { "filePath": "src/course-outline/header-navigations/HeaderNavigations.jsx", - "line": 71, + "line": 75, "column": 10, - "index": 2128 + "index": 2235 }, { "filePath": "src/files-and-videos/generic/table-components/table-custom-columns/AccessColumn.jsx", @@ -16677,18 +16647,1122 @@ "index": 932 }, { - "filePath": "src/taxonomy/TaxonomyListPage.jsx", - "line": 32, + "filePath": "src/taxonomy/TaxonomyListPage.jsx", + "line": 32, + "column": 10, + "index": 880 + } + ], + "Truncate": [ + { + "filePath": "src/course-outline/card-header/CardHeader.jsx", + "line": 99, + "column": 12, + "index": 2717 + }, + { + "filePath": "src/files-and-videos/files-page/FileInfoModalSidebar.jsx", + "line": 60, + "column": 10, + "index": 1501 + }, + { + "filePath": "src/files-and-videos/files-page/FileInfoModalSidebar.jsx", + "line": 77, + "column": 10, + "index": 2050 + }, + { + "filePath": "src/files-and-videos/generic/InfoModal.jsx", + "line": 51, + "column": 12, + "index": 1237 + }, + { + "filePath": "src/files-and-videos/generic/table-components/GalleryCard.jsx", + "line": 69, + "column": 10, + "index": 2131 + } + ], + "EditIcon": [ + { + "filePath": "src/course-outline/card-header/CardHeader.jsx", + "line": 120, + "column": 20, + "index": 3585 + } + ], + "Dropdown": [ + { + "filePath": "src/course-outline/card-header/CardHeader.jsx", + "line": 124, + "column": 8, + "index": 3661 + }, + { + "filePath": "src/files-and-videos/generic/FileMenu.jsx", + "line": 25, + "column": 2, + "index": 466 + }, + { + "filePath": "src/files-and-videos/generic/table-components/TableActions.jsx", + "line": 41, + "column": 6, + "index": 1161 + }, + { + "filePath": "src/files-and-videos/videos-page/info-sidebar/transcript-item/LanguageSelect.jsx", + "line": 16, + "column": 4, + "index": 404 + }, + { + "filePath": "src/files-and-videos/videos-page/info-sidebar/transcript-item/TranscriptMenu.jsx", + "line": 15, + "column": 2, + "index": 401 + }, + { + "filePath": "src/files-and-videos/videos-page/transcript-settings/FormDropdown.jsx", + "line": 22, + "column": 4, + "index": 516 + }, + { + "filePath": "src/generic/create-or-rerun-course/CreateOrRerunCourseForm.jsx", + "line": 176, + "column": 4, + "index": 5548 + }, + { + "filePath": "src/schedule-and-details/details-section/index.jsx", + "line": 26, + "column": 8, + "index": 940 + }, + { + "filePath": "src/schedule-and-details/requirements-section/index.jsx", + "line": 35, + "column": 6, + "index": 1127 + }, + { + "filePath": "src/schedule-and-details/schedule-section/certificate-display-row/CertificateDisplayRow.jsx", + "line": 128, + "column": 10, + "index": 3981 + }, + { + "filePath": "src/taxonomy/taxonomy-card/TaxonomyCardMenu.jsx", + "line": 28, + "column": 4, + "index": 614 + }, + { + "filePath": "src/taxonomy/TaxonomyListPage.jsx", + "line": 37, + "column": 8, + "index": 1008 + } + ], + "Dropdown.Toggle": [ + { + "filePath": "src/course-outline/card-header/CardHeader.jsx", + "line": 125, + "column": 10, + "index": 3758 + }, + { + "filePath": "src/files-and-videos/generic/FileMenu.jsx", + "line": 26, + "column": 4, + "index": 522 + }, + { + "filePath": "src/files-and-videos/generic/table-components/TableActions.jsx", + "line": 42, + "column": 8, + "index": 1197 + }, + { + "filePath": "src/files-and-videos/videos-page/info-sidebar/transcript-item/LanguageSelect.jsx", + "line": 17, + "column": 6, + "index": 421 + }, + { + "filePath": "src/files-and-videos/videos-page/info-sidebar/transcript-item/TranscriptMenu.jsx", + "line": 16, + "column": 4, + "index": 416 + }, + { + "filePath": "src/files-and-videos/videos-page/transcript-settings/FormDropdown.jsx", + "line": 25, + "column": 6, + "index": 589 + }, + { + "filePath": "src/generic/create-or-rerun-course/CreateOrRerunCourseForm.jsx", + "line": 177, + "column": 6, + "index": 5582 + }, + { + "filePath": "src/schedule-and-details/details-section/index.jsx", + "line": 27, + "column": 10, + "index": 982 + }, + { + "filePath": "src/schedule-and-details/requirements-section/index.jsx", + "line": 36, + "column": 8, + "index": 1167 + }, + { + "filePath": "src/schedule-and-details/schedule-section/certificate-display-row/CertificateDisplayRow.jsx", + "line": 129, + "column": 12, + "index": 4026 + }, + { + "filePath": "src/taxonomy/taxonomy-card/TaxonomyCardMenu.jsx", + "line": 29, + "column": 6, + "index": 678 + }, + { + "filePath": "src/taxonomy/TaxonomyListPage.jsx", + "line": 38, + "column": 10, + "index": 1029 + } + ], + "MoveVertIcon": [ + { + "filePath": "src/course-outline/card-header/CardHeader.jsx", + "line": 130, + "column": 17, + "index": 3985 + } + ], + "Dropdown.Menu": [ + { + "filePath": "src/course-outline/card-header/CardHeader.jsx", + "line": 134, + "column": 10, + "index": 4100 + }, + { + "filePath": "src/files-and-videos/generic/FileMenu.jsx", + "line": 34, + "column": 4, + "index": 705 + }, + { + "filePath": "src/files-and-videos/generic/table-components/TableActions.jsx", + "line": 49, + "column": 8, + "index": 1430 + }, + { + "filePath": "src/files-and-videos/videos-page/info-sidebar/transcript-item/LanguageSelect.jsx", + "line": 27, + "column": 6, + "index": 760 + }, + { + "filePath": "src/files-and-videos/videos-page/info-sidebar/transcript-item/TranscriptMenu.jsx", + "line": 25, + "column": 4, + "index": 678 + }, + { + "filePath": "src/files-and-videos/videos-page/transcript-settings/FormDropdown.jsx", + "line": 34, + "column": 6, + "index": 919 + }, + { + "filePath": "src/generic/create-or-rerun-course/CreateOrRerunCourseForm.jsx", + "line": 180, + "column": 6, + "index": 5760 + }, + { + "filePath": "src/schedule-and-details/details-section/index.jsx", + "line": 30, + "column": 10, + "index": 1121 + }, + { + "filePath": "src/schedule-and-details/requirements-section/index.jsx", + "line": 39, + "column": 8, + "index": 1306 + }, + { + "filePath": "src/schedule-and-details/schedule-section/certificate-display-row/CertificateDisplayRow.jsx", + "line": 132, + "column": 12, + "index": 4188 + }, + { + "filePath": "src/taxonomy/taxonomy-card/TaxonomyCardMenu.jsx", + "line": 39, + "column": 6, + "index": 1005 + }, + { + "filePath": "src/taxonomy/TaxonomyListPage.jsx", + "line": 44, + "column": 10, + "index": 1259 + } + ], + "Dropdown.Item": [ + { + "filePath": "src/course-outline/card-header/CardHeader.jsx", + "line": 135, + "column": 12, + "index": 4128 + }, + { + "filePath": "src/course-outline/card-header/CardHeader.jsx", + "line": 142, + "column": 12, + "index": 4414 + }, + { + "filePath": "src/course-outline/card-header/CardHeader.jsx", + "line": 148, + "column": 12, + "index": 4663 + }, + { + "filePath": "src/course-outline/card-header/CardHeader.jsx", + "line": 154, + "column": 12, + "index": 4912 + }, + { + "filePath": "src/files-and-videos/generic/FileMenu.jsx", + "line": 36, + "column": 8, + "index": 764 + }, + { + "filePath": "src/files-and-videos/generic/FileMenu.jsx", + "line": 43, + "column": 10, + "index": 965 + }, + { + "filePath": "src/files-and-videos/generic/FileMenu.jsx", + "line": 48, + "column": 10, + "index": 1162 + }, + { + "filePath": "src/files-and-videos/generic/FileMenu.jsx", + "line": 53, + "column": 10, + "index": 1356 + }, + { + "filePath": "src/files-and-videos/generic/FileMenu.jsx", + "line": 58, + "column": 6, + "index": 1560 + }, + { + "filePath": "src/files-and-videos/generic/FileMenu.jsx", + "line": 61, + "column": 6, + "index": 1679 + }, + { + "filePath": "src/files-and-videos/generic/FileMenu.jsx", + "line": 65, + "column": 6, + "index": 1824 + }, + { + "filePath": "src/files-and-videos/generic/table-components/TableActions.jsx", + "line": 51, + "column": 12, + "index": 1494 + }, + { + "filePath": "src/files-and-videos/generic/table-components/TableActions.jsx", + "line": 58, + "column": 10, + "index": 1754 + }, + { + "filePath": "src/files-and-videos/generic/table-components/TableActions.jsx", + "line": 65, + "column": 10, + "index": 2026 + }, + { + "filePath": "src/files-and-videos/videos-page/info-sidebar/transcript-item/LanguageSelect.jsx", + "line": 32, + "column": 16, + "index": 1010 + }, + { + "filePath": "src/files-and-videos/videos-page/info-sidebar/transcript-item/LanguageSelect.jsx", + "line": 39, + "column": 16, + "index": 1335 + }, + { + "filePath": "src/files-and-videos/videos-page/info-sidebar/transcript-item/LanguageSelect.jsx", + "line": 45, + "column": 14, + "index": 1587 + }, + { + "filePath": "src/files-and-videos/videos-page/info-sidebar/transcript-item/TranscriptMenu.jsx", + "line": 26, + "column": 6, + "index": 744 + }, + { + "filePath": "src/files-and-videos/videos-page/info-sidebar/transcript-item/TranscriptMenu.jsx", + "line": 32, + "column": 6, + "index": 942 + }, + { + "filePath": "src/files-and-videos/videos-page/info-sidebar/transcript-item/TranscriptMenu.jsx", + "line": 38, + "column": 6, + "index": 1179 + }, + { + "filePath": "src/files-and-videos/videos-page/transcript-settings/FormDropdown.jsx", + "line": 38, + "column": 14, + "index": 1130 + }, + { + "filePath": "src/files-and-videos/videos-page/transcript-settings/FormDropdown.jsx", + "line": 45, + "column": 14, + "index": 1438 + }, + { + "filePath": "src/files-and-videos/videos-page/transcript-settings/FormDropdown.jsx", + "line": 51, + "column": 12, + "index": 1672 + }, + { + "filePath": "src/generic/create-or-rerun-course/CreateOrRerunCourseForm.jsx", + "line": 182, + "column": 10, + "index": 5827 + }, + { + "filePath": "src/schedule-and-details/details-section/index.jsx", + "line": 32, + "column": 14, + "index": 1198 + }, + { + "filePath": "src/schedule-and-details/requirements-section/index.jsx", + "line": 40, + "column": 10, + "index": 1332 + }, + { + "filePath": "src/schedule-and-details/requirements-section/index.jsx", + "line": 47, + "column": 12, + "index": 1645 + }, + { + "filePath": "src/schedule-and-details/schedule-section/certificate-display-row/CertificateDisplayRow.jsx", + "line": 134, + "column": 16, + "index": 4276 + }, + { + "filePath": "src/taxonomy/taxonomy-card/TaxonomyCardMenu.jsx", + "line": 41, + "column": 10, + "index": 1106 + }, + { + "filePath": "src/taxonomy/taxonomy-detail/TaxonomyDetailMenu.jsx", + "line": 29, + "column": 8, + "index": 653 + }, + { + "filePath": "src/taxonomy/TaxonomyListPage.jsx", + "line": 45, + "column": 12, + "index": 1287 + }, + { + "filePath": "src/taxonomy/TaxonomyListPage.jsx", + "line": 51, + "column": 12, + "index": 1546 + } + ], + "Stack": [ + { + "filePath": "src/course-outline/configure-modal/BasicTab.jsx", + "line": 18, + "column": 6, + "index": 580 + }, + { + "filePath": "src/course-outline/status-bar/StatusBar.jsx", + "line": 47, + "column": 4, + "index": 1390 + }, + { + "filePath": "src/course-rerun/index.jsx", + "line": 51, + "column": 16, + "index": 1444 + }, + { + "filePath": "src/files-and-videos/files-page/FileInfoModalSidebar.jsx", + "line": 39, + "column": 4, + "index": 859 + }, + { + "filePath": "src/files-and-videos/generic/InfoModal.jsx", + "line": 72, + "column": 12, + "index": 2010 + }, + { + "filePath": "src/files-and-videos/videos-page/info-sidebar/InfoTab.jsx", + "line": 14, + "column": 4, + "index": 515 + }, + { + "filePath": "src/files-and-videos/videos-page/info-sidebar/TranscriptTab.jsx", + "line": 101, + "column": 4, + "index": 2991 + }, + { + "filePath": "src/files-and-videos/videos-page/transcript-settings/Cielo24Form.jsx", + "line": 28, + "column": 6, + "index": 1084 + }, + { + "filePath": "src/files-and-videos/videos-page/transcript-settings/Cielo24Form.jsx", + "line": 86, + "column": 4, + "index": 3434 + }, + { + "filePath": "src/files-and-videos/videos-page/transcript-settings/OrderTranscriptForm.jsx", + "line": 139, + "column": 6, + "index": 4458 + }, + { + "filePath": "src/files-and-videos/videos-page/transcript-settings/ThreePlayMediaForm.jsx", + "line": 37, + "column": 6, + "index": 1120 + }, + { + "filePath": "src/files-and-videos/videos-page/transcript-settings/ThreePlayMediaForm.jsx", + "line": 101, + "column": 4, + "index": 3881 + }, + { + "filePath": "src/schedule-and-details/license-section/license-commons-options/index.jsx", + "line": 58, + "column": 6, + "index": 1808 + }, + { + "filePath": "src/schedule-and-details/license-section/license-icons/index.jsx", + "line": 27, + "column": 4, + "index": 769 + }, + { + "filePath": "src/schedule-and-details/requirements-section/grade-requirements/index.jsx", + "line": 22, + "column": 4, + "index": 579 + }, + { + "filePath": "src/studio-home/processing-courses/index.jsx", + "line": 20, + "column": 6, + "index": 574 + } + ], + "ModalDialog": [ + { + "filePath": "src/course-outline/configure-modal/ConfigureModal.jsx", + "line": 49, + "column": 4, + "index": 1555 + }, + { + "filePath": "src/course-outline/highlights-modal/HighlightsModal.jsx", + "line": 34, + "column": 4, + "index": 939 + }, + { + "filePath": "src/course-outline/publish-modal/PublishModal.jsx", + "line": 25, + "column": 4, + "index": 590 + }, + { + "filePath": "src/custom-pages/CustomPages.jsx", + "line": 234, + "column": 8, + "index": 8347 + }, + { + "filePath": "src/files-and-videos/generic/InfoModal.jsx", + "line": 39, + "column": 4, + "index": 911 + }, + { + "filePath": "src/files-and-videos/generic/table-components/sort-and-filter-modal/SortAndFilterModal.jsx", + "line": 62, + "column": 4, + "index": 1479 + }, + { + "filePath": "src/pages-and-resources/app-settings-modal/AppSettingsModal.jsx", + "line": 65, + "column": 2, + "index": 2043 + }, + { + "filePath": "src/pages-and-resources/discussions/app-config-form/AppConfigForm.jsx", + "line": 120, + "column": 6, + "index": 3566 + }, + { + "filePath": "src/pages-and-resources/proctoring/Settings.jsx", + "line": 576, + "column": 4, + "index": 22242 + }, + { + "filePath": "src/pages-and-resources/xpert-unit-summary/settings-modal/SettingsModal.jsx", + "line": 72, + "column": 2, + "index": 2299 + }, + { + "filePath": "src/taxonomy/delete-dialog/index.jsx", + "line": 39, + "column": 4, + "index": 908 + }, + { + "filePath": "src/taxonomy/export-modal/index.jsx", + "line": 27, + "column": 4, + "index": 628 + } + ], + "ModalDialog.Header": [ + { + "filePath": "src/course-outline/configure-modal/ConfigureModal.jsx", + "line": 56, + "column": 6, + "index": 1708 + }, + { + "filePath": "src/course-outline/highlights-modal/HighlightsModal.jsx", + "line": 42, + "column": 6, + "index": 1119 + }, + { + "filePath": "src/course-outline/publish-modal/PublishModal.jsx", + "line": 32, + "column": 6, + "index": 741 + }, + { + "filePath": "src/custom-pages/CustomPages.jsx", + "line": 240, + "column": 10, + "index": 8521 + }, + { + "filePath": "src/files-and-videos/generic/InfoModal.jsx", + "line": 48, + "column": 6, + "index": 1124 + }, + { + "filePath": "src/files-and-videos/generic/table-components/sort-and-filter-modal/SortAndFilterModal.jsx", + "line": 69, + "column": 6, + "index": 1647 + }, + { + "filePath": "src/pages-and-resources/app-settings-modal/AppSettingsModal.jsx", + "line": 74, + "column": 4, + "index": 2206 + }, + { + "filePath": "src/pages-and-resources/discussions/app-config-form/AppConfigForm.jsx", + "line": 126, + "column": 8, + "index": 3777 + }, + { + "filePath": "src/pages-and-resources/proctoring/Settings.jsx", + "line": 587, + "column": 8, + "index": 22535 + }, + { + "filePath": "src/pages-and-resources/xpert-unit-summary/settings-modal/SettingsModal.jsx", + "line": 81, + "column": 4, + "index": 2462 + }, + { + "filePath": "src/taxonomy/delete-dialog/index.jsx", + "line": 48, + "column": 6, + "index": 1168 + }, + { + "filePath": "src/taxonomy/export-modal/index.jsx", + "line": 36, + "column": 6, + "index": 863 + } + ], + "ModalDialog.Title": [ + { + "filePath": "src/course-outline/configure-modal/ConfigureModal.jsx", + "line": 57, + "column": 8, + "index": 1773 + }, + { + "filePath": "src/course-outline/highlights-modal/HighlightsModal.jsx", + "line": 43, + "column": 8, + "index": 1185 + }, + { + "filePath": "src/course-outline/publish-modal/PublishModal.jsx", + "line": 33, + "column": 8, + "index": 804 + }, + { + "filePath": "src/custom-pages/CustomPages.jsx", + "line": 241, + "column": 12, + "index": 8554 + }, + { + "filePath": "src/files-and-videos/generic/InfoModal.jsx", + "line": 49, + "column": 8, + "index": 1153 + }, + { + "filePath": "src/files-and-videos/generic/table-components/sort-and-filter-modal/SortAndFilterModal.jsx", + "line": 70, + "column": 8, + "index": 1676 + }, + { + "filePath": "src/pages-and-resources/app-settings-modal/AppSettingsModal.jsx", + "line": 75, + "column": 6, + "index": 2233 + }, + { + "filePath": "src/pages-and-resources/discussions/app-config-form/AppConfigForm.jsx", + "line": 127, + "column": 10, + "index": 3825 + }, + { + "filePath": "src/pages-and-resources/proctoring/Settings.jsx", + "line": 588, + "column": 10, + "index": 22566 + }, + { + "filePath": "src/pages-and-resources/xpert-unit-summary/settings-modal/SettingsModal.jsx", + "line": 82, + "column": 6, + "index": 2489 + }, + { + "filePath": "src/taxonomy/delete-dialog/index.jsx", + "line": 49, + "column": 8, + "index": 1197 + }, + { + "filePath": "src/taxonomy/export-modal/index.jsx", + "line": 37, + "column": 8, + "index": 892 + } + ], + "ModalDialog.Body": [ + { + "filePath": "src/course-outline/configure-modal/ConfigureModal.jsx", + "line": 61, + "column": 6, + "index": 1927 + }, + { + "filePath": "src/course-outline/highlights-modal/HighlightsModal.jsx", + "line": 52, + "column": 12, + "index": 1498 + }, + { + "filePath": "src/course-outline/publish-modal/PublishModal.jsx", + "line": 37, + "column": 6, + "index": 958 + }, + { + "filePath": "src/custom-pages/CustomPages.jsx", + "line": 245, + "column": 10, + "index": 8720 + }, + { + "filePath": "src/files-and-videos/generic/InfoModal.jsx", + "line": 57, + "column": 6, + "index": 1436 + }, + { + "filePath": "src/files-and-videos/generic/table-components/sort-and-filter-modal/SortAndFilterModal.jsx", + "line": 74, + "column": 6, + "index": 1815 + }, + { + "filePath": "src/pages-and-resources/app-settings-modal/AppSettingsModal.jsx", + "line": 79, + "column": 4, + "index": 2352 + }, + { + "filePath": "src/pages-and-resources/discussions/app-config-form/AppConfigForm.jsx", + "line": 131, + "column": 8, + "index": 4036 + }, + { + "filePath": "src/pages-and-resources/proctoring/Settings.jsx", + "line": 592, + "column": 8, + "index": 22691 + }, + { + "filePath": "src/pages-and-resources/xpert-unit-summary/settings-modal/SettingsModal.jsx", + "line": 86, + "column": 4, + "index": 2608 + }, + { + "filePath": "src/taxonomy/delete-dialog/index.jsx", + "line": 54, + "column": 6, + "index": 1443 + }, + { + "filePath": "src/taxonomy/export-modal/index.jsx", + "line": 41, + "column": 6, + "index": 1033 + } + ], + "Tabs": [ + { + "filePath": "src/course-outline/configure-modal/ConfigureModal.jsx", + "line": 62, + "column": 8, + "index": 1988 + }, + { + "filePath": "src/files-and-videos/videos-page/info-sidebar/VideoInfoModalSidebar.jsx", + "line": 20, + "column": 2, + "index": 461 + }, + { + "filePath": "src/studio-home/tabs-section/index.jsx", + "line": 106, + "column": 4, + "index": 3505 + } + ], + "Tab": [ + { + "filePath": "src/course-outline/configure-modal/ConfigureModal.jsx", + "line": 63, + "column": 10, + "index": 2005 + }, + { + "filePath": "src/course-outline/configure-modal/ConfigureModal.jsx", + "line": 66, + "column": 10, + "index": 2189 + }, + { + "filePath": "src/files-and-videos/videos-page/info-sidebar/VideoInfoModalSidebar.jsx", + "line": 25, + "column": 4, + "index": 580 + }, + { + "filePath": "src/files-and-videos/videos-page/info-sidebar/VideoInfoModalSidebar.jsx", + "line": 28, + "column": 4, + "index": 704 + }, + { + "filePath": "src/studio-home/tabs-section/index.jsx", + "line": 43, + "column": 6, + "index": 1706 + }, + { + "filePath": "src/studio-home/tabs-section/index.jsx", + "line": 61, + "column": 8, + "index": 2229 + }, + { + "filePath": "src/studio-home/tabs-section/index.jsx", + "line": 77, + "column": 8, + "index": 2638 + } + ], + "ModalDialog.Footer": [ + { + "filePath": "src/course-outline/configure-modal/ConfigureModal.jsx", + "line": 75, + "column": 6, + "index": 2577 + }, + { + "filePath": "src/course-outline/highlights-modal/HighlightsModal.jsx", + "line": 72, + "column": 12, + "index": 2370 + }, + { + "filePath": "src/course-outline/publish-modal/PublishModal.jsx", + "line": 65, + "column": 6, + "index": 2054 + }, + { + "filePath": "src/files-and-videos/generic/table-components/sort-and-filter-modal/SortAndFilterModal.jsx", + "line": 157, + "column": 6, + "index": 4569 + }, + { + "filePath": "src/pages-and-resources/app-settings-modal/AppSettingsModal.jsx", + "line": 82, + "column": 4, + "index": 2416 + }, + { + "filePath": "src/pages-and-resources/discussions/app-config-form/AppConfigForm.jsx", + "line": 134, + "column": 8, + "index": 4208 + }, + { + "filePath": "src/pages-and-resources/proctoring/Settings.jsx", + "line": 600, + "column": 8, + "index": 23073 + }, + { + "filePath": "src/pages-and-resources/xpert-unit-summary/settings-modal/SettingsModal.jsx", + "line": 89, + "column": 4, + "index": 2672 + }, + { + "filePath": "src/taxonomy/delete-dialog/index.jsx", + "line": 72, + "column": 6, + "index": 2059 + }, + { + "filePath": "src/taxonomy/export-modal/index.jsx", + "line": 66, + "column": 6, + "index": 1875 + } + ], + "ModalDialog.CloseButton": [ + { + "filePath": "src/course-outline/configure-modal/ConfigureModal.jsx", + "line": 77, + "column": 10, + "index": 2645 + }, + { + "filePath": "src/course-outline/highlights-modal/HighlightsModal.jsx", + "line": 74, + "column": 16, + "index": 2450 + }, + { + "filePath": "src/course-outline/publish-modal/PublishModal.jsx", + "line": 67, + "column": 10, + "index": 2122 + }, + { + "filePath": "src/files-and-videos/generic/table-components/sort-and-filter-modal/SortAndFilterModal.jsx", + "line": 159, + "column": 10, + "index": 4620 + }, + { + "filePath": "src/pages-and-resources/app-settings-modal/AppSettingsModal.jsx", + "line": 84, + "column": 8, + "index": 2479 + }, + { + "filePath": "src/pages-and-resources/discussions/app-config-form/AppConfigForm.jsx", + "line": 136, + "column": 12, + "index": 4263 + }, + { + "filePath": "src/pages-and-resources/proctoring/Settings.jsx", + "line": 606, + "column": 12, + "index": 23202 + }, + { + "filePath": "src/pages-and-resources/xpert-unit-summary/settings-modal/SettingsModal.jsx", + "line": 91, + "column": 8, + "index": 2735 + }, + { + "filePath": "src/taxonomy/delete-dialog/index.jsx", + "line": 74, + "column": 10, + "index": 2110 + }, + { + "filePath": "src/taxonomy/export-modal/index.jsx", + "line": 68, + "column": 10, + "index": 1926 + } + ], + "Form.Checkbox": [ + { + "filePath": "src/course-outline/configure-modal/VisibilityTab.jsx", + "line": 16, + "column": 6, + "index": 518 + }, + { + "filePath": "src/files-and-videos/generic/table-components/sort-and-filter-modal/SortAndFilterModal.jsx", + "line": 148, + "column": 14, + "index": 4232 + }, + { + "filePath": "src/pages-and-resources/discussions/app-config-form/apps/shared/DivisionByGroupFields.jsx", + "line": 118, + "column": 30, + "index": 4284 + }, + { + "filePath": "src/schedule-and-details/requirements-section/entrance-exam/index.jsx", + "line": 33, "column": 10, - "index": 880 + "index": 1011 + } + ], + "CheckCircleIcon": [ + { + "filePath": "src/course-outline/CourseOutline.jsx", + "line": 131, + "column": 22, + "index": 4239 + }, + { + "filePath": "src/schedule-and-details/index.jsx", + "line": 177, + "column": 18, + "index": 5429 } ], "IconAdd": [ + { + "filePath": "src/course-outline/CourseOutline.jsx", + "line": 221, + "column": 40, + "index": 8865 + }, { "filePath": "src/course-outline/header-navigations/HeaderNavigations.jsx", - "line": 35, + "line": 36, "column": 22, - "index": 953 + "index": 968 + }, + { + "filePath": "src/course-outline/section-card/SectionCard.jsx", + "line": 145, + "column": 26, + "index": 4147 + }, + { + "filePath": "src/course-outline/subsection-card/SubsectionCard.jsx", + "line": 111, + "column": 24, + "index": 3236 }, { "filePath": "src/course-team/add-team-member/AddTeamMember.jsx", @@ -16715,96 +17789,230 @@ "index": 8448 } ], - "Stack": [ + "WarningIcon": [ { - "filePath": "src/course-outline/status-bar/StatusBar.jsx", - "line": 43, - "column": 4, - "index": 1249 + "filePath": "src/course-outline/CourseOutline.jsx", + "line": 281, + "column": 18, + "index": 10990 }, { - "filePath": "src/course-rerun/index.jsx", - "line": 51, + "filePath": "src/generic/internet-connection-alert/index.jsx", + "line": 53, + "column": 12, + "index": 1404 + }, + { + "filePath": "src/schedule-and-details/index.jsx", + "line": 354, "column": 16, - "index": 1444 + "index": 12574 }, { - "filePath": "src/files-and-videos/files-page/FileInfoModalSidebar.jsx", - "line": 39, - "column": 4, - "index": 859 + "filePath": "src/studio-home/processing-courses/course-item/index.jsx", + "line": 66, + "column": 27, + "index": 2002 + } + ], + "Hyperlink": [ + { + "filePath": "src/course-outline/enable-highlights-modal/EnableHighlightsModal.jsx", + "line": 43, + "column": 8, + "index": 1158 }, { - "filePath": "src/files-and-videos/generic/InfoModal.jsx", - "line": 72, - "column": 12, - "index": 2010 + "filePath": "src/course-outline/highlights-modal/HighlightsModal.jsx", + "line": 56, + "column": 20, + "index": 1674 }, { - "filePath": "src/files-and-videos/videos-page/info-sidebar/InfoTab.jsx", - "line": 14, - "column": 4, - "index": 515 + "filePath": "src/course-outline/outline-sidebar/OutlineSidebar.jsx", + "line": 45, + "column": 14, + "index": 1443 }, { - "filePath": "src/files-and-videos/videos-page/info-sidebar/TranscriptTab.jsx", - "line": 101, - "column": 4, - "index": 2991 + "filePath": "src/course-outline/status-bar/StatusBar.jsx", + "line": 50, + "column": 8, + "index": 1615 }, { - "filePath": "src/files-and-videos/videos-page/transcript-settings/Cielo24Form.jsx", - "line": 28, + "filePath": "src/course-outline/status-bar/StatusBar.jsx", + "line": 68, + "column": 8, + "index": 2263 + }, + { + "filePath": "src/course-outline/status-bar/StatusBar.jsx", + "line": 88, + "column": 10, + "index": 3117 + }, + { + "filePath": "src/course-rerun/course-rerun-sidebar/index.jsx", + "line": 66, + "column": 14, + "index": 1847 + }, + { + "filePath": "src/custom-pages/CustomPages.jsx", + "line": 137, + "column": 10, + "index": 4541 + }, + { + "filePath": "src/export-page/export-sidebar/ExportSidebar.jsx", + "line": 39, "column": 6, - "index": 1084 + "index": 2162 }, { - "filePath": "src/files-and-videos/videos-page/transcript-settings/Cielo24Form.jsx", - "line": 86, - "column": 4, - "index": 3434 + "filePath": "src/files-and-videos/generic/UsageMetricsMessage.jsx", + "line": 30, + "column": 12, + "index": 902 }, { - "filePath": "src/files-and-videos/videos-page/transcript-settings/OrderTranscriptForm.jsx", - "line": 139, + "filePath": "src/generic/course-upload-image/index.jsx", + "line": 90, + "column": 12, + "index": 2383 + }, + { + "filePath": "src/generic/help-sidebar/HelpSidebarLink.jsx", + "line": 9, "column": 6, - "index": 4458 + "index": 247 }, { - "filePath": "src/files-and-videos/videos-page/transcript-settings/ThreePlayMediaForm.jsx", - "line": 37, + "filePath": "src/import-page/import-sidebar/ImportSidebar.jsx", + "line": 41, "column": 6, - "index": 1120 + "index": 2165 }, { - "filePath": "src/files-and-videos/videos-page/transcript-settings/ThreePlayMediaForm.jsx", - "line": 101, + "filePath": "src/pages-and-resources/app-settings-modal/AppSettingsModal.jsx", + "line": 164, "column": 4, - "index": 3881 + "index": 5026 }, { - "filePath": "src/schedule-and-details/license-section/license-commons-options/index.jsx", - "line": 58, + "filePath": "src/pages-and-resources/discussions/app-config-form/apps/shared/AppExternalLinks.jsx", + "line": 30, + "column": 16, + "index": 834 + }, + { + "filePath": "src/pages-and-resources/discussions/app-config-form/apps/shared/DivisionByGroupFields.jsx", + "line": 75, + "column": 10, + "index": 2348 + }, + { + "filePath": "src/pages-and-resources/live/BBBSettings.jsx", + "line": 73, "column": 6, - "index": 1808 + "index": 2336 }, { - "filePath": "src/schedule-and-details/license-section/license-icons/index.jsx", + "filePath": "src/pages-and-resources/live/BBBSettings.jsx", + "line": 94, + "column": 16, + "index": 3173 + }, + { + "filePath": "src/pages-and-resources/ora_settings/Settings.jsx", "line": 27, - "column": 4, - "index": 769 + "column": 8, + "index": 913 }, { - "filePath": "src/schedule-and-details/requirements-section/grade-requirements/index.jsx", - "line": 22, + "filePath": "src/pages-and-resources/pages/PageCard.jsx", + "line": 41, + "column": 8, + "index": 1293 + }, + { + "filePath": "src/pages-and-resources/PagesAndResources.jsx", + "line": 73, + "column": 10, + "index": 2882 + }, + { + "filePath": "src/pages-and-resources/proctoring/Settings.jsx", + "line": 248, "column": 4, - "index": 579 + "index": 9592 }, { - "filePath": "src/studio-home/processing-courses/index.jsx", - "line": 20, + "filePath": "src/pages-and-resources/xpert-unit-summary/settings-modal/SettingsModal.jsx", + "line": 260, "column": 6, - "index": 574 + "index": 7471 + }, + { + "filePath": "src/pages-and-resources/xpert-unit-summary/settings-modal/SettingsModal.jsx", + "line": 273, + "column": 6, + "index": 7778 + }, + { + "filePath": "src/schedule-and-details/basic-section/index.jsx", + "line": 102, + "column": 8, + "index": 2806 + }, + { + "filePath": "src/schedule-and-details/introducing-section/index.jsx", + "line": 43, + "column": 10, + "index": 1217 + }, + { + "filePath": "src/schedule-and-details/introducing-section/index.jsx", + "line": 61, + "column": 10, + "index": 1734 + }, + { + "filePath": "src/schedule-and-details/license-section/license-icons/index.jsx", + "line": 18, + "column": 6, + "index": 609 + }, + { + "filePath": "src/schedule-and-details/requirements-section/entrance-exam/index.jsx", + "line": 49, + "column": 22, + "index": 1598 + }, + { + "filePath": "src/studio-home/card-item/index.jsx", + "line": 33, + "column": 10, + "index": 1183 + }, + { + "filePath": "src/studio-home/card-item/index.jsx", + "line": 46, + "column": 14, + "index": 1566 + }, + { + "filePath": "src/studio-home/card-item/index.jsx", + "line": 50, + "column": 12, + "index": 1734 + }, + { + "filePath": "src/studio-home/processing-courses/course-item/index.jsx", + "line": 49, + "column": 16, + "index": 1497 } ], "Form.Label": [ @@ -16884,7 +18092,7 @@ "filePath": "src/generic/course-upload-image/index.jsx", "line": 109, "column": 6, - "index": 2841 + "index": 2857 }, { "filePath": "src/generic/create-or-rerun-course/CreateOrRerunCourseForm.jsx", @@ -17285,318 +18493,94 @@ ], "CalendarIcon": [ { - "filePath": "src/course-updates/update-form/UpdateForm.jsx", - "line": 69, - "column": 25, - "index": 2040 - } - ], - "SpinnerSimple": [ - { - "filePath": "src/custom-pages/CustomPageCard.jsx", - "line": 61, - "column": 26, - "index": 1615 - }, - { - "filePath": "src/custom-pages/CustomPages.jsx", - "line": 97, - "column": 26, - "index": 3170 - }, - { - "filePath": "src/pages-and-resources/xpert-unit-summary/settings-modal/SettingsModal.jsx", - "line": 171, - "column": 30, - "index": 4804 - } - ], - "Add": [ - { - "filePath": "src/custom-pages/CustomPages.jsx", - "line": 96, - "column": 26, - "index": 3135 - }, - { - "filePath": "src/custom-pages/CustomPages.jsx", - "line": 131, - "column": 24, - "index": 4348 - }, - { - "filePath": "src/files-and-videos/generic/table-components/TableActions.jsx", - "line": 74, - "column": 26, - "index": 2392 - }, - { - "filePath": "src/files-and-videos/videos-page/info-sidebar/TranscriptTab.jsx", - "line": 129, - "column": 22, - "index": 3944 - }, - { - "filePath": "src/pages-and-resources/discussions/app-config-form/apps/shared/discussion-restrictions/RestrictionSchedules.jsx", - "line": 70, - "column": 28, - "index": 2300 - }, - { - "filePath": "src/pages-and-resources/discussions/app-config-form/apps/shared/discussion-topics/DiscussionTopics.jsx", - "line": 81, - "column": 30, - "index": 3061 - }, - { - "filePath": "src/pages-and-resources/teams/Settings.jsx", - "line": 150, - "column": 34, - "index": 5517 - }, - { - "filePath": "src/taxonomy/TaxonomyListPage.jsx", - "line": 60, - "column": 26, - "index": 1893 - } - ], - "Breadcrumb": [ - { - "filePath": "src/custom-pages/CustomPages.jsx", - "line": 117, - "column": 10, - "index": 3841 - }, - { - "filePath": "src/taxonomy/taxonomy-detail/TaxonomyDetailPage.jsx", - "line": 122, - "column": 10, - "index": 3763 - } - ], - "ModalDialog": [ - { - "filePath": "src/custom-pages/CustomPages.jsx", - "line": 234, - "column": 8, - "index": 8347 - }, - { - "filePath": "src/files-and-videos/generic/InfoModal.jsx", - "line": 39, - "column": 4, - "index": 911 - }, - { - "filePath": "src/files-and-videos/generic/table-components/sort-and-filter-modal/SortAndFilterModal.jsx", - "line": 62, - "column": 4, - "index": 1479 - }, - { - "filePath": "src/pages-and-resources/app-settings-modal/AppSettingsModal.jsx", - "line": 65, - "column": 2, - "index": 2043 - }, - { - "filePath": "src/pages-and-resources/discussions/app-config-form/AppConfigForm.jsx", - "line": 120, - "column": 6, - "index": 3566 - }, - { - "filePath": "src/pages-and-resources/proctoring/Settings.jsx", - "line": 576, - "column": 4, - "index": 22242 - }, - { - "filePath": "src/pages-and-resources/xpert-unit-summary/settings-modal/SettingsModal.jsx", - "line": 72, - "column": 2, - "index": 2299 - }, - { - "filePath": "src/taxonomy/delete-dialog/index.jsx", - "line": 39, - "column": 4, - "index": 908 - }, - { - "filePath": "src/taxonomy/export-modal/index.jsx", - "line": 27, - "column": 4, - "index": 628 - } - ], - "ModalDialog.Header": [ - { - "filePath": "src/custom-pages/CustomPages.jsx", - "line": 240, - "column": 10, - "index": 8521 - }, - { - "filePath": "src/files-and-videos/generic/InfoModal.jsx", - "line": 48, - "column": 6, - "index": 1124 - }, - { - "filePath": "src/files-and-videos/generic/table-components/sort-and-filter-modal/SortAndFilterModal.jsx", - "line": 69, - "column": 6, - "index": 1647 - }, - { - "filePath": "src/pages-and-resources/app-settings-modal/AppSettingsModal.jsx", - "line": 74, - "column": 4, - "index": 2206 - }, - { - "filePath": "src/pages-and-resources/discussions/app-config-form/AppConfigForm.jsx", - "line": 126, - "column": 8, - "index": 3777 - }, - { - "filePath": "src/pages-and-resources/proctoring/Settings.jsx", - "line": 587, - "column": 8, - "index": 22535 - }, - { - "filePath": "src/pages-and-resources/xpert-unit-summary/settings-modal/SettingsModal.jsx", - "line": 81, - "column": 4, - "index": 2462 - }, - { - "filePath": "src/taxonomy/delete-dialog/index.jsx", - "line": 48, - "column": 6, - "index": 1168 - }, - { - "filePath": "src/taxonomy/export-modal/index.jsx", - "line": 36, - "column": 6, - "index": 863 - } - ], - "ModalDialog.Title": [ - { - "filePath": "src/custom-pages/CustomPages.jsx", - "line": 241, - "column": 12, - "index": 8554 - }, - { - "filePath": "src/files-and-videos/generic/InfoModal.jsx", - "line": 49, - "column": 8, - "index": 1153 - }, - { - "filePath": "src/files-and-videos/generic/table-components/sort-and-filter-modal/SortAndFilterModal.jsx", - "line": 70, - "column": 8, - "index": 1676 - }, - { - "filePath": "src/pages-and-resources/app-settings-modal/AppSettingsModal.jsx", - "line": 75, - "column": 6, - "index": 2233 - }, - { - "filePath": "src/pages-and-resources/discussions/app-config-form/AppConfigForm.jsx", - "line": 127, - "column": 10, - "index": 3825 - }, - { - "filePath": "src/pages-and-resources/proctoring/Settings.jsx", - "line": 588, - "column": 10, - "index": 22566 - }, + "filePath": "src/course-updates/update-form/UpdateForm.jsx", + "line": 69, + "column": 25, + "index": 2040 + } + ], + "SpinnerSimple": [ { - "filePath": "src/pages-and-resources/xpert-unit-summary/settings-modal/SettingsModal.jsx", - "line": 82, - "column": 6, - "index": 2489 + "filePath": "src/custom-pages/CustomPageCard.jsx", + "line": 61, + "column": 26, + "index": 1615 }, { - "filePath": "src/taxonomy/delete-dialog/index.jsx", - "line": 49, - "column": 8, - "index": 1197 + "filePath": "src/custom-pages/CustomPages.jsx", + "line": 97, + "column": 26, + "index": 3170 }, { - "filePath": "src/taxonomy/export-modal/index.jsx", - "line": 37, - "column": 8, - "index": 892 + "filePath": "src/pages-and-resources/xpert-unit-summary/settings-modal/SettingsModal.jsx", + "line": 171, + "column": 30, + "index": 4804 } ], - "ModalDialog.Body": [ + "Add": [ { "filePath": "src/custom-pages/CustomPages.jsx", - "line": 245, - "column": 10, - "index": 8720 + "line": 96, + "column": 26, + "index": 3135 }, { - "filePath": "src/files-and-videos/generic/InfoModal.jsx", - "line": 57, - "column": 6, - "index": 1436 + "filePath": "src/custom-pages/CustomPages.jsx", + "line": 131, + "column": 24, + "index": 4348 }, { - "filePath": "src/files-and-videos/generic/table-components/sort-and-filter-modal/SortAndFilterModal.jsx", + "filePath": "src/files-and-videos/generic/table-components/TableActions.jsx", "line": 74, - "column": 6, - "index": 1815 + "column": 26, + "index": 2392 }, { - "filePath": "src/pages-and-resources/app-settings-modal/AppSettingsModal.jsx", - "line": 79, - "column": 4, - "index": 2352 + "filePath": "src/files-and-videos/videos-page/info-sidebar/TranscriptTab.jsx", + "line": 129, + "column": 22, + "index": 3944 }, { - "filePath": "src/pages-and-resources/discussions/app-config-form/AppConfigForm.jsx", - "line": 131, - "column": 8, - "index": 4036 + "filePath": "src/pages-and-resources/discussions/app-config-form/apps/shared/discussion-restrictions/RestrictionSchedules.jsx", + "line": 70, + "column": 28, + "index": 2300 }, { - "filePath": "src/pages-and-resources/proctoring/Settings.jsx", - "line": 592, - "column": 8, - "index": 22691 + "filePath": "src/pages-and-resources/discussions/app-config-form/apps/shared/discussion-topics/DiscussionTopics.jsx", + "line": 81, + "column": 30, + "index": 3061 }, { - "filePath": "src/pages-and-resources/xpert-unit-summary/settings-modal/SettingsModal.jsx", - "line": 86, - "column": 4, - "index": 2608 + "filePath": "src/pages-and-resources/teams/Settings.jsx", + "line": 150, + "column": 34, + "index": 5517 }, { - "filePath": "src/taxonomy/delete-dialog/index.jsx", - "line": 54, - "column": 6, - "index": 1443 + "filePath": "src/taxonomy/TaxonomyListPage.jsx", + "line": 60, + "column": 26, + "index": 1893 + } + ], + "Breadcrumb": [ + { + "filePath": "src/custom-pages/CustomPages.jsx", + "line": 117, + "column": 10, + "index": 3841 }, { - "filePath": "src/taxonomy/export-modal/index.jsx", - "line": 41, - "column": 6, - "index": 1033 + "filePath": "src/taxonomy/taxonomy-detail/TaxonomyDetailPage.jsx", + "line": 122, + "column": 10, + "index": 3763 } ], "Image": [ @@ -17622,7 +18606,7 @@ "filePath": "src/generic/course-upload-image/index.jsx", "line": 61, "column": 6, - "index": 1666 + "index": 1678 } ], "ArrowCircleDownIcon": [ @@ -17633,32 +18617,6 @@ "index": 4099 } ], - "Truncate": [ - { - "filePath": "src/files-and-videos/files-page/FileInfoModalSidebar.jsx", - "line": 60, - "column": 10, - "index": 1501 - }, - { - "filePath": "src/files-and-videos/files-page/FileInfoModalSidebar.jsx", - "line": 77, - "column": 10, - "index": 2050 - }, - { - "filePath": "src/files-and-videos/generic/InfoModal.jsx", - "line": 51, - "column": 12, - "index": 1237 - }, - { - "filePath": "src/files-and-videos/generic/table-components/GalleryCard.jsx", - "line": 69, - "column": 10, - "index": 2131 - } - ], "ContentCopy": [ { "filePath": "src/files-and-videos/files-page/FileInfoModalSidebar.jsx", @@ -17707,142 +18665,6 @@ "index": 700 } ], - "Dropdown": [ - { - "filePath": "src/files-and-videos/generic/FileMenu.jsx", - "line": 25, - "column": 2, - "index": 466 - }, - { - "filePath": "src/files-and-videos/generic/table-components/TableActions.jsx", - "line": 41, - "column": 6, - "index": 1161 - }, - { - "filePath": "src/files-and-videos/videos-page/info-sidebar/transcript-item/LanguageSelect.jsx", - "line": 16, - "column": 4, - "index": 404 - }, - { - "filePath": "src/files-and-videos/videos-page/info-sidebar/transcript-item/TranscriptMenu.jsx", - "line": 15, - "column": 2, - "index": 401 - }, - { - "filePath": "src/files-and-videos/videos-page/transcript-settings/FormDropdown.jsx", - "line": 22, - "column": 4, - "index": 516 - }, - { - "filePath": "src/generic/create-or-rerun-course/CreateOrRerunCourseForm.jsx", - "line": 176, - "column": 4, - "index": 5548 - }, - { - "filePath": "src/schedule-and-details/details-section/index.jsx", - "line": 26, - "column": 8, - "index": 940 - }, - { - "filePath": "src/schedule-and-details/requirements-section/index.jsx", - "line": 35, - "column": 6, - "index": 1127 - }, - { - "filePath": "src/schedule-and-details/schedule-section/certificate-display-row/CertificateDisplayRow.jsx", - "line": 128, - "column": 10, - "index": 3981 - }, - { - "filePath": "src/taxonomy/taxonomy-card/TaxonomyCardMenu.jsx", - "line": 28, - "column": 4, - "index": 614 - }, - { - "filePath": "src/taxonomy/TaxonomyListPage.jsx", - "line": 37, - "column": 8, - "index": 1008 - } - ], - "Dropdown.Toggle": [ - { - "filePath": "src/files-and-videos/generic/FileMenu.jsx", - "line": 26, - "column": 4, - "index": 522 - }, - { - "filePath": "src/files-and-videos/generic/table-components/TableActions.jsx", - "line": 42, - "column": 8, - "index": 1197 - }, - { - "filePath": "src/files-and-videos/videos-page/info-sidebar/transcript-item/LanguageSelect.jsx", - "line": 17, - "column": 6, - "index": 421 - }, - { - "filePath": "src/files-and-videos/videos-page/info-sidebar/transcript-item/TranscriptMenu.jsx", - "line": 16, - "column": 4, - "index": 416 - }, - { - "filePath": "src/files-and-videos/videos-page/transcript-settings/FormDropdown.jsx", - "line": 25, - "column": 6, - "index": 589 - }, - { - "filePath": "src/generic/create-or-rerun-course/CreateOrRerunCourseForm.jsx", - "line": 177, - "column": 6, - "index": 5582 - }, - { - "filePath": "src/schedule-and-details/details-section/index.jsx", - "line": 27, - "column": 10, - "index": 982 - }, - { - "filePath": "src/schedule-and-details/requirements-section/index.jsx", - "line": 36, - "column": 8, - "index": 1167 - }, - { - "filePath": "src/schedule-and-details/schedule-section/certificate-display-row/CertificateDisplayRow.jsx", - "line": 129, - "column": 12, - "index": 4026 - }, - { - "filePath": "src/taxonomy/taxonomy-card/TaxonomyCardMenu.jsx", - "line": 29, - "column": 6, - "index": 678 - }, - { - "filePath": "src/taxonomy/TaxonomyListPage.jsx", - "line": 38, - "column": 10, - "index": 1029 - } - ], "MoreHoriz": [ { "filePath": "src/files-and-videos/generic/FileMenu.jsx", @@ -17863,244 +18685,6 @@ "index": 533 } ], - "Dropdown.Menu": [ - { - "filePath": "src/files-and-videos/generic/FileMenu.jsx", - "line": 34, - "column": 4, - "index": 705 - }, - { - "filePath": "src/files-and-videos/generic/table-components/TableActions.jsx", - "line": 49, - "column": 8, - "index": 1430 - }, - { - "filePath": "src/files-and-videos/videos-page/info-sidebar/transcript-item/LanguageSelect.jsx", - "line": 27, - "column": 6, - "index": 760 - }, - { - "filePath": "src/files-and-videos/videos-page/info-sidebar/transcript-item/TranscriptMenu.jsx", - "line": 25, - "column": 4, - "index": 678 - }, - { - "filePath": "src/files-and-videos/videos-page/transcript-settings/FormDropdown.jsx", - "line": 34, - "column": 6, - "index": 919 - }, - { - "filePath": "src/generic/create-or-rerun-course/CreateOrRerunCourseForm.jsx", - "line": 180, - "column": 6, - "index": 5760 - }, - { - "filePath": "src/schedule-and-details/details-section/index.jsx", - "line": 30, - "column": 10, - "index": 1121 - }, - { - "filePath": "src/schedule-and-details/requirements-section/index.jsx", - "line": 39, - "column": 8, - "index": 1306 - }, - { - "filePath": "src/schedule-and-details/schedule-section/certificate-display-row/CertificateDisplayRow.jsx", - "line": 132, - "column": 12, - "index": 4188 - }, - { - "filePath": "src/taxonomy/taxonomy-card/TaxonomyCardMenu.jsx", - "line": 39, - "column": 6, - "index": 1005 - }, - { - "filePath": "src/taxonomy/TaxonomyListPage.jsx", - "line": 44, - "column": 10, - "index": 1259 - } - ], - "Dropdown.Item": [ - { - "filePath": "src/files-and-videos/generic/FileMenu.jsx", - "line": 36, - "column": 8, - "index": 764 - }, - { - "filePath": "src/files-and-videos/generic/FileMenu.jsx", - "line": 43, - "column": 10, - "index": 965 - }, - { - "filePath": "src/files-and-videos/generic/FileMenu.jsx", - "line": 48, - "column": 10, - "index": 1162 - }, - { - "filePath": "src/files-and-videos/generic/FileMenu.jsx", - "line": 53, - "column": 10, - "index": 1356 - }, - { - "filePath": "src/files-and-videos/generic/FileMenu.jsx", - "line": 58, - "column": 6, - "index": 1560 - }, - { - "filePath": "src/files-and-videos/generic/FileMenu.jsx", - "line": 61, - "column": 6, - "index": 1679 - }, - { - "filePath": "src/files-and-videos/generic/FileMenu.jsx", - "line": 65, - "column": 6, - "index": 1824 - }, - { - "filePath": "src/files-and-videos/generic/table-components/TableActions.jsx", - "line": 51, - "column": 12, - "index": 1494 - }, - { - "filePath": "src/files-and-videos/generic/table-components/TableActions.jsx", - "line": 58, - "column": 10, - "index": 1754 - }, - { - "filePath": "src/files-and-videos/generic/table-components/TableActions.jsx", - "line": 65, - "column": 10, - "index": 2026 - }, - { - "filePath": "src/files-and-videos/videos-page/info-sidebar/transcript-item/LanguageSelect.jsx", - "line": 32, - "column": 16, - "index": 1010 - }, - { - "filePath": "src/files-and-videos/videos-page/info-sidebar/transcript-item/LanguageSelect.jsx", - "line": 39, - "column": 16, - "index": 1335 - }, - { - "filePath": "src/files-and-videos/videos-page/info-sidebar/transcript-item/LanguageSelect.jsx", - "line": 45, - "column": 14, - "index": 1587 - }, - { - "filePath": "src/files-and-videos/videos-page/info-sidebar/transcript-item/TranscriptMenu.jsx", - "line": 26, - "column": 6, - "index": 744 - }, - { - "filePath": "src/files-and-videos/videos-page/info-sidebar/transcript-item/TranscriptMenu.jsx", - "line": 32, - "column": 6, - "index": 942 - }, - { - "filePath": "src/files-and-videos/videos-page/info-sidebar/transcript-item/TranscriptMenu.jsx", - "line": 38, - "column": 6, - "index": 1179 - }, - { - "filePath": "src/files-and-videos/videos-page/transcript-settings/FormDropdown.jsx", - "line": 38, - "column": 14, - "index": 1130 - }, - { - "filePath": "src/files-and-videos/videos-page/transcript-settings/FormDropdown.jsx", - "line": 45, - "column": 14, - "index": 1438 - }, - { - "filePath": "src/files-and-videos/videos-page/transcript-settings/FormDropdown.jsx", - "line": 51, - "column": 12, - "index": 1672 - }, - { - "filePath": "src/generic/create-or-rerun-course/CreateOrRerunCourseForm.jsx", - "line": 182, - "column": 10, - "index": 5827 - }, - { - "filePath": "src/schedule-and-details/details-section/index.jsx", - "line": 32, - "column": 14, - "index": 1198 - }, - { - "filePath": "src/schedule-and-details/requirements-section/index.jsx", - "line": 40, - "column": 10, - "index": 1332 - }, - { - "filePath": "src/schedule-and-details/requirements-section/index.jsx", - "line": 47, - "column": 12, - "index": 1645 - }, - { - "filePath": "src/schedule-and-details/schedule-section/certificate-display-row/CertificateDisplayRow.jsx", - "line": 134, - "column": 16, - "index": 4276 - }, - { - "filePath": "src/taxonomy/taxonomy-card/TaxonomyCardMenu.jsx", - "line": 41, - "column": 10, - "index": 1106 - }, - { - "filePath": "src/taxonomy/taxonomy-detail/TaxonomyDetailMenu.jsx", - "line": 29, - "column": 8, - "index": 653 - }, - { - "filePath": "src/taxonomy/TaxonomyListPage.jsx", - "line": 45, - "column": 12, - "index": 1287 - }, - { - "filePath": "src/taxonomy/TaxonomyListPage.jsx", - "line": 51, - "column": 12, - "index": 1546 - } - ], "Dropdown.Divider": [ { "filePath": "src/files-and-videos/generic/FileMenu.jsx", @@ -18170,7 +18754,7 @@ "filePath": "src/generic/course-upload-image/index.jsx", "line": 112, "column": 10, - "index": 2940 + "index": 2956 }, { "filePath": "src/import-page/file-section/FileSection.jsx", @@ -18350,7 +18934,7 @@ "filePath": "src/generic/course-upload-image/index.jsx", "line": 122, "column": 8, - "index": 3243 + "index": 3259 }, { "filePath": "src/pages-and-resources/discussions/app-config-form/apps/shared/discussion-topics/TopicItem.jsx", @@ -18405,114 +18989,6 @@ "index": 3857 } ], - "Form.Checkbox": [ - { - "filePath": "src/files-and-videos/generic/table-components/sort-and-filter-modal/SortAndFilterModal.jsx", - "line": 148, - "column": 14, - "index": 4232 - }, - { - "filePath": "src/pages-and-resources/discussions/app-config-form/apps/shared/DivisionByGroupFields.jsx", - "line": 118, - "column": 30, - "index": 4284 - }, - { - "filePath": "src/schedule-and-details/requirements-section/entrance-exam/index.jsx", - "line": 33, - "column": 10, - "index": 1011 - } - ], - "ModalDialog.Footer": [ - { - "filePath": "src/files-and-videos/generic/table-components/sort-and-filter-modal/SortAndFilterModal.jsx", - "line": 157, - "column": 6, - "index": 4569 - }, - { - "filePath": "src/pages-and-resources/app-settings-modal/AppSettingsModal.jsx", - "line": 82, - "column": 4, - "index": 2416 - }, - { - "filePath": "src/pages-and-resources/discussions/app-config-form/AppConfigForm.jsx", - "line": 134, - "column": 8, - "index": 4208 - }, - { - "filePath": "src/pages-and-resources/proctoring/Settings.jsx", - "line": 600, - "column": 8, - "index": 23073 - }, - { - "filePath": "src/pages-and-resources/xpert-unit-summary/settings-modal/SettingsModal.jsx", - "line": 89, - "column": 4, - "index": 2672 - }, - { - "filePath": "src/taxonomy/delete-dialog/index.jsx", - "line": 72, - "column": 6, - "index": 2059 - }, - { - "filePath": "src/taxonomy/export-modal/index.jsx", - "line": 66, - "column": 6, - "index": 1875 - } - ], - "ModalDialog.CloseButton": [ - { - "filePath": "src/files-and-videos/generic/table-components/sort-and-filter-modal/SortAndFilterModal.jsx", - "line": 159, - "column": 10, - "index": 4620 - }, - { - "filePath": "src/pages-and-resources/app-settings-modal/AppSettingsModal.jsx", - "line": 84, - "column": 8, - "index": 2479 - }, - { - "filePath": "src/pages-and-resources/discussions/app-config-form/AppConfigForm.jsx", - "line": 136, - "column": 12, - "index": 4263 - }, - { - "filePath": "src/pages-and-resources/proctoring/Settings.jsx", - "line": 606, - "column": 12, - "index": 23202 - }, - { - "filePath": "src/pages-and-resources/xpert-unit-summary/settings-modal/SettingsModal.jsx", - "line": 91, - "column": 8, - "index": 2735 - }, - { - "filePath": "src/taxonomy/delete-dialog/index.jsx", - "line": 74, - "column": 10, - "index": 2110 - }, - { - "filePath": "src/taxonomy/export-modal/index.jsx", - "line": 68, - "column": 10, - "index": 1926 - } - ], "Locked": [ { "filePath": "src/files-and-videos/generic/table-components/table-custom-columns/AccessColumn.jsx", @@ -18649,52 +19125,6 @@ "index": 886 } ], - "Tabs": [ - { - "filePath": "src/files-and-videos/videos-page/info-sidebar/VideoInfoModalSidebar.jsx", - "line": 20, - "column": 2, - "index": 461 - }, - { - "filePath": "src/studio-home/tabs-section/index.jsx", - "line": 106, - "column": 4, - "index": 3505 - } - ], - "Tab": [ - { - "filePath": "src/files-and-videos/videos-page/info-sidebar/VideoInfoModalSidebar.jsx", - "line": 25, - "column": 4, - "index": 580 - }, - { - "filePath": "src/files-and-videos/videos-page/info-sidebar/VideoInfoModalSidebar.jsx", - "line": 28, - "column": 4, - "index": 704 - }, - { - "filePath": "src/studio-home/tabs-section/index.jsx", - "line": 43, - "column": 6, - "index": 1706 - }, - { - "filePath": "src/studio-home/tabs-section/index.jsx", - "line": 61, - "column": 8, - "index": 2229 - }, - { - "filePath": "src/studio-home/tabs-section/index.jsx", - "line": 77, - "column": 8, - "index": 2638 - } - ], "Form": [ { "filePath": "src/files-and-videos/videos-page/transcript-settings/FormDropdown.jsx", @@ -18972,7 +19402,7 @@ "filePath": "src/generic/course-upload-image/index.jsx", "line": 71, "column": 13, - "index": 1873 + "index": 1887 } ], "Card.Divider": [ @@ -18980,7 +19410,7 @@ "filePath": "src/generic/course-upload-image/index.jsx", "line": 121, "column": 8, - "index": 3218 + "index": 3234 }, { "filePath": "src/schedule-and-details/basic-section/index.jsx", @@ -24774,9 +25204,9 @@ }, { "filePath": "src/components/dashboard/main-content/course-enrollments/course-cards/BaseCourseCard.jsx", - "line": 488, + "line": 506, "column": 12, - "index": 13794 + "index": 14265 }, { "filePath": "src/components/executive-education-2u/ExecutiveEducation2UPage.jsx", @@ -25742,9 +26172,9 @@ }, { "filePath": "src/components/dashboard/main-content/course-enrollments/CourseAssignmentAlert.jsx", - "line": 26, + "line": 28, "column": 20, - "index": 883 + "index": 917 }, { "filePath": "src/components/dashboard/sidebar/SupportInformation.jsx", @@ -25852,9 +26282,9 @@ }, { "filePath": "src/components/dashboard/main-content/course-enrollments/course-cards/AssignedCourseCard.jsx", - "line": 18, + "line": 24, "column": 4, - "index": 634 + "index": 953 }, { "filePath": "src/components/dashboard/main-content/course-enrollments/course-cards/ContinueLearningButton.jsx", @@ -25882,9 +26312,9 @@ }, { "filePath": "src/components/dashboard/main-content/course-enrollments/CourseAssignmentAlert.jsx", - "line": 26, + "line": 28, "column": 8, - "index": 871 + "index": 905 }, { "filePath": "src/components/dashboard/main-content/CourseRecommendations.jsx", @@ -25930,9 +26360,9 @@ }, { "filePath": "src/components/my-career/AddJobRole.jsx", - "line": 83, - "column": 24, - "index": 2939 + "line": 71, + "column": 22, + "index": 2481 }, { "filePath": "src/components/my-career/CategoryCard.jsx", @@ -26118,15 +26548,15 @@ }, { "filePath": "src/components/dashboard/main-content/course-enrollments/course-cards/BaseCourseCard.jsx", - "line": 509, + "line": 527, "column": 14, - "index": 14677 + "index": 15148 }, { "filePath": "src/components/dashboard/main-content/course-enrollments/course-cards/BaseCourseCard.jsx", - "line": 517, + "line": 535, "column": 16, - "index": 15116 + "index": 15587 }, { "filePath": "src/components/dashboard/main-content/CoursesTabComponent.jsx", @@ -26250,9 +26680,9 @@ }, { "filePath": "src/components/my-career/AddJobRole.jsx", - "line": 63, - "column": 6, - "index": 1963 + "line": 51, + "column": 4, + "index": 1545 }, { "filePath": "src/components/my-career/VisualizeCareer.jsx", @@ -26408,9 +26838,9 @@ }, { "filePath": "src/components/dashboard/main-content/course-enrollments/course-cards/BaseCourseCard.jsx", - "line": 510, + "line": 528, "column": 16, - "index": 14728 + "index": 15199 }, { "filePath": "src/components/dashboard/sidebar/LearnerCreditSummaryCard.jsx", @@ -26650,9 +27080,9 @@ }, { "filePath": "src/components/dashboard/main-content/course-enrollments/course-cards/BaseCourseCard.jsx", - "line": 447, + "line": 465, "column": 13, - "index": 12325 + "index": 12800 }, { "filePath": "src/components/dashboard/sidebar/CouponCodesSummaryCard.jsx", @@ -26770,12 +27200,6 @@ "column": 6, "index": 1242 }, - { - "filePath": "src/components/my-career/AddJobRole.jsx", - "line": 29, - "column": 58, - "index": 1186 - }, { "filePath": "src/components/my-career/CategoryCard.jsx", "line": 22, @@ -26950,9 +27374,9 @@ }, { "filePath": "src/components/dashboard/main-content/course-enrollments/CourseAssignmentAlert.jsx", - "line": 21, + "line": 22, "column": 4, - "index": 780 + "index": 791 }, { "filePath": "src/components/dashboard/main-content/course-enrollments/CourseEnrollmentsAlert.jsx", @@ -26996,12 +27420,6 @@ "column": 47, "index": 2284 }, - { - "filePath": "src/components/my-career/AddJobRole.jsx", - "line": 54, - "column": 6, - "index": 1743 - }, { "filePath": "src/components/program/ProgramCourses.jsx", "line": 94, @@ -27104,9 +27522,9 @@ }, { "filePath": "src/components/my-career/AddJobRole.jsx", - "line": 109, - "column": 10, - "index": 3872 + "line": 97, + "column": 8, + "index": 3362 }, { "filePath": "src/components/program-progress/ProgramProgressPage.jsx", @@ -27184,21 +27602,21 @@ }, { "filePath": "src/components/dashboard/tests/DashboardPage.test.jsx", - "line": 135, + "line": 141, "column": 9, - "index": 4211 + "index": 4567 }, { "filePath": "src/components/dashboard/tests/DashboardPage.test.jsx", - "line": 248, + "line": 274, "column": 62, - "index": 7567 + "index": 8860 }, { "filePath": "src/components/my-career/AddJobRole.jsx", - "line": 109, - "column": 32, - "index": 3894 + "line": 97, + "column": 30, + "index": 3384 }, { "filePath": "src/components/program-progress/ProgramListingCard.jsx", @@ -27468,27 +27886,27 @@ }, { "filePath": "src/components/dashboard/main-content/course-enrollments/course-cards/BaseCourseCard.jsx", - "line": 228, + "line": 229, "column": 22, - "index": 6313 + "index": 6350 }, { "filePath": "src/components/dashboard/main-content/course-enrollments/course-cards/BaseCourseCard.jsx", - "line": 316, + "line": 317, "column": 12, - "index": 9012 + "index": 9049 }, { "filePath": "src/components/dashboard/main-content/course-enrollments/course-cards/BaseCourseCard.jsx", - "line": 460, + "line": 478, "column": 8, - "index": 12892 + "index": 13366 }, { "filePath": "src/components/my-career/AddJobRole.jsx", - "line": 17, + "line": 16, "column": 2, - "index": 839 + "index": 747 }, { "filePath": "src/components/my-career/VisualizeCareer.jsx", @@ -27698,9 +28116,9 @@ }, { "filePath": "src/components/dashboard/main-content/course-enrollments/course-cards/BaseCourseCard.jsx", - "line": 307, + "line": 308, "column": 10, - "index": 8738 + "index": 8775 } ], "Popover": [ @@ -27786,9 +28204,9 @@ }, { "filePath": "src/components/dashboard/main-content/course-enrollments/CourseAssignmentAlert.jsx", - "line": 32, + "line": 34, "column": 6, - "index": 1032 + "index": 1066 }, { "filePath": "src/components/enterprise-user-subsidy/enterprise-offers/EnterpriseOffersBalanceAlert.jsx", @@ -27940,9 +28358,9 @@ "Dropdown": [ { "filePath": "src/components/dashboard/main-content/course-enrollments/course-cards/BaseCourseCard.jsx", - "line": 224, + "line": 225, "column": 10, - "index": 6192 + "index": 6229 }, { "filePath": "src/components/error-page/ErrorPageHeader.jsx", @@ -27972,9 +28390,9 @@ "Dropdown.Toggle": [ { "filePath": "src/components/dashboard/main-content/course-enrollments/course-cards/BaseCourseCard.jsx", - "line": 225, + "line": 226, "column": 12, - "index": 6215 + "index": 6252 }, { "filePath": "src/components/error-page/ErrorPageHeader.jsx", @@ -28004,25 +28422,25 @@ "IconButton": [ { "filePath": "src/components/dashboard/main-content/course-enrollments/course-cards/BaseCourseCard.jsx", - "line": 226, + "line": 227, "column": 18, - "index": 6250 + "index": 6287 } ], "MoreVert": [ { "filePath": "src/components/dashboard/main-content/course-enrollments/course-cards/BaseCourseCard.jsx", - "line": 227, + "line": 228, "column": 19, - "index": 6281 + "index": 6318 } ], "Dropdown.Menu": [ { "filePath": "src/components/dashboard/main-content/course-enrollments/course-cards/BaseCourseCard.jsx", - "line": 233, + "line": 234, "column": 12, - "index": 6507 + "index": 6544 }, { "filePath": "src/components/error-page/ErrorPageHeader.jsx", @@ -28052,9 +28470,9 @@ "Dropdown.Item": [ { "filePath": "src/components/dashboard/main-content/course-enrollments/course-cards/BaseCourseCard.jsx", - "line": 235, + "line": 236, "column": 16, - "index": 6582 + "index": 6619 }, { "filePath": "src/components/error-page/ErrorPageHeader.jsx", @@ -28120,17 +28538,17 @@ "Tooltip": [ { "filePath": "src/components/dashboard/main-content/course-enrollments/course-cards/BaseCourseCard.jsx", - "line": 311, + "line": 312, "column": 14, - "index": 8860 + "index": 8897 } ], "InfoOutline": [ { "filePath": "src/components/dashboard/main-content/course-enrollments/course-cards/BaseCourseCard.jsx", - "line": 316, + "line": 317, "column": 23, - "index": 9023 + "index": 9060 }, { "filePath": "src/components/skills-quiz/JobDescriptions.jsx", @@ -28142,15 +28560,15 @@ "Info": [ { "filePath": "src/components/dashboard/main-content/course-enrollments/course-cards/BaseCourseCard.jsx", - "line": 460, + "line": 478, "column": 19, - "index": 12903 + "index": 13377 }, { "filePath": "src/components/dashboard/main-content/course-enrollments/CourseAssignmentAlert.jsx", - "line": 23, + "line": 25, "column": 12, - "index": 822 + "index": 856 } ], "Input": [ @@ -28256,9 +28674,9 @@ "Collapsible": [ { "filePath": "src/components/dashboard/main-content/course-enrollments/CourseSection.jsx", - "line": 145, + "line": 143, "column": 8, - "index": 4074 + "index": 4052 }, { "filePath": "src/components/pathway-progress/PathwayStep.jsx", @@ -28450,17 +28868,17 @@ "Plus": [ { "filePath": "src/components/my-career/AddJobRole.jsx", - "line": 18, + "line": 17, "column": 9, - "index": 854 + "index": 762 } ], "TransitionReplace": [ { "filePath": "src/components/my-career/AddJobRole.jsx", - "line": 74, - "column": 18, - "index": 2407 + "line": 62, + "column": 16, + "index": 1967 }, { "filePath": "src/components/my-career/VisualizeCareer.jsx", @@ -42565,6 +42983,12 @@ "column": 16, "index": 1305 }, + { + "filePath": "src/instructions/proctored_exam/download-instructions/LtiProviderInstructions.jsx", + "line": 10, + "column": 4, + "index": 321 + }, { "filePath": "src/instructions/proctored_exam/ErrorProctoredExamInstructions.jsx", "line": 34, @@ -42605,9 +43029,9 @@ }, { "filePath": "src/instructions/proctored_exam/download-instructions/index.jsx", - "line": 104, + "line": 106, "column": 6, - "index": 3567 + "index": 3644 }, { "filePath": "src/instructions/proctored_exam/OnboardingErrorExamInstructions.jsx", @@ -43142,9 +43566,9 @@ }, { "filePath": "src/packages/careers-page/components/Hero/index.jsx", - "line": 40, + "line": 19, "column": 6, - "index": 1014 + "index": 518 }, { "filePath": "src/packages/careers-page/template/CareersPage/index.jsx", @@ -43168,7 +43592,7 @@ "filePath": "src/packages/common/ui/Form/StandaloneHubspotCaptureForm/index.jsx", "line": 44, "column": 6, - "index": 1550 + "index": 1545 }, { "filePath": "src/packages/common/ui/Hero/variants/BootcampVariant.jsx", @@ -43184,9 +43608,9 @@ }, { "filePath": "src/packages/degree-page/components/TabSections/index.jsx", - "line": 173, + "line": 178, "column": 6, - "index": 5943 + "index": 6280 }, { "filePath": "src/packages/degree-page/template/DegreeDetailPage/index.jsx", @@ -43408,7 +43832,7 @@ "filePath": "src/packages/modular-page/modules/ProgramReferralModule/index.jsx", "line": 32, "column": 6, - "index": 942 + "index": 937 }, { "filePath": "src/packages/modular-page/modules/UpcomingProgramModule/index.jsx", @@ -43430,9 +43854,9 @@ }, { "filePath": "src/packages/open-course-page/components/CourseHeader/index.jsx", - "line": 53, + "line": 50, "column": 6, - "index": 1504 + "index": 1360 }, { "filePath": "src/packages/open-course-page/components/CourseMain/variants/DesktopVariant.jsx", @@ -44049,7 +44473,25 @@ "index": 11058 }, { - "filePath": "src/packages/modular-page/modules/BootCampCurriculumModule/index.jsx", + "filePath": "src/packages/modular-page/modules/AccordionTextModule/components/CollapsibleTextTabModule.jsx", + "line": 42, + "column": 12, + "index": 1460 + }, + { + "filePath": "src/packages/modular-page/modules/AccordionTextModule/components/CollapsibleTextTabModule.jsx", + "line": 121, + "column": 14, + "index": 3756 + }, + { + "filePath": "src/packages/modular-page/modules/AccordionTextModule/components/CurriculumModule.jsx", + "line": 93, + "column": 12, + "index": 3206 + }, + { + "filePath": "src/packages/modular-page/modules/BootCampCurriculumModule/index.js", "line": 88, "column": 12, "index": 3159 @@ -44100,13 +44542,13 @@ "filePath": "src/packages/modular-page/modules/ProgramReferralModule/index.jsx", "line": 66, "column": 16, - "index": 2234 + "index": 2229 }, { "filePath": "src/packages/modular-page/modules/ProgramReferralModule/index.jsx", "line": 79, "column": 16, - "index": 2748 + "index": 2743 }, { "filePath": "src/packages/modular-page/modules/StatisticIconModule/index.jsx", @@ -44393,7 +44835,25 @@ "index": 3742 }, { - "filePath": "src/packages/modular-page/modules/BootCampCurriculumModule/index.jsx", + "filePath": "src/packages/modular-page/modules/AccordionTextModule/components/CollapsibleTextTabModule.jsx", + "line": 43, + "column": 19, + "index": 1485 + }, + { + "filePath": "src/packages/modular-page/modules/AccordionTextModule/components/CollapsibleTextTabModule.jsx", + "line": 122, + "column": 21, + "index": 3783 + }, + { + "filePath": "src/packages/modular-page/modules/AccordionTextModule/components/CurriculumModule.jsx", + "line": 94, + "column": 19, + "index": 3231 + }, + { + "filePath": "src/packages/modular-page/modules/BootCampCurriculumModule/index.js", "line": 89, "column": 19, "index": 3184 @@ -45000,7 +45460,7 @@ "filePath": "src/packages/common/ui/Footer/index.jsx", "line": 341, "column": 18, - "index": 11447 + "index": 11455 }, { "filePath": "src/packages/common/ui/xpert/experiments/ChatFloatingActionButton/Survey/index.jsx", @@ -45097,7 +45557,13 @@ "index": 3590 }, { - "filePath": "src/packages/modular-page/modules/BootCampCurriculumModule/index.jsx", + "filePath": "src/packages/modular-page/modules/AccordionTextModule/components/CurriculumModule.jsx", + "line": 75, + "column": 16, + "index": 2419 + }, + { + "filePath": "src/packages/modular-page/modules/BootCampCurriculumModule/index.js", "line": 70, "column": 16, "index": 2352 From 16a006b803a3a9314414f764e95b56aba31005e4 Mon Sep 17 00:00:00 2001 From: Peter Kulko <93188219+PKulkoRaccoonGang@users.noreply.github.com> Date: Fri, 22 Dec 2023 10:37:49 +0200 Subject: [PATCH 09/23] fix: correctly display filtered items count in Select all button in the DataTable component (#2929) * fix: fixed the Select all button in the DataTable component * refactor: refactoring after review --- src/DataTable/index.jsx | 1 + .../selection/BaseSelectionStatus.jsx | 4 +-- src/DataTable/tests/DataTable.test.jsx | 31 +++++++++++++++++++ 3 files changed, 34 insertions(+), 2 deletions(-) diff --git a/src/DataTable/index.jsx b/src/DataTable/index.jsx index f41ad3c5fa..3524a13534 100644 --- a/src/DataTable/index.jsx +++ b/src/DataTable/index.jsx @@ -187,6 +187,7 @@ function DataTable({ const enhancedInstance = { ...instance, + manualFilters, itemCount, numBreakoutFilters, bulkActions, diff --git a/src/DataTable/selection/BaseSelectionStatus.jsx b/src/DataTable/selection/BaseSelectionStatus.jsx index 80039b245c..a7fec5ad2f 100644 --- a/src/DataTable/selection/BaseSelectionStatus.jsx +++ b/src/DataTable/selection/BaseSelectionStatus.jsx @@ -22,11 +22,11 @@ function BaseSelectionStatus({ }) { const { itemCount, filteredRows, isPaginated, state, - isSelectable, maxSelectedRows, + isSelectable, maxSelectedRows, manualFilters, } = useContext(DataTableContext); const hasAppliedFilters = state?.filters?.length > 0; const isAllRowsSelected = numSelectedRows === itemCount; - const filteredItems = filteredRows?.length || itemCount; + const filteredItems = manualFilters ? itemCount : (filteredRows?.length || itemCount); const hasMaxSelectedRows = isSelectable && maxSelectedRows; const intlAllSelectedText = allSelectedText || ( diff --git a/src/DataTable/tests/DataTable.test.jsx b/src/DataTable/tests/DataTable.test.jsx index 212b5e348b..b56e6bece9 100644 --- a/src/DataTable/tests/DataTable.test.jsx +++ b/src/DataTable/tests/DataTable.test.jsx @@ -6,6 +6,8 @@ import { IntlProvider } from 'react-intl'; import DataTable from '..'; import DataTableContext from '../DataTableContext'; +import { TextFilter } from '../..'; +import { SELECT_ALL_TEST_ID } from '../selection/data/constants'; const additionalColumns = [ { @@ -198,6 +200,35 @@ describe('', () => { expect(spinner).toBeTruthy(); }); + it('displays the total number of items when applying filter and selecting all items', async () => { + const propsWithSelection = { + ...props, + isSelectable: true, + isFilterable: true, + manualFilters: true, + defaultColumnValues: { Filter: TextFilter }, + isPaginated: true, + initialState: { pageSize: 3, pageIndex: 0 }, + pageCount: 3, + fetchData: jest.fn(), + }; + + render(); + const filtersButton = screen.getByRole('button', { name: 'Filters' }); + + await userEvent.click(filtersButton); + + const searchFormControl = screen.getByPlaceholderText('Search coat color'); + await userEvent.type(searchFormControl, 'brown tabby'); + + const selectAllCheckBox = screen.getByTitle('Toggle All Current Page Rows Selected'); + await userEvent.click(selectAllCheckBox); + + const selectAllButton = screen.getByTestId(SELECT_ALL_TEST_ID); + // A filtered array is returned from the backend, + // and the element counter displays its length. + expect(selectAllButton).toHaveTextContent('Select all 7'); + }); describe('[legacy] controlled table selections', () => { it('passes initial controlledTableSelections to context', async () => { From de070d2a98eba095075da440e2e3fa78d29b0754 Mon Sep 17 00:00:00 2001 From: sundasnoreen12 <72802712+sundasnoreen12@users.noreply.github.com> Date: Fri, 22 Dec 2023 13:41:08 +0500 Subject: [PATCH 10/23] feat: added sidebar filled and outlined icons (#2952) * feat: added new webBlack icon in es5 and js * fix: added web black svg in svg folder * feat: added new svg for sidebar filled and outlined --- icons/es5/RightSidebarFilled.js | 15 +++++++++++++++ icons/es5/RightSidebarOutlined.js | 15 +++++++++++++++ icons/es5/index.js | 2 ++ icons/jsx/RightSidebarFilled.jsx | 19 +++++++++++++++++++ icons/jsx/RightSidebarOutlined.jsx | 19 +++++++++++++++++++ icons/jsx/index.jsx | 2 ++ icons/svg/right_sidebar_filled.svg | 3 +++ icons/svg/right_sidebar_outlined.svg | 3 +++ 8 files changed, 78 insertions(+) create mode 100644 icons/es5/RightSidebarFilled.js create mode 100644 icons/es5/RightSidebarOutlined.js create mode 100644 icons/jsx/RightSidebarFilled.jsx create mode 100644 icons/jsx/RightSidebarOutlined.jsx create mode 100644 icons/svg/right_sidebar_filled.svg create mode 100644 icons/svg/right_sidebar_outlined.svg diff --git a/icons/es5/RightSidebarFilled.js b/icons/es5/RightSidebarFilled.js new file mode 100644 index 0000000000..b1528e1ef8 --- /dev/null +++ b/icons/es5/RightSidebarFilled.js @@ -0,0 +1,15 @@ +function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); } +import * as React from "react"; +const SvgRightSidebarFilled = props => /*#__PURE__*/React.createElement("svg", _extends({ + width: 24, + height: 24, + viewBox: "0 0 24 24", + fill: "none", + xmlns: "http://www.w3.org/2000/svg" +}, props), /*#__PURE__*/React.createElement("path", { + fillRule: "evenodd", + clipRule: "evenodd", + d: "M2 22V2h20v20H2ZM14 4H4v16h10V4Z", + fill: "currentColor" +})); +export default SvgRightSidebarFilled; \ No newline at end of file diff --git a/icons/es5/RightSidebarOutlined.js b/icons/es5/RightSidebarOutlined.js new file mode 100644 index 0000000000..204ad4498d --- /dev/null +++ b/icons/es5/RightSidebarOutlined.js @@ -0,0 +1,15 @@ +function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); } +import * as React from "react"; +const SvgRightSidebarOutlined = props => /*#__PURE__*/React.createElement("svg", _extends({ + width: 24, + height: 24, + viewBox: "0 0 24 24", + fill: "none", + xmlns: "http://www.w3.org/2000/svg" +}, props), /*#__PURE__*/React.createElement("path", { + fillRule: "evenodd", + clipRule: "evenodd", + d: "M2 2v20h20V2H2Zm18 2h-4v16h4V4ZM4 4h10v16H4V4Z", + fill: "currentColor" +})); +export default SvgRightSidebarOutlined; \ No newline at end of file diff --git a/icons/es5/index.js b/icons/es5/index.js index 5c2584f6c1..3abb44188a 100644 --- a/icons/es5/index.js +++ b/icons/es5/index.js @@ -1694,6 +1694,8 @@ export { default as RestoreFromTrash } from "./RestoreFromTrash"; export { default as RestorePage } from "./RestorePage"; export { default as Reviews } from "./Reviews"; export { default as RiceBowl } from "./RiceBowl"; +export { default as RightSidebarFilled } from "./RightSidebarFilled"; +export { default as RightSidebarOutlined } from "./RightSidebarOutlined"; export { default as RingVolume } from "./RingVolume"; export { default as Rocket } from "./Rocket"; export { default as RocketLaunch } from "./RocketLaunch"; diff --git a/icons/jsx/RightSidebarFilled.jsx b/icons/jsx/RightSidebarFilled.jsx new file mode 100644 index 0000000000..e52ff043b9 --- /dev/null +++ b/icons/jsx/RightSidebarFilled.jsx @@ -0,0 +1,19 @@ +import * as React from "react"; +const SvgRightSidebarFilled = (props) => ( + + + +); +export default SvgRightSidebarFilled; diff --git a/icons/jsx/RightSidebarOutlined.jsx b/icons/jsx/RightSidebarOutlined.jsx new file mode 100644 index 0000000000..b331b1600f --- /dev/null +++ b/icons/jsx/RightSidebarOutlined.jsx @@ -0,0 +1,19 @@ +import * as React from "react"; +const SvgRightSidebarOutlined = (props) => ( + + + +); +export default SvgRightSidebarOutlined; diff --git a/icons/jsx/index.jsx b/icons/jsx/index.jsx index db1665123c..006ac5a909 100644 --- a/icons/jsx/index.jsx +++ b/icons/jsx/index.jsx @@ -1694,6 +1694,8 @@ export { default as RestoreFromTrash } from "./RestoreFromTrash"; export { default as RestorePage } from "./RestorePage"; export { default as Reviews } from "./Reviews"; export { default as RiceBowl } from "./RiceBowl"; +export { default as RightSidebarFilled } from "./RightSidebarFilled"; +export { default as RightSidebarOutlined } from "./RightSidebarOutlined"; export { default as RingVolume } from "./RingVolume"; export { default as Rocket } from "./Rocket"; export { default as RocketLaunch } from "./RocketLaunch"; diff --git a/icons/svg/right_sidebar_filled.svg b/icons/svg/right_sidebar_filled.svg new file mode 100644 index 0000000000..de0ff7d1bc --- /dev/null +++ b/icons/svg/right_sidebar_filled.svg @@ -0,0 +1,3 @@ + + + diff --git a/icons/svg/right_sidebar_outlined.svg b/icons/svg/right_sidebar_outlined.svg new file mode 100644 index 0000000000..d40817ff1c --- /dev/null +++ b/icons/svg/right_sidebar_outlined.svg @@ -0,0 +1,3 @@ + + + From e3a34e1ed017fdfed356a3067913411cded96920 Mon Sep 17 00:00:00 2001 From: Peter Kulko <93188219+PKulkoRaccoonGang@users.noreply.github.com> Date: Fri, 22 Dec 2023 10:49:04 +0200 Subject: [PATCH 11/23] refactor: colocate segment events (#2840) * refactor: segment events refactoring * refactor: alternative refactoring variant for event segments * refactor: some refactoring * refactor: refactoring after review * refactor: refactoring after review * refactor: refactoring after review * refactor: corrected settings changed event * refactor: added segment constant for component generator --- .../functions/trackGenerateComponent.js | 3 +- www/segment-events/constants.js | 44 +++++++++++++++++++ www/segment-events/index.js | 3 ++ www/segment-events/utils.js | 8 ++++ www/src/components/CodeBlock.tsx | 20 ++++++--- www/src/components/IconsTable.tsx | 3 +- www/src/components/LeaveFeedback.tsx | 5 +-- www/src/components/Menu.tsx | 13 +++--- www/src/components/PageEditBtn/index.tsx | 5 +-- www/src/components/insights/UsagesList.tsx | 8 ++-- www/src/context/SettingsContext.tsx | 9 +++- www/src/pages/foundations/elevation.jsx | 11 ++--- www/src/pages/insights.tsx | 3 +- www/src/pages/playground.tsx | 3 +- 14 files changed, 105 insertions(+), 33 deletions(-) create mode 100644 www/segment-events/constants.js create mode 100644 www/segment-events/index.js create mode 100644 www/segment-events/utils.js diff --git a/www/netlify/functions/trackGenerateComponent.js b/www/netlify/functions/trackGenerateComponent.js index b0b29ed3b3..5f44db94a7 100644 --- a/www/netlify/functions/trackGenerateComponent.js +++ b/www/netlify/functions/trackGenerateComponent.js @@ -1,5 +1,6 @@ const { v4: uuidv4 } = require('uuid'); const Analytics = require('analytics-node'); +const { COMPONENT_GENERATED_EVENT } = require('../../segment-events'); const analytics = new Analytics(process.env.SEGMENT_KEY); @@ -12,7 +13,7 @@ exports.handler = async function eventHandler(event) { // dispatch event to Segment analytics.track({ anonymousId: uuidv4(), - event: 'openedx.paragon.functions.track-generate-component.created', + event: COMPONENT_GENERATED_EVENT, properties: { componentName }, }); diff --git a/www/segment-events/constants.js b/www/segment-events/constants.js new file mode 100644 index 0000000000..728aa08ef0 --- /dev/null +++ b/www/segment-events/constants.js @@ -0,0 +1,44 @@ +/** + * Events are identified by the following structured pattern: + * openedx.paragon.event_environment.event_name.event_action + */ + +export const ICON_COPIED_EVENT = 'openedx.paragon.docs.icons-table.selected-icon.copied'; +export const LEAVE_FEEDBACK_CLICKED_EVENT = 'openedx.paragon.docs.leave-feedback.clicked'; +export const CONTRAST_CHECKER_CLICKED_EVENT = 'openedx.paragon.docs.menu.tools.visit-contrast-checker.clicked'; +export const PAGE_EDIT_BTN_CLICKED_EVENT = 'openedx.paragon.docs.page-edit.clicked'; +export const COMPONENT_GENERATED_EVENT = 'openedx.paragon.functions.track-generate-component.created'; + +export const PLAYGROUND_EVENTS = { + LINK_CLICKED: 'openedx.paragon.docs.menu.playground.visit-playground.clicked', + URL_COPIED: 'openedx.paragon.docs.playground.copy-url.copied', +}; + +export const SHADOW_GENERATOR_LAYER_EVENTS = { + ENABLED: 'openedx.paragon.docs.elevation.shadow-generator.layer.enabled', + DISABLED: 'openedx.paragon.docs.elevation.shadow-generator.layer.disabled', + REMOVED: 'openedx.paragon.docs.elevation.shadow-generator.layer.removed', + ADDED: 'openedx.paragon.docs.elevation.shadow-generator.layer.added', + UPDATED: 'openedx.paragon.docs.elevation.shadow-generator.layer.updated', +}; + +export const SETTINGS_EVENTS = { + OPENED: 'openedx.paragon.docs.settings.opened', + CLOSED: 'openedx.paragon.docs.settings.closed', + CHANGED: 'openedx.paragon.docs.setting.changed', +}; + +export const EXAMPLE_CODE_BLOCK_WITH_HEADING_EVENTS = { + CLOSED: 'openedx.paragon.docs.example-code-block.closed', + OPENED: 'openedx.paragon.docs.example-code-block.opened', +}; + +export const EXAMPLE_CODE_BLOCK_WITHOUT_HEADING_EVENTS = { + CLOSED: 'openedx.paragon.docs.example-code-block.without-heading.closed', + OPENED: 'openedx.paragon.docs.example-code-block.without-heading.opened', +}; + +export const USAGE_INSIGHTS_EVENTS = { + TAB_CLICKED: 'openedx.paragon.docs.usage-insights.tab.clicked', + COMPONENT_LINK_CLICKED: 'openedx.paragon.docs.usage-insights.component-usage-link.clicked', +}; diff --git a/www/segment-events/index.js b/www/segment-events/index.js new file mode 100644 index 0000000000..dfe6d76180 --- /dev/null +++ b/www/segment-events/index.js @@ -0,0 +1,3 @@ +export * from './constants'; + +export { sendUserAnalyticsEvent } from './utils'; diff --git a/www/segment-events/utils.js b/www/segment-events/utils.js new file mode 100644 index 0000000000..3db5077762 --- /dev/null +++ b/www/segment-events/utils.js @@ -0,0 +1,8 @@ +function sendUserAnalyticsEvent(eventName, context) { + if (context) { + return global.analytics.track(eventName, context); + } + return global.analytics.track(eventName); +} + +module.exports = { sendUserAnalyticsEvent }; diff --git a/www/src/components/CodeBlock.tsx b/www/src/components/CodeBlock.tsx index b63c3e408a..d5b7460e1e 100644 --- a/www/src/components/CodeBlock.tsx +++ b/www/src/components/CodeBlock.tsx @@ -21,6 +21,11 @@ import { FormattedMessage, useIntl } from 'react-intl'; import * as ParagonReact from '~paragon-react'; import * as ParagonIcons from '~paragon-icons'; import { ContentCopy } from '~paragon-icons'; +import { + EXAMPLE_CODE_BLOCK_WITH_HEADING_EVENTS, + EXAMPLE_CODE_BLOCK_WITHOUT_HEADING_EVENTS, + sendUserAnalyticsEvent, +} from '../../segment-events'; import MiyazakiCard from './exampleComponents/MiyazakiCard'; import HipsterIpsum from './exampleComponents/HipsterIpsum'; import ExamplePropsForm from './exampleComponents/ExamplePropsForm'; @@ -64,16 +69,19 @@ function CollapsibleLiveEditor({ children, clickToCopy, handleCodeChange }: Coll const headingElement = getCodeBlockHeading(e.target); if (!headingElement) { - global.analytics.track(`openedx.paragon.docs.ui.example-code-block.${collapseIsOpen ? 'closed' : 'opened'}`, { - value: `${componentNameAndCategory}id-not-generated`, - }); + const event = collapseIsOpen + ? EXAMPLE_CODE_BLOCK_WITHOUT_HEADING_EVENTS.CLOSED + : EXAMPLE_CODE_BLOCK_WITHOUT_HEADING_EVENTS.OPENED; + sendUserAnalyticsEvent(event, { value: `${componentNameAndCategory}id-not-generated` }); return; } - global.analytics.track(`openedx.paragon.docs.ui.example-code-block.${collapseIsOpen ? 'closed' : 'opened'}`, { - value: `${componentNameAndCategory}${headingElement.id}`, - }); + const event = collapseIsOpen + ? EXAMPLE_CODE_BLOCK_WITH_HEADING_EVENTS.CLOSED + : EXAMPLE_CODE_BLOCK_WITH_HEADING_EVENTS.OPENED; + + sendUserAnalyticsEvent(event, { value: `${componentNameAndCategory}${headingElement.id}` }); }; return ( diff --git a/www/src/components/IconsTable.tsx b/www/src/components/IconsTable.tsx index a3f6a2a8c7..cff6c7cbc5 100644 --- a/www/src/components/IconsTable.tsx +++ b/www/src/components/IconsTable.tsx @@ -3,6 +3,7 @@ import PropTypes from 'prop-types'; import debounce from 'lodash.debounce'; import { Icon, SearchField, Toast } from '~paragon-react'; import * as IconComponents from '~paragon-icons'; +import { ICON_COPIED_EVENT, sendUserAnalyticsEvent } from '../../segment-events'; const WINDOW_HEIGHT = 2400; const ROW_HEIGHT = 100; @@ -75,7 +76,7 @@ function IconsTable({ iconNames }) { const copyToClipboard = (content) => { navigator.clipboard.writeText(content); setShowToast(true); - global.analytics.track('openedx.paragon.docs.icons-table.selected-icon.copied', { name: currentIcon }); + sendUserAnalyticsEvent(ICON_COPIED_EVENT, { name: currentIcon }); }; const handleChangeSearchValue = useMemo(() => debounce(setSearchValue, 500, { leading: false }), []); diff --git a/www/src/components/LeaveFeedback.tsx b/www/src/components/LeaveFeedback.tsx index de42cb9133..68068de9f5 100644 --- a/www/src/components/LeaveFeedback.tsx +++ b/www/src/components/LeaveFeedback.tsx @@ -2,6 +2,7 @@ import React, { AnchorHTMLAttributes } from 'react'; import PropTypes from 'prop-types'; import { Nav, Button, Hyperlink } from '~paragon-react'; import { useLocation } from '@reach/router'; +import { LEAVE_FEEDBACK_CLICKED_EVENT, sendUserAnalyticsEvent } from '../../segment-events'; export interface LeaveFeedbackProps extends Partial> { isNavLink?: boolean; @@ -12,9 +13,7 @@ function LeaveFeedback({ isNavLink, ...props }: LeaveFeedbackProps) { const FEEDBACK_URL = `https://github.com/openedx/paragon/issues/new?title=%5Bparagon-openedx.netlify.app%5D%20Feedback%20(on%20${location.pathname})&labels=docs&template=feedback_template.md`; const leaveFeedbackLinkTitle = 'Leave feedback'; - const handleLinkFeedbackClick = () => { - global.analytics.track('openedx.paragon.docs.leave_feedback.clicked'); - }; + const handleLinkFeedbackClick = () => sendUserAnalyticsEvent(LEAVE_FEEDBACK_CLICKED_EVENT); if (isNavLink) { return ( diff --git a/www/src/components/Menu.tsx b/www/src/components/Menu.tsx index 74afa7a0b3..e80eade226 100644 --- a/www/src/components/Menu.tsx +++ b/www/src/components/Menu.tsx @@ -16,6 +16,11 @@ import classNames from 'classnames'; import Search from './Search'; import { SettingsContext } from '../context/SettingsContext'; import { THEMES } from '../../theme-config'; +import { + PLAYGROUND_EVENTS, + sendUserAnalyticsEvent, + CONTRAST_CHECKER_CLICKED_EVENT, +} from '../../segment-events'; import { FOUNDATION_PAGES } from '../config'; // MDX transforms markdown generated by gatsby-transformer-react-docgen @@ -145,13 +150,9 @@ function MenuComponentListCategory({ children, title }: IMenuComponentListCatego ); } -const handlePlaygroundClick = () => { - global.analytics.track('openedx.paragon.docs.menu.playground.visit_playground.clicked'); -}; +const handlePlaygroundClick = () => sendUserAnalyticsEvent(PLAYGROUND_EVENTS.LINK_CLICKED); -const handleContrastCheckerClick = () => { - global.analytics.track('openedx.paragon.docs.menu.tools.visit_contrast_checker.clicked'); -}; +const handleContrastCheckerClick = () => sendUserAnalyticsEvent(CONTRAST_CHECKER_CLICKED_EVENT); MenuComponentListCategory.propTypes = { children: PropTypes.node.isRequired, diff --git a/www/src/components/PageEditBtn/index.tsx b/www/src/components/PageEditBtn/index.tsx index 39821143fd..ba22e8ab22 100644 --- a/www/src/components/PageEditBtn/index.tsx +++ b/www/src/components/PageEditBtn/index.tsx @@ -1,6 +1,7 @@ import React, { AnchorHTMLAttributes } from 'react'; import PropTypes from 'prop-types'; import { Button, Hyperlink, Nav } from '~paragon-react'; +import { PAGE_EDIT_BTN_CLICKED_EVENT, sendUserAnalyticsEvent } from '../../../segment-events'; export interface PageEditBtnProps extends Partial> { githubEditPath?: string, @@ -10,9 +11,7 @@ export interface PageEditBtnProps extends Partial { - global.analytics.track('openedx.paragon.docs.page_edit.clicked'); - }; + const handlePageEditBtnClick = () => sendUserAnalyticsEvent(PAGE_EDIT_BTN_CLICKED_EVENT); if (isNavLink) { return ( diff --git a/www/src/components/insights/UsagesList.tsx b/www/src/components/insights/UsagesList.tsx index b3a5115d2e..de179e5969 100644 --- a/www/src/components/insights/UsagesList.tsx +++ b/www/src/components/insights/UsagesList.tsx @@ -1,6 +1,7 @@ import React from 'react'; import PropTypes from 'prop-types'; import { Hyperlink } from '~paragon-react'; +import { USAGE_INSIGHTS_EVENTS, sendUserAnalyticsEvent } from '../../../segment-events'; type UsagesType = { filePath: string, @@ -21,10 +22,9 @@ export default function UsagesList({ projectName, } : UsagesListPropTypes) { const handleUsageLinkClick = (linkToUsage) => { - global.analytics.track( - 'openedx.paragon.docs.usage-insights.component-usage-link.clicked', - { project: projectName, component: componentName, linkToUsage }, - ); + sendUserAnalyticsEvent(USAGE_INSIGHTS_EVENTS.COMPONENT_LINK_CLICKED, { + project: projectName, component: componentName, linkToUsage, + }); }; return ( diff --git a/www/src/context/SettingsContext.tsx b/www/src/context/SettingsContext.tsx index d902d452fe..d05cef5ede 100644 --- a/www/src/context/SettingsContext.tsx +++ b/www/src/context/SettingsContext.tsx @@ -5,6 +5,7 @@ import { IntlProvider } from 'react-intl'; import { messages } from '~paragon-react'; import { THEMES, DEFAULT_THEME } from '../../theme-config'; +import { SETTINGS_EVENTS, sendUserAnalyticsEvent } from '../../segment-events'; export interface IDefaultValue { settings: { @@ -44,12 +45,16 @@ function SettingsContextProvider({ children }) { } setSettings(prevState => ({ ...prevState, [key]: value })); global.localStorage.setItem('pgn__settings', JSON.stringify({ ...settings, [key]: value })); - global.analytics.track(`openedx.paragon.docs.settings.${key}.changed`, { [key]: value }); + sendUserAnalyticsEvent(SETTINGS_EVENTS.CHANGED, { setting: key, value }); }; const toggleSettings = (value: boolean) => { + const event = value + ? SETTINGS_EVENTS.OPENED + : SETTINGS_EVENTS.CLOSED; + setShowSettings(value); - global.analytics.track(`openedx.paragon.docs.settings.${value ? 'opened' : 'closed'}`); + sendUserAnalyticsEvent(event); }; // this hook will be called after the first render, so we can safely access localStorage diff --git a/www/src/pages/foundations/elevation.jsx b/www/src/pages/foundations/elevation.jsx index da70a9f2e1..0b696ed65d 100644 --- a/www/src/pages/foundations/elevation.jsx +++ b/www/src/pages/foundations/elevation.jsx @@ -13,6 +13,7 @@ import { Close, WbSunny, DoDisturb } from '~paragon-icons'; import SEO from '../../components/SEO'; import Layout from '../../components/PageLayout'; import { SettingsContext } from '../../context/SettingsContext'; +import { sendUserAnalyticsEvent, SHADOW_GENERATOR_LAYER_EVENTS } from '../../../segment-events'; const boxShadowSides = ['down', 'up', 'right', 'left', 'centered']; const boxShadowLevels = [1, 2, 3, 4, 5]; @@ -86,7 +87,7 @@ function BoxShadowToolkit({ }); const updateBoxShadowModel = (property, value) => { - global.analytics.track('openedx.paragon.docs.elevation.generator.updated', { property, value }); + sendUserAnalyticsEvent(SHADOW_GENERATOR_LAYER_EVENTS.UPDATED, { property, value }); const newBoxShadowModel = { ...boxShadowModel, @@ -196,7 +197,7 @@ function BoxShadowGenerator() { }; const addNewBoxShadowLayer = () => { - global.analytics.track('openedx.paragon.elevation.generator.layer.added'); + sendUserAnalyticsEvent(SHADOW_GENERATOR_LAYER_EVENTS.ADDED); setBoxShadows([ ...boxShadows, { id: boxShadows[boxShadows.length - 1].id + 1, enabled: true, style: DEFAULT_BOX_SHADOW }, @@ -204,12 +205,12 @@ function BoxShadowGenerator() { }; const removeBoxShadowLayer = (toolkitId) => { - global.analytics.track('openedx.paragon.elevation.shadow-generator.layer.removed'); + sendUserAnalyticsEvent(SHADOW_GENERATOR_LAYER_EVENTS.REMOVED); setBoxShadows(boxShadows.filter((shadow) => shadow.id !== toolkitId)); }; const disableBoxShadowLayer = (toolkitId) => { - global.analytics.track('openedx.paragon.elevation.shadow-generator.layer.disabled'); + sendUserAnalyticsEvent(SHADOW_GENERATOR_LAYER_EVENTS.DISABLED); const updatedBoxShadows = boxShadows .map((shadow) => { if (shadow.id === toolkitId) { @@ -221,7 +222,7 @@ function BoxShadowGenerator() { }; const enableBoxShadowLayer = (toolkitId) => { - global.analytics.track('openedx.paragon.elevation.shadow-generator.layer.enabled'); + sendUserAnalyticsEvent(SHADOW_GENERATOR_LAYER_EVENTS.ENABLED); const updatedBoxShadows = boxShadows .map((shadow) => { if (shadow.id === toolkitId) { diff --git a/www/src/pages/insights.tsx b/www/src/pages/insights.tsx index a2d8626c89..cae9fd6227 100644 --- a/www/src/pages/insights.tsx +++ b/www/src/pages/insights.tsx @@ -18,6 +18,7 @@ import ComponentsUsage from '../components/insights/ComponentsUsage'; // @ts-ignore import dependentProjectsAnalysis from '../../../dependent-usage.json'; // eslint-disable-line +import { sendUserAnalyticsEvent, USAGE_INSIGHTS_EVENTS } from '../../segment-events'; import { INSIGHTS_TABS, INSIGHTS_PAGES } from '../config'; import componentsUsage from '../utils/componentsUsage'; import { IInsightsContext } from '../types/types'; @@ -63,7 +64,7 @@ export default function InsightsPage({ pageContext: { tab, githubEditPath } }: I const handleOnSelect = (value: string) => { if (value !== tab) { - global.analytics.track(`openedx.paragon.docs.insights.tabs.${value.toLowerCase().trim()}.clicked`); + sendUserAnalyticsEvent(USAGE_INSIGHTS_EVENTS.TAB_CLICKED, { tabName: value }); navigate(INSIGHTS_PAGES.find(item => item.tab === value).path); } }; diff --git a/www/src/pages/playground.tsx b/www/src/pages/playground.tsx index 9707676a47..77c2614215 100644 --- a/www/src/pages/playground.tsx +++ b/www/src/pages/playground.tsx @@ -14,6 +14,7 @@ import localforage from 'localforage'; import SEO from '../components/SEO'; import { SiteTitle } from '../components/header'; import { storageKey } from '../../playroom/constants'; +import { PLAYGROUND_EVENTS, sendUserAnalyticsEvent } from '../../segment-events'; const FEEDBACK_URL = 'https://github.com/openedx/paragon/issues/new?assignees=&labels=playground&template=feedback_template.md&title=[Playground]'; @@ -73,7 +74,7 @@ export default function Playground({ location }) { onClick={() => { setCopyUrlState('copied'); navigator.clipboard.writeText(location.href); - global.analytics.track('openedx.paragon.docs.playground.url-copied'); + sendUserAnalyticsEvent(PLAYGROUND_EVENTS.URL_COPIED); }} labels={{ default: 'Copy URL', From c4d91f26e7ecb333f2197411c3aa1eaab21351b4 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 22 Dec 2023 11:04:26 +0200 Subject: [PATCH 12/23] chore(deps-dev): bump @adobe/css-tools from 4.3.1 to 4.3.2 (#2882) Bumps [@adobe/css-tools](https://github.com/adobe/css-tools) from 4.2.0 to 4.3.2. - [Changelog](https://github.com/adobe/css-tools/blob/main/History.md) - [Commits](https://github.com/adobe/css-tools/commits) --- updated-dependencies: - dependency-name: "@adobe/css-tools" dependency-type: indirect ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package-lock.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index fb4108e6fe..22428e4a87 100644 --- a/package-lock.json +++ b/package-lock.json @@ -178,9 +178,9 @@ } }, "node_modules/@adobe/css-tools": { - "version": "4.3.1", - "resolved": "https://registry.npmjs.org/@adobe/css-tools/-/css-tools-4.3.1.tgz", - "integrity": "sha512-/62yikz7NLScCGAAST5SHdnjaDJQBDq0M2muyRTpf2VQhw6StBg2ALiu73zSJQ4fMVLA+0uBhBHAle7Wg+2kSg==", + "version": "4.3.2", + "resolved": "https://registry.npmjs.org/@adobe/css-tools/-/css-tools-4.3.2.tgz", + "integrity": "sha512-DA5a1C0gD/pLOvhv33YMrbf2FK3oUzwNl9oOJqE4XVjuEtt6XIakRcsd7eLiOSPkp1kTRQGICTA8cKra/vFbjw==", "dev": true }, "node_modules/@algolia/autocomplete-core": { From c402089d1ce3e7740344fb7ba43168e934c0087c Mon Sep 17 00:00:00 2001 From: edX requirements bot <49161187+edx-requirements-bot@users.noreply.github.com> Date: Fri, 22 Dec 2023 05:55:04 -0500 Subject: [PATCH 13/23] chore: update browserslist DB (#2944) Co-authored-by: adamstankiewicz --- package-lock.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index 22428e4a87..41e172f8a8 100644 --- a/package-lock.json +++ b/package-lock.json @@ -12703,9 +12703,9 @@ } }, "node_modules/caniuse-lite": { - "version": "1.0.30001568", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001568.tgz", - "integrity": "sha512-vSUkH84HontZJ88MiNrOau1EBrCqEQYgkC5gIySiDlpsm8sGVrhU7Kx4V6h0tnqaHzIHZv08HlJIwPbL4XL9+A==", + "version": "1.0.30001570", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001570.tgz", + "integrity": "sha512-+3e0ASu4sw1SWaoCtvPeyXp+5PsjigkSt8OXZbF9StH5pQWbxEjLAZE3n8Aup5udop1uRiKA7a4utUk/uoSpUw==", "funding": [ { "type": "opencollective", From 1e58c10f313a7c15b246df96094a2618950827ef Mon Sep 17 00:00:00 2001 From: Peter Kulko <93188219+PKulkoRaccoonGang@users.noreply.github.com> Date: Fri, 22 Dec 2023 12:55:51 +0200 Subject: [PATCH 14/23] docs: added links to props API for components from Bootstrap (#2945) * docs: added original bootstrap urls * refactor: code refacotring * refactor: code refactoring * refactor: refactoring after review * refactor: corrected bootstrap link text * refactor: corrected link to bootstrap docs --- src/Container/index.jsx | 4 +++ src/Dropdown/index.jsx | 4 +++ src/Form/FormSwitch.jsx | 3 +++ src/Hyperlink/index.jsx | 13 +++++----- src/Icon/index.jsx | 27 ++++++++++++-------- src/IconButton/index.jsx | 2 +- src/Layout/index.jsx | 5 +--- src/Modal/ModalDialog.jsx | 3 +++ src/Modal/index.jsx | 17 ++++++++----- src/Popover/README.md | 1 - src/Popover/index.jsx | 22 ++++++++-------- src/SearchField/SearchFieldAdvanced.jsx | 19 +++++++++----- src/SearchField/SearchFieldLabel.jsx | 6 ++--- src/SearchField/index.jsx | 1 - www/src/components/PropsTable.tsx | 34 ++++++++++++++++++++++++- 15 files changed, 110 insertions(+), 51 deletions(-) diff --git a/src/Container/index.jsx b/src/Container/index.jsx index 84f3192ac1..a2f38de7bb 100644 --- a/src/Container/index.jsx +++ b/src/Container/index.jsx @@ -28,11 +28,14 @@ Container.propTypes = { ...RBContainer.propTypes, /** Override the base element */ as: PropTypes.elementType, + /** Specifies the contents of the container */ children: PropTypes.node, /** Fill all available space at any breakpoint */ fluid: PropTypes.bool, /** Set the maximum width for the container */ size: PropTypes.oneOf(Object.keys(SIZE_CLASS_NAMES)), + /** Overrides underlying component base CSS class name */ + bsPrefix: PropTypes.string, }; Container.defaultProps = { @@ -40,6 +43,7 @@ Container.defaultProps = { children: undefined, fluid: true, size: undefined, + bsPrefix: 'container', }; export default Container; diff --git a/src/Dropdown/index.jsx b/src/Dropdown/index.jsx index dbc17f4174..d617929ca6 100644 --- a/src/Dropdown/index.jsx +++ b/src/Dropdown/index.jsx @@ -69,6 +69,7 @@ const Dropdown = React.forwardRef( ); }, ); + Dropdown.propTypes = { autoClose: PropTypes.oneOfType([ PropTypes.string, @@ -79,6 +80,7 @@ Dropdown.propTypes = { show: PropTypes.bool, variant: PropTypes.oneOf(['light', 'dark']), }; + Dropdown.defaultProps = { autoClose: true, className: '', @@ -127,9 +129,11 @@ Dropdown.Item = React.forwardRef( ); }, ); + Dropdown.Item.propTypes = { className: PropTypes.string, }; + Dropdown.Item.defaultProps = { className: undefined, }; diff --git a/src/Form/FormSwitch.jsx b/src/Form/FormSwitch.jsx index 59c5f8002b..7504933a4c 100644 --- a/src/Form/FormSwitch.jsx +++ b/src/Form/FormSwitch.jsx @@ -79,8 +79,11 @@ FormSwitch.propTypes = { children: PropTypes.node.isRequired, /** Specifies class name to append to the base element. */ className: PropTypes.string, + /** Specifies class name to append to the label element. */ labelClassName: PropTypes.string, + /** Specifies helper text to display below the switch. */ helperText: PropTypes.node, + /** Determines whether the label should float to the left when the switch is active. */ floatLabelLeft: PropTypes.bool, }; diff --git a/src/Hyperlink/index.jsx b/src/Hyperlink/index.jsx index cb21b3cc2c..7c4a61f882 100644 --- a/src/Hyperlink/index.jsx +++ b/src/Hyperlink/index.jsx @@ -101,18 +101,19 @@ Hyperlink.propTypes = { children: PropTypes.node.isRequired, /** Custom class names for the hyperlink */ className: PropTypes.string, - /** specifies where the link should open. The default behavior is `_self`, which means that the URL will be loaded into the same browsing context as the current one. If the target is `_blank` (opening a new window) `rel='noopener'` will be added to the anchor tag to prevent any potential [reverse tabnabbing attack](https://www.owasp.org/index.php/Reverse_Tabnabbing). - */ + /** specifies where the link should open. The default behavior is `_self`, which means that the URL will be + * loaded into the same browsing context as the current one. + * If the target is `_blank` (opening a new window) `rel='noopener'` will be added to the anchor tag to prevent + * any potential [reverse tabnabbing attack](https://www.owasp.org/index.php/Reverse_Tabnabbing). + */ target: PropTypes.string, /** specifies the callback function when the link is clicked */ onClick: PropTypes.func, - // eslint-disable-next-line max-len /** specifies the text for links with a `_blank` target (which loads the URL in a new browsing context). */ externalLinkAlternativeText: isRequiredIf( PropTypes.string, props => props.target === '_blank', ), - // eslint-disable-next-line max-len /** specifies the title for links with a `_blank` target (which loads the URL in a new browsing context). */ externalLinkTitle: isRequiredIf( PropTypes.string, @@ -120,9 +121,9 @@ Hyperlink.propTypes = { ), /** type of hyperlink */ variant: PropTypes.oneOf(['default', 'muted', 'brand']), - /** specify the link style. By default it will be underlined. */ + /** specify the link style. By default, it will be underlined. */ isInline: PropTypes.bool, - /** specify if we need to show launch Icon. By default it will be visible. */ + /** specify if we need to show launch Icon. By default, it will be visible. */ showLaunchIcon: PropTypes.bool, }; diff --git a/src/Icon/index.jsx b/src/Icon/index.jsx index cb01fb1ad0..482b37d03b 100644 --- a/src/Icon/index.jsx +++ b/src/Icon/index.jsx @@ -70,28 +70,35 @@ function Icon({ } Icon.propTypes = { - // eslint-disable-next-line max-len - /** An icon component to render. Example import of a Paragon icon component: `import { Check } from '@edx/paragon/dist/icon';` */ + /** + * An icon component to render. + * Example import of a Paragon icon component: `import { Check } from '@edx/paragon/icons';` + */ src: PropTypes.oneOfType([PropTypes.element, PropTypes.func]), /** HTML element attributes to pass through to the underlying svg element */ svgAttrs: PropTypes.shape({ 'aria-label': PropTypes.string, 'aria-labelledby': PropTypes.string, }), - // eslint-disable-next-line max-len - /** the `id` property of the Icon element, by default this value is generated with the `newId` function with the `prefix` of `Icon`. */ + /** + * the `id` property of the Icon element, by default this value is generated + * with the `newId` function with the `prefix` of `Icon`. + */ id: PropTypes.string, - // eslint-disable-next-line max-len /** The size of the icon. */ size: PropTypes.oneOf(['xs', 'sm', 'md', 'lg']), - // eslint-disable-next-line max-len /** A class name that will define what the Icon looks like. */ className: PropTypes.string, - // eslint-disable-next-line max-len - /** a boolean that determines the value of `aria-hidden` attribute on the Icon span, this value is `true` by default. */ + /** + * a boolean that determines the value of `aria-hidden` attribute on the Icon span, + * this value is `true` by default. + */ hidden: PropTypes.bool, - // eslint-disable-next-line max-len - /** a string or an element that will be used on a secondary span leveraging the `sr-only` style for screenreader only text, this value is `undefined` by default. This value is recommended for use unless the Icon is being used in a way that is purely decorative or provides no additional context for screen reader users. This field should be thought of the same way an `alt` attribute would be used for `image` tags. + /** + * a string or an element that will be used on a secondary span leveraging the `sr-only` style + * for screenreader only text, this value is `undefined` by default. This value is recommended for use unless + * the Icon is being used in a way that is purely decorative or provides no additional context for screen + * reader users. This field should be thought of the same way an `alt` attribute would be used for `image` tags. */ screenReaderText: PropTypes.oneOfType([PropTypes.string, PropTypes.element]), }; diff --git a/src/IconButton/index.jsx b/src/IconButton/index.jsx index acb22265e8..3c07593435 100644 --- a/src/IconButton/index.jsx +++ b/src/IconButton/index.jsx @@ -87,7 +87,7 @@ IconButton.propTypes = { alt: PropTypes.string.isRequired, /** Changes icon styles for dark background */ invertColors: PropTypes.bool, - /** Accepts a React fontawesome icon. https://fontawesome.com/how-to-use/on-the-web/using-with/react */ + /** Accepts a React fontawesome icon. */ icon: PropTypes.shape({ prefix: PropTypes.string, iconName: PropTypes.string, diff --git a/src/Layout/index.jsx b/src/Layout/index.jsx index 46fdbb553b..773b27b245 100644 --- a/src/Layout/index.jsx +++ b/src/Layout/index.jsx @@ -84,9 +84,6 @@ SIZES.forEach(size => { Layout.defaultProps[size] = sizeDefaultProps; }); -export { - Col, - Row, -}; +export { Col, Row }; Layout.Element = LayoutElement; export default Layout; diff --git a/src/Modal/ModalDialog.jsx b/src/Modal/ModalDialog.jsx index afbe102520..926d4bdcea 100644 --- a/src/Modal/ModalDialog.jsx +++ b/src/Modal/ModalDialog.jsx @@ -116,6 +116,9 @@ ModalDialog.propTypes = { * Prevent clicking on the backdrop to close the modal */ isBlocking: PropTypes.bool, + /** + * Specifies the z-index of the modal + */ zIndex: PropTypes.number, }; diff --git a/src/Modal/index.jsx b/src/Modal/index.jsx index ee9c8c1fb8..8e2070c38e 100644 --- a/src/Modal/index.jsx +++ b/src/Modal/index.jsx @@ -1,4 +1,3 @@ -/* eslint-disable max-len */ import React from 'react'; import ReactDOM from 'react-dom'; import classNames from 'classnames'; @@ -271,21 +270,26 @@ class Modal extends React.Component { Modal.propTypes = { /** specifies whether the modal renders open or closed on the initial render. It defaults to false. */ open: PropTypes.bool, - /** is the selector for an element in the dom which the modal should be rendered under. It uses querySelector to find the first element that matches that selector, and then creates a react portal to a div underneath the parent element. - */ + /** is the selector for an element in the dom which the modal should be rendered under. + * It uses querySelector to find the first element that matches that selector, + * and then creates a React portal to a div underneath the parent element. + */ parentSelector: PropTypes.string, /** a string or an element that is rendered inside of the modal title, above the modal body. */ title: PropTypes.oneOfType([PropTypes.string, PropTypes.element]).isRequired, /** a string or an element that is rendered inside of the modal body, between the title and the footer. */ body: PropTypes.oneOfType([PropTypes.string, PropTypes.element]).isRequired, - /** an array of either elements or shapes that take the form of the buttonPropTypes. See the [buttonPropTypes](https://github.com/openedx/paragon/blob/master/src/Button/index.jsx#L40) for a list of acceptable props to pass as part of a button. */ + /** an array of either elements or shapes that take the form of the buttonPropTypes. + * See the [buttonPropTypes](https://github.com/openedx/paragon/blob/master/src/Button/index.jsx#L40) + * for a list of acceptable props to pass as part of a button. */ buttons: PropTypes.arrayOf(PropTypes.oneOfType([ PropTypes.element, PropTypes.shape({}), // TODO: Only accept nodes in the future ])), /** specifies the display text of the default Close button. It defaults to "Close". */ closeText: PropTypes.oneOfType([PropTypes.string, PropTypes.element]), - /** a function that is called on close. It can be used to perform actions upon closing of the modal, such as restoring focus to the previous logical focusable element. */ + /** a function that is called on close. It can be used to perform actions upon closing of the modal, + * such as restoring focus to the previous logical focusable element. */ onClose: PropTypes.func.isRequired, variant: PropTypes.shape({ status: PropTypes.string, @@ -295,7 +299,8 @@ Modal.propTypes = { /** specifies whether a close button is rendered in the modal header. It defaults to true. */ renderHeaderCloseButton: PropTypes.bool, /** - * Specifies optional classes to add to the element with the '.modal-dialog' class. See Bootstrap documentation for possible classes. Some options: modal-lg, modal-sm, modal-dialog-centered + * Specifies optional classes to add to the element with the '.modal-dialog' class. + * See Bootstrap documentation for possible classes. Some options: modal-lg, modal-sm, modal-dialog-centered */ dialogClassName: PropTypes.string, }; diff --git a/src/Popover/README.md b/src/Popover/README.md index fab24b10f0..5f3036531b 100644 --- a/src/Popover/README.md +++ b/src/Popover/README.md @@ -3,7 +3,6 @@ title: 'Popover' type: 'component' components: - Popover -- WrapperPopover - PopoverTitle - PopoverContent categories: diff --git a/src/Popover/index.jsx b/src/Popover/index.jsx index 1636be5a93..07be9806a0 100644 --- a/src/Popover/index.jsx +++ b/src/Popover/index.jsx @@ -1,7 +1,7 @@ import React from 'react'; import PropTypes from 'prop-types'; import classNames from 'classnames'; -import Popover from 'react-bootstrap/Popover'; +import BasePopover from 'react-bootstrap/Popover'; import BasePopoverTitle from 'react-bootstrap/PopoverTitle'; import BasePopoverContent from 'react-bootstrap/PopoverContent'; @@ -13,18 +13,18 @@ const PLACEMENT_VARIANTS = [ 'right', ]; -const WrapperPopover = React.forwardRef(({ +const Popover = React.forwardRef(({ children, variant, ...props }, ref) => ( - {children} - + )); function PopoverTitle(props) { @@ -44,8 +44,8 @@ const commonPropTypes = { PopoverTitle.propTypes = commonPropTypes; PopoverContent.propTypes = commonPropTypes; -WrapperPopover.propTypes = { - ...Popover.propTypes, +Popover.propTypes = { + ...BasePopover.propTypes, /** An html id attribute, necessary for accessibility. */ id: PropTypes.string.isRequired, /** @@ -88,8 +88,8 @@ WrapperPopover.propTypes = { variant: PropTypes.string, }; -WrapperPopover.defaultProps = { - ...Popover.defaultProps, +Popover.defaultProps = { + ...BasePopover.defaultProps, placement: 'right', title: undefined, arrowProps: undefined, @@ -111,8 +111,8 @@ PopoverContent.defaultProps = { bsPrefix: 'popover-body', }; -WrapperPopover.Title = PopoverTitle; -WrapperPopover.Content = PopoverContent; +Popover.Title = PopoverTitle; +Popover.Content = PopoverContent; export { PopoverTitle, PopoverContent }; -export default WrapperPopover; +export default Popover; diff --git a/src/SearchField/SearchFieldAdvanced.jsx b/src/SearchField/SearchFieldAdvanced.jsx index a15de6bc53..75b261d05c 100644 --- a/src/SearchField/SearchFieldAdvanced.jsx +++ b/src/SearchField/SearchFieldAdvanced.jsx @@ -1,4 +1,3 @@ -/* eslint-disable max-len */ import React, { useRef, createContext, useState, useEffect, } from 'react'; @@ -138,27 +137,32 @@ SearchFieldAdvanced.propTypes = { onSubmit: PropTypes.func.isRequired, /** specifies a custom class name. */ className: PropTypes.string, - /** specifies a callback function for when the user loses focus in the `SearchField` component. The default is an empty function. For example: + /** specifies a callback function for when the user loses focus in the `SearchField` component. + * The default is an empty function. For example: ```jsx console.log(event)} /> ``` */ onBlur: PropTypes.func, - /** specifies a callback function for when the value in `SearchField` is changed by the user. The default is an empty function. For example: + /** specifies a callback function for when the value in `SearchField` is changed by the user. + * The default is an empty function. For example: ```jsx console.log(value)} /> ``` */ onChange: PropTypes.func, - /** specifies a callback function for when the value in `SearchField` is cleared by the user. The default is an empty function. For example: + /** specifies a callback function for when the value in `SearchField` is cleared by the user. + * The default is an empty function. For example: ```jsx console.log('search cleared')} /> ``` */ onClear: PropTypes.func, - /** specifies a callback function for when the user focuses in the `SearchField` component. The default is an empty function. For example: + /** specifies a callback function for when the user focuses in the `SearchField` component. + * The default is an empty function. For example: ```jsx console.log(event)} /> ``` */ onFocus: PropTypes.func, - /** specifies the screenreader text for both the clear and submit buttons (e.g., for i18n translations). The default is `{ label: 'search', clearButton: 'clear search', searchButton: 'submit search' }`. */ + /** specifies the screenreader text for both the clear and submit buttons (e.g., for i18n translations). + * The default is `{ label: 'search', clearButton: 'clear search', searchButton: 'submit search' }`. */ screenReaderText: PropTypes.shape({ label: PropTypes.oneOfType([PropTypes.string, PropTypes.element]).isRequired, submitButton: PropTypes.oneOfType([PropTypes.string, PropTypes.element]).isRequired, @@ -171,7 +175,8 @@ SearchFieldAdvanced.propTypes = { submit: PropTypes.element.isRequired, clear: PropTypes.element, }), - /** specifies the aria-label attribute on the form element. This is useful if you use the `SearchField` component more than once on a page. */ + /** specifies the aria-label attribute on the form element. This is useful if you use the `SearchField` component + * more than once on a page. */ formAriaLabel: PropTypes.string, /** Specifies whether the `SearchField` is disabled. */ disabled: PropTypes.bool, diff --git a/src/SearchField/SearchFieldLabel.jsx b/src/SearchField/SearchFieldLabel.jsx index 9986eb7234..c310328aa8 100644 --- a/src/SearchField/SearchFieldLabel.jsx +++ b/src/SearchField/SearchFieldLabel.jsx @@ -1,4 +1,3 @@ -/* eslint-disable max-len */ import React, { useContext } from 'react'; import PropTypes from 'prop-types'; import classNames from 'classnames'; @@ -21,8 +20,9 @@ function SearchFieldLabel({ children, ...props }) { SearchFieldLabel.propTypes = { /** - * specifies the label to use for the input field (e.g., for i18n translations). Note: if `children` is not provided, - * a screenreader-only label will be used in its placed based on the `screenReaderText.label` prop for `SearchField.Advanced`. + * specifies the label to use for the input field (e.g., for i18n translations). + * Note: if `children` is not provided, a screenreader-only label will be used in + * its placed based on the `screenReaderText.label` prop for `SearchField.Advanced`. */ children: PropTypes.oneOfType([PropTypes.string, PropTypes.element]), }; diff --git a/src/SearchField/index.jsx b/src/SearchField/index.jsx index af0fd63458..d4a842c111 100644 --- a/src/SearchField/index.jsx +++ b/src/SearchField/index.jsx @@ -1,4 +1,3 @@ -/* eslint-disable max-len */ import React, { useCallback } from 'react'; import PropTypes from 'prop-types'; diff --git a/www/src/components/PropsTable.tsx b/www/src/components/PropsTable.tsx index 5bd2d87a05..eff2e99199 100644 --- a/www/src/components/PropsTable.tsx +++ b/www/src/components/PropsTable.tsx @@ -1,11 +1,33 @@ import React from 'react'; import PropTypes from 'prop-types'; import { MDXRenderer } from 'gatsby-plugin-mdx'; -import { Badge, Card } from '~paragon-react'; +import { Badge, Card, Hyperlink } from '~paragon-react'; import PropType from './PropType'; const IGNORED_COMPONENT_PROPS = ['intl']; +const BOOTSTRAP_BASE_URL = 'https://react-bootstrap-v4.netlify.app/components'; + +const bootstrapLinks = { + Button: `${BOOTSTRAP_BASE_URL}/buttons/#button-props`, + Card: `${BOOTSTRAP_BASE_URL}/cards/#card-props`, + CardBody: `${BOOTSTRAP_BASE_URL}/cards/#card-body-props`, + CardDeck: `${BOOTSTRAP_BASE_URL}/cards/#card-deck-props`, + Dropdown: `${BOOTSTRAP_BASE_URL}/dropdowns/#dropdown-props`, + DropdownToggle: `${BOOTSTRAP_BASE_URL}/dropdowns/#dropdown-toggle-props`, + DropdownItem: `${BOOTSTRAP_BASE_URL}/dropdowns/#dropdown-item-props`, + DropdownMenu: `${BOOTSTRAP_BASE_URL}/dropdowns/#dropdown-menu-props`, + DropdownButton: `${BOOTSTRAP_BASE_URL}/dropdowns/#dropdown-button-props`, + FormControl: `${BOOTSTRAP_BASE_URL}/forms/#form-control-props`, + Nav: `${BOOTSTRAP_BASE_URL}/navs/#nav-props`, + Popover: `${BOOTSTRAP_BASE_URL}/overlays/#popover-props`, + ProgressBar: `${BOOTSTRAP_BASE_URL}/progress/#progress-bar-props`, + Spinner: `${BOOTSTRAP_BASE_URL}/spinners/#spinner-props`, + Tabs: `${BOOTSTRAP_BASE_URL}/tabs/#tabs-api`, + Tab: `${BOOTSTRAP_BASE_URL}/tabs/#tab-props`, + Toast: `${BOOTSTRAP_BASE_URL}/toasts/#toast-props`, +}; + export type DefaultValueTypes = { value: string | undefined, }; @@ -92,10 +114,20 @@ export interface IPropsTable { } function PropsTable({ props: componentProps, displayName, content }: IPropsTable) { + const bootstrapLink = bootstrapLinks[displayName]; + return ( {content &&

    {content}

    } + {bootstrapLink && ( +

    + This is a pass through component from React-Bootstrap, see original props documentation{' '} + + here. + +

    + )} {componentProps.length > 0 ? (
      {componentProps From dc38d63d1427a559602950e1f02c0e53e6fd652d Mon Sep 17 00:00:00 2001 From: Viktor Rusakov <52399399+viktorrusakov@users.noreply.github.com> Date: Fri, 22 Dec 2023 15:43:08 +0200 Subject: [PATCH 15/23] fix: observe container resizing in useIndexOfLastVisibleChild hook instead of window resize (#2962) --- src/Tabs/index.jsx | 32 ++++---- .../tests/useIndexOfLastVisibleChild.test.jsx | 6 +- src/hooks/useIndexOfLastVisibleChild.jsx | 74 +++++++++---------- src/hooks/useIndexOfLastVisibleChild.mdx | 6 +- 4 files changed, 61 insertions(+), 57 deletions(-) diff --git a/src/Tabs/index.jsx b/src/Tabs/index.jsx index 409315c146..140593c48a 100644 --- a/src/Tabs/index.jsx +++ b/src/Tabs/index.jsx @@ -1,4 +1,10 @@ -import React, { useEffect, useMemo, useRef } from 'react'; +import React, { + useEffect, + useMemo, + useRef, + useState, + useCallback, +} from 'react'; import classNames from 'classnames'; import PropTypes from 'prop-types'; import BaseTabs from 'react-bootstrap/Tabs'; @@ -18,15 +24,15 @@ function Tabs({ activeKey, ...props }) { - const containerElementRef = useRef(null); + const [containerElementRef, setContainerElementRef] = useState(null); const overflowElementRef = useRef(null); const indexOfLastVisibleChild = useIndexOfLastVisibleChild( - containerElementRef.current?.children[0], + containerElementRef?.firstChild, overflowElementRef.current?.parentNode, ); useEffect(() => { - if (containerElementRef.current) { + if (containerElementRef) { const observer = new MutationObserver((mutations => { mutations.forEach(mutation => { // React-Bootstrap attribute 'data-rb-event-key' is responsible for the tab identification @@ -35,8 +41,8 @@ function Tabs({ const isActive = mutation.target.getAttribute('aria-selected') === 'true'; // datakey attribute is added manually to the dropdown // elements so that they correspond to the native tabs' eventKey - const element = containerElementRef.current.querySelector(`[datakey='${eventKey}']`); - const moreTab = containerElementRef.current.querySelector('.pgn__tab_more'); + const element = containerElementRef.querySelector(`[datakey='${eventKey}']`); + const moreTab = containerElementRef.querySelector('.pgn__tab_more'); if (isActive) { element?.classList.add('active'); // Here we add active class to the 'More Tab' if element exists in the dropdown @@ -50,13 +56,13 @@ function Tabs({ } }); })); - observer.observe(containerElementRef.current, { + observer.observe(containerElementRef, { attributes: true, subtree: true, attributeFilter: ['aria-selected'], }); return () => observer.disconnect(); } return undefined; - }, []); + }, [containerElementRef]); useEffect(() => { if (overflowElementRef.current?.parentNode) { @@ -64,10 +70,10 @@ function Tabs({ } }, [overflowElementRef.current?.parentNode]); - const handleDropdownTabClick = (eventKey) => { - const hiddenTab = containerElementRef.current.querySelector(`[data-rb-event-key='${eventKey}']`); + const handleDropdownTabClick = useCallback((eventKey) => { + const hiddenTab = containerElementRef.querySelector(`[data-rb-event-key='${eventKey}']`); hiddenTab.click(); - }; + }, [containerElementRef]); const tabsChildren = useMemo(() => { const indexOfOverflowStart = indexOfLastVisibleChild + 1; @@ -165,10 +171,10 @@ function Tabs({ /> )); return childrenList; - }, [activeKey, children, defaultActiveKey, indexOfLastVisibleChild, moreTabText]); + }, [activeKey, children, defaultActiveKey, indexOfLastVisibleChild, moreTabText, handleDropdownTabClick]); return ( -
      +
      +
      Element 1
      Element 2
      Element 3
      diff --git a/src/hooks/useIndexOfLastVisibleChild.jsx b/src/hooks/useIndexOfLastVisibleChild.jsx index 458b1b3d82..786375cdbf 100644 --- a/src/hooks/useIndexOfLastVisibleChild.jsx +++ b/src/hooks/useIndexOfLastVisibleChild.jsx @@ -1,7 +1,5 @@ import { useLayoutEffect, useState } from 'react'; -import useWindowSize from './useWindowSize'; - /** * This hook will find the index of the last child of a containing element * that fits within its bounding rectangle. This is done by summing the widths @@ -10,48 +8,48 @@ import useWindowSize from './useWindowSize'; * @param {Element} containerElementRef - container element * @param {Element} overflowElementRef - overflow element * - * The hook returns an array containing: - * [indexOfLastVisibleChild, containerElementRef, overflowElementRef] - * - * indexOfLastVisibleChild - the index of the last visible child - * containerElementRef - a ref to be added to the containing html node - * overflowElementRef - a ref to be added to an html node inside the container - * that is likely to be used to contain a "More" type dropdown or other - * mechanism to reveal hidden children. The width of this element is always - * included when determining which children will fit or not. Usage of this ref - * is optional. + * The hook returns the index of the last visible child. */ const useIndexOfLastVisibleChild = (containerElementRef, overflowElementRef) => { const [indexOfLastVisibleChild, setIndexOfLastVisibleChild] = useState(-1); - const windowSize = useWindowSize(); useLayoutEffect(() => { - if (!containerElementRef) { - return; + function updateLastVisibleChildIndex() { + // Get array of child nodes from NodeList form + const childNodesArr = Array.prototype.slice.call(containerElementRef.children); + const { nextIndexOfLastVisibleChild } = childNodesArr + // filter out the overflow element + .filter(childNode => childNode !== overflowElementRef) + // sum the widths to find the last visible element's index + .reduce((acc, childNode, index) => { + acc.sumWidth += childNode.getBoundingClientRect().width; + if (acc.sumWidth <= containerElementRef.getBoundingClientRect().width) { + acc.nextIndexOfLastVisibleChild = index; + } + return acc; + }, { + // Include the overflow element's width to begin with. Doing this means + // sometimes we'll show a dropdown with one item in it when it would fit, + // but allowing this case dramatically simplifies the calculations we need + // to do above. + sumWidth: overflowElementRef ? overflowElementRef.getBoundingClientRect().width : 0, + nextIndexOfLastVisibleChild: -1, + }); + + setIndexOfLastVisibleChild(nextIndexOfLastVisibleChild); + } + + if (containerElementRef) { + updateLastVisibleChildIndex(); + + const resizeObserver = new ResizeObserver(() => updateLastVisibleChildIndex()); + resizeObserver.observe(containerElementRef); + + return () => resizeObserver.disconnect(); } - // Get array of child nodes from NodeList form - const childNodesArr = Array.prototype.slice.call(containerElementRef.children); - const { nextIndexOfLastVisibleChild } = childNodesArr - // filter out the overflow element - .filter(childNode => childNode !== overflowElementRef) - // sum the widths to find the last visible element's index - .reduce((acc, childNode, index) => { - acc.sumWidth += childNode.getBoundingClientRect().width; - if (acc.sumWidth <= containerElementRef.getBoundingClientRect().width) { - acc.nextIndexOfLastVisibleChild = index; - } - return acc; - }, { - // Include the overflow element's width to begin with. Doing this means - // sometimes we'll show a dropdown with one item in it when it would fit, - // but allowing this case dramatically simplifies the calculations we need - // to do above. - sumWidth: overflowElementRef ? overflowElementRef.getBoundingClientRect().width : 0, - nextIndexOfLastVisibleChild: -1, - }); - - setIndexOfLastVisibleChild(nextIndexOfLastVisibleChild); - }, [windowSize, containerElementRef, overflowElementRef]); + + return undefined; + }, [containerElementRef, overflowElementRef]); return indexOfLastVisibleChild; }; diff --git a/src/hooks/useIndexOfLastVisibleChild.mdx b/src/hooks/useIndexOfLastVisibleChild.mdx index 59a9fc417c..7da3e5d693 100644 --- a/src/hooks/useIndexOfLastVisibleChild.mdx +++ b/src/hooks/useIndexOfLastVisibleChild.mdx @@ -25,10 +25,10 @@ of the children until they exceed the width of the container. pointerEvents: 'none', visibility: 'hidden', }; - const containerElementRef = React.useRef(null); + const [containerElementRef, setContainerElementRef] = React.useState(null); const overflowElementRef = React.useRef(null); const indexOfLastVisibleChild = useIndexOfLastVisibleChild( - containerElementRef.current, + containerElementRef, overflowElementRef.current, ); const elements = ['Element 1', 'Element 2', 'Element 3', 'Element 4', 'Element 5', 'Element 6', 'Element 7']; @@ -71,7 +71,7 @@ of the children until they exceed the width of the container. }, [indexOfLastVisibleChild]); return ( -
      +
      {children}
      ) From bfe4b8d6ad2565d92694238a6d9e9701cf2a68d4 Mon Sep 17 00:00:00 2001 From: Viktor Rusakov <52399399+viktorrusakov@users.noreply.github.com> Date: Fri, 22 Dec 2023 15:45:39 +0200 Subject: [PATCH 16/23] fix: correctly translate strings in `Checkpoint` component (#2886) --- src/ProductTour/Checkpoint.jsx | 15 +++++++++------ src/ProductTour/messages.js | 16 ++++++++++++++++ src/i18n/messages/ar.json | 3 ++- src/i18n/messages/ca.json | 3 ++- src/i18n/messages/es_419.json | 3 ++- src/i18n/messages/es_AR.json | 3 ++- src/i18n/messages/es_ES.json | 3 ++- src/i18n/messages/fr.json | 3 ++- src/i18n/messages/he.json | 3 ++- src/i18n/messages/id.json | 3 ++- src/i18n/messages/it_IT.json | 3 ++- src/i18n/messages/ko_KR.json | 3 ++- src/i18n/messages/pl.json | 3 ++- src/i18n/messages/pt_BR.json | 3 ++- src/i18n/messages/pt_PT.json | 3 ++- src/i18n/messages/ru.json | 3 ++- src/i18n/messages/th.json | 3 ++- src/i18n/messages/tr_TR.json | 3 ++- src/i18n/messages/uk.json | 3 ++- src/i18n/messages/zh_CN.json | 3 ++- www/src/components/Menu.tsx | 6 +++++- 21 files changed, 66 insertions(+), 25 deletions(-) create mode 100644 src/ProductTour/messages.js diff --git a/src/ProductTour/Checkpoint.jsx b/src/ProductTour/Checkpoint.jsx index 0ad68adf84..903565f27b 100644 --- a/src/ProductTour/Checkpoint.jsx +++ b/src/ProductTour/Checkpoint.jsx @@ -10,6 +10,7 @@ import CheckpointActionRow from './CheckpointActionRow'; import CheckpointBody from './CheckpointBody'; import CheckpointBreadcrumbs from './CheckpointBreadcrumbs'; import CheckpointTitle from './CheckpointTitle'; +import messages from './messages'; const Checkpoint = React.forwardRef(({ body, @@ -99,10 +100,8 @@ const Checkpoint = React.forwardRef(({ > {(title || !isOnlyCheckpoint) && ( @@ -118,8 +117,12 @@ const Checkpoint = React.forwardRef(({ {...props} />
      - {/* This text is not translated due to Paragon's lack of i18n support */} - Bottom of step {index + 1} + + +
      ); }); diff --git a/src/ProductTour/messages.js b/src/ProductTour/messages.js new file mode 100644 index 0000000000..8973c85a44 --- /dev/null +++ b/src/ProductTour/messages.js @@ -0,0 +1,16 @@ +import { defineMessages } from 'react-intl'; + +const messages = defineMessages({ + topPositionText: { + id: 'pgn.ProductTour.Checkpoint.top-position-text', + defaultMessage: 'Top of step {step}', + description: 'Screen-reader message to notify user that they are located at the bottom of the product tour step.', + }, + bottomPositionText: { + id: 'pgn.ProductTour.Checkpoint.bottom-position-text', + defaultMessage: 'Bottom of step {step}', + description: 'Screen-reader message to notify user that they are located at the bottom of the product tour step.', + }, +}); + +export default messages; diff --git a/src/i18n/messages/ar.json b/src/i18n/messages/ar.json index da2ed734cf..b068921a11 100644 --- a/src/i18n/messages/ar.json +++ b/src/i18n/messages/ar.json @@ -28,5 +28,6 @@ "pgn.FormAutosuggest.iconButtonClosed": "إغلاق قائمة الخيارات", "pgn.FormAutosuggest.iconButtonOpened": "فتح قائمة الخيارات", "pgn.Toast.closeLabel": "إغلاق ", - "pgn.ProductTour.Checkpoint.position-text": "Top of step {step}" + "pgn.ProductTour.Checkpoint.top-position-text": "Top of step {step}", + "pgn.ProductTour.Checkpoint.bottom-position-text": "Bottom of step {step}" } \ No newline at end of file diff --git a/src/i18n/messages/ca.json b/src/i18n/messages/ca.json index 022a108c1c..ab80caa906 100644 --- a/src/i18n/messages/ca.json +++ b/src/i18n/messages/ca.json @@ -28,5 +28,6 @@ "pgn.FormAutosuggest.iconButtonClosed": "Close the options menu", "pgn.FormAutosuggest.iconButtonOpened": "Open the options menu", "pgn.Toast.closeLabel": "Close", - "pgn.ProductTour.Checkpoint.position-text": "Top of step {step}" + "pgn.ProductTour.Checkpoint.top-position-text": "Top of step {step}", + "pgn.ProductTour.Checkpoint.bottom-position-text": "Bottom of step {step}" } \ No newline at end of file diff --git a/src/i18n/messages/es_419.json b/src/i18n/messages/es_419.json index 29c5b77cb0..911b212703 100644 --- a/src/i18n/messages/es_419.json +++ b/src/i18n/messages/es_419.json @@ -28,5 +28,6 @@ "pgn.FormAutosuggest.iconButtonClosed": "Cerrar el menú de opciones", "pgn.FormAutosuggest.iconButtonOpened": "Abre el menú de opciones", "pgn.Toast.closeLabel": "Cerrar", - "pgn.ProductTour.Checkpoint.position-text": "Top of step {step}" + "pgn.ProductTour.Checkpoint.top-position-text": "Top of step {step}", + "pgn.ProductTour.Checkpoint.bottom-position-text": "Bottom of step {step}" } \ No newline at end of file diff --git a/src/i18n/messages/es_AR.json b/src/i18n/messages/es_AR.json index 638e6af70e..3bdb5eb26d 100644 --- a/src/i18n/messages/es_AR.json +++ b/src/i18n/messages/es_AR.json @@ -28,5 +28,6 @@ "pgn.FormAutosuggest.iconButtonClosed": "Cerrar el menú de opciones", "pgn.FormAutosuggest.iconButtonOpened": "Abre el menú de opciones", "pgn.Toast.closeLabel": "Cerrar", - "pgn.ProductTour.Checkpoint.position-text": "Top of step {step}" + "pgn.ProductTour.Checkpoint.top-position-text": "Top of step {step}", + "pgn.ProductTour.Checkpoint.bottom-position-text": "Bottom of step {step}" } \ No newline at end of file diff --git a/src/i18n/messages/es_ES.json b/src/i18n/messages/es_ES.json index 81c8e6df9e..a5a1668558 100644 --- a/src/i18n/messages/es_ES.json +++ b/src/i18n/messages/es_ES.json @@ -28,5 +28,6 @@ "pgn.FormAutosuggest.iconButtonClosed": "Cerrar el menú de opciones", "pgn.FormAutosuggest.iconButtonOpened": "Abre el menú de opciones", "pgn.Toast.closeLabel": "Cerrar", - "pgn.ProductTour.Checkpoint.position-text": "Top of step {step}" + "pgn.ProductTour.Checkpoint.top-position-text": "Top of step {step}", + "pgn.ProductTour.Checkpoint.bottom-position-text": "Bottom of step {step}" } \ No newline at end of file diff --git a/src/i18n/messages/fr.json b/src/i18n/messages/fr.json index 022a108c1c..ab80caa906 100644 --- a/src/i18n/messages/fr.json +++ b/src/i18n/messages/fr.json @@ -28,5 +28,6 @@ "pgn.FormAutosuggest.iconButtonClosed": "Close the options menu", "pgn.FormAutosuggest.iconButtonOpened": "Open the options menu", "pgn.Toast.closeLabel": "Close", - "pgn.ProductTour.Checkpoint.position-text": "Top of step {step}" + "pgn.ProductTour.Checkpoint.top-position-text": "Top of step {step}", + "pgn.ProductTour.Checkpoint.bottom-position-text": "Bottom of step {step}" } \ No newline at end of file diff --git a/src/i18n/messages/he.json b/src/i18n/messages/he.json index 022a108c1c..ab80caa906 100644 --- a/src/i18n/messages/he.json +++ b/src/i18n/messages/he.json @@ -28,5 +28,6 @@ "pgn.FormAutosuggest.iconButtonClosed": "Close the options menu", "pgn.FormAutosuggest.iconButtonOpened": "Open the options menu", "pgn.Toast.closeLabel": "Close", - "pgn.ProductTour.Checkpoint.position-text": "Top of step {step}" + "pgn.ProductTour.Checkpoint.top-position-text": "Top of step {step}", + "pgn.ProductTour.Checkpoint.bottom-position-text": "Bottom of step {step}" } \ No newline at end of file diff --git a/src/i18n/messages/id.json b/src/i18n/messages/id.json index 022a108c1c..ab80caa906 100644 --- a/src/i18n/messages/id.json +++ b/src/i18n/messages/id.json @@ -28,5 +28,6 @@ "pgn.FormAutosuggest.iconButtonClosed": "Close the options menu", "pgn.FormAutosuggest.iconButtonOpened": "Open the options menu", "pgn.Toast.closeLabel": "Close", - "pgn.ProductTour.Checkpoint.position-text": "Top of step {step}" + "pgn.ProductTour.Checkpoint.top-position-text": "Top of step {step}", + "pgn.ProductTour.Checkpoint.bottom-position-text": "Bottom of step {step}" } \ No newline at end of file diff --git a/src/i18n/messages/it_IT.json b/src/i18n/messages/it_IT.json index ff3baf38c8..64055347ab 100644 --- a/src/i18n/messages/it_IT.json +++ b/src/i18n/messages/it_IT.json @@ -28,5 +28,6 @@ "pgn.FormAutosuggest.iconButtonClosed": "Close the options menu", "pgn.FormAutosuggest.iconButtonOpened": "Open the options menu", "pgn.Toast.closeLabel": "Chiudi", - "pgn.ProductTour.Checkpoint.position-text": "Top of step {step}" + "pgn.ProductTour.Checkpoint.top-position-text": "Top of step {step}", + "pgn.ProductTour.Checkpoint.bottom-position-text": "Bottom of step {step}" } \ No newline at end of file diff --git a/src/i18n/messages/ko_KR.json b/src/i18n/messages/ko_KR.json index 022a108c1c..ab80caa906 100644 --- a/src/i18n/messages/ko_KR.json +++ b/src/i18n/messages/ko_KR.json @@ -28,5 +28,6 @@ "pgn.FormAutosuggest.iconButtonClosed": "Close the options menu", "pgn.FormAutosuggest.iconButtonOpened": "Open the options menu", "pgn.Toast.closeLabel": "Close", - "pgn.ProductTour.Checkpoint.position-text": "Top of step {step}" + "pgn.ProductTour.Checkpoint.top-position-text": "Top of step {step}", + "pgn.ProductTour.Checkpoint.bottom-position-text": "Bottom of step {step}" } \ No newline at end of file diff --git a/src/i18n/messages/pl.json b/src/i18n/messages/pl.json index b23933a642..d8d2e9e6e9 100644 --- a/src/i18n/messages/pl.json +++ b/src/i18n/messages/pl.json @@ -28,5 +28,6 @@ "pgn.FormAutosuggest.iconButtonClosed": "Close the options menu", "pgn.FormAutosuggest.iconButtonOpened": "Open the options menu", "pgn.Toast.closeLabel": "Zamknij", - "pgn.ProductTour.Checkpoint.position-text": "Top of step {step}" + "pgn.ProductTour.Checkpoint.top-position-text": "Top of step {step}", + "pgn.ProductTour.Checkpoint.bottom-position-text": "Bottom of step {step}" } \ No newline at end of file diff --git a/src/i18n/messages/pt_BR.json b/src/i18n/messages/pt_BR.json index 022a108c1c..ab80caa906 100644 --- a/src/i18n/messages/pt_BR.json +++ b/src/i18n/messages/pt_BR.json @@ -28,5 +28,6 @@ "pgn.FormAutosuggest.iconButtonClosed": "Close the options menu", "pgn.FormAutosuggest.iconButtonOpened": "Open the options menu", "pgn.Toast.closeLabel": "Close", - "pgn.ProductTour.Checkpoint.position-text": "Top of step {step}" + "pgn.ProductTour.Checkpoint.top-position-text": "Top of step {step}", + "pgn.ProductTour.Checkpoint.bottom-position-text": "Bottom of step {step}" } \ No newline at end of file diff --git a/src/i18n/messages/pt_PT.json b/src/i18n/messages/pt_PT.json index 534c64b645..dc274f81ad 100644 --- a/src/i18n/messages/pt_PT.json +++ b/src/i18n/messages/pt_PT.json @@ -28,5 +28,6 @@ "pgn.FormAutosuggest.iconButtonClosed": "Fechar o menu de opções", "pgn.FormAutosuggest.iconButtonOpened": "Abrir o menu de opções", "pgn.Toast.closeLabel": "Fechar", - "pgn.ProductTour.Checkpoint.position-text": "Top of step {step}" + "pgn.ProductTour.Checkpoint.top-position-text": "Top of step {step}", + "pgn.ProductTour.Checkpoint.bottom-position-text": "Bottom of step {step}" } \ No newline at end of file diff --git a/src/i18n/messages/ru.json b/src/i18n/messages/ru.json index 022a108c1c..ab80caa906 100644 --- a/src/i18n/messages/ru.json +++ b/src/i18n/messages/ru.json @@ -28,5 +28,6 @@ "pgn.FormAutosuggest.iconButtonClosed": "Close the options menu", "pgn.FormAutosuggest.iconButtonOpened": "Open the options menu", "pgn.Toast.closeLabel": "Close", - "pgn.ProductTour.Checkpoint.position-text": "Top of step {step}" + "pgn.ProductTour.Checkpoint.top-position-text": "Top of step {step}", + "pgn.ProductTour.Checkpoint.bottom-position-text": "Bottom of step {step}" } \ No newline at end of file diff --git a/src/i18n/messages/th.json b/src/i18n/messages/th.json index 022a108c1c..ab80caa906 100644 --- a/src/i18n/messages/th.json +++ b/src/i18n/messages/th.json @@ -28,5 +28,6 @@ "pgn.FormAutosuggest.iconButtonClosed": "Close the options menu", "pgn.FormAutosuggest.iconButtonOpened": "Open the options menu", "pgn.Toast.closeLabel": "Close", - "pgn.ProductTour.Checkpoint.position-text": "Top of step {step}" + "pgn.ProductTour.Checkpoint.top-position-text": "Top of step {step}", + "pgn.ProductTour.Checkpoint.bottom-position-text": "Bottom of step {step}" } \ No newline at end of file diff --git a/src/i18n/messages/tr_TR.json b/src/i18n/messages/tr_TR.json index c29565d297..bf544c4543 100644 --- a/src/i18n/messages/tr_TR.json +++ b/src/i18n/messages/tr_TR.json @@ -28,5 +28,6 @@ "pgn.FormAutosuggest.iconButtonClosed": "Seçenekler menüsünü kapat", "pgn.FormAutosuggest.iconButtonOpened": "Seçenekler menüsünü aç", "pgn.Toast.closeLabel": "Kapat", - "pgn.ProductTour.Checkpoint.position-text": "Top of step {step}" + "pgn.ProductTour.Checkpoint.top-position-text": "Top of step {step}", + "pgn.ProductTour.Checkpoint.bottom-position-text": "Bottom of step {step}" } \ No newline at end of file diff --git a/src/i18n/messages/uk.json b/src/i18n/messages/uk.json index 022a108c1c..ab80caa906 100644 --- a/src/i18n/messages/uk.json +++ b/src/i18n/messages/uk.json @@ -28,5 +28,6 @@ "pgn.FormAutosuggest.iconButtonClosed": "Close the options menu", "pgn.FormAutosuggest.iconButtonOpened": "Open the options menu", "pgn.Toast.closeLabel": "Close", - "pgn.ProductTour.Checkpoint.position-text": "Top of step {step}" + "pgn.ProductTour.Checkpoint.top-position-text": "Top of step {step}", + "pgn.ProductTour.Checkpoint.bottom-position-text": "Bottom of step {step}" } \ No newline at end of file diff --git a/src/i18n/messages/zh_CN.json b/src/i18n/messages/zh_CN.json index 022a108c1c..ab80caa906 100644 --- a/src/i18n/messages/zh_CN.json +++ b/src/i18n/messages/zh_CN.json @@ -28,5 +28,6 @@ "pgn.FormAutosuggest.iconButtonClosed": "Close the options menu", "pgn.FormAutosuggest.iconButtonOpened": "Open the options menu", "pgn.Toast.closeLabel": "Close", - "pgn.ProductTour.Checkpoint.position-text": "Top of step {step}" + "pgn.ProductTour.Checkpoint.top-position-text": "Top of step {step}", + "pgn.ProductTour.Checkpoint.bottom-position-text": "Bottom of step {step}" } \ No newline at end of file diff --git a/www/src/components/Menu.tsx b/www/src/components/Menu.tsx index e80eade226..c2fe25d406 100644 --- a/www/src/components/Menu.tsx +++ b/www/src/components/Menu.tsx @@ -119,7 +119,11 @@ ComponentNavItem.propTypes = { title: PropTypes.string.isRequired, status: PropTypes.string, }).isRequired, - isActive: PropTypes.bool.isRequired, + isActive: PropTypes.bool, +}; + +ComponentNavItem.defaultProps = { + isActive: false, }; export type MenuComponentListTypes = { From bcdfb2a303e7c23fe91144ba0078bcfb32390a5a Mon Sep 17 00:00:00 2001 From: Peter Kulko <93188219+PKulkoRaccoonGang@users.noreply.github.com> Date: Fri, 22 Dec 2023 16:07:09 +0200 Subject: [PATCH 17/23] refactor: corrected PropTypes (#2960) --- src/Button/index.jsx | 4 ++-- src/Dropzone/index.jsx | 2 +- src/Icon/index.jsx | 2 +- src/IconButton/index.jsx | 2 +- src/Menu/MenuItem.jsx | 4 ++-- src/Overlay/README.md | 2 +- src/Overlay/index.jsx | 2 +- www/src/components/Menu.tsx | 2 +- 8 files changed, 10 insertions(+), 10 deletions(-) diff --git a/src/Button/index.jsx b/src/Button/index.jsx index 7b497901ee..7180ff3bfa 100644 --- a/src/Button/index.jsx +++ b/src/Button/index.jsx @@ -52,10 +52,10 @@ Button.propTypes = { variant: PropTypes.string, /** An icon component to render. * Example import of a Paragon icon component: `import { Check } from '@edx/paragon/icons';` */ - iconBefore: PropTypes.oneOfType([PropTypes.func, PropTypes.node]), + iconBefore: PropTypes.oneOfType([PropTypes.elementType, PropTypes.node]), /** An icon component to render. * Example import of a Paragon icon component: `import { Check } from '@edx/paragon/icons';` */ - iconAfter: PropTypes.oneOfType([PropTypes.func, PropTypes.node]), + iconAfter: PropTypes.oneOfType([PropTypes.elementType, PropTypes.node]), }; Button.defaultProps = { diff --git a/src/Dropzone/index.jsx b/src/Dropzone/index.jsx index 8712f54301..1eecc7ac1f 100644 --- a/src/Dropzone/index.jsx +++ b/src/Dropzone/index.jsx @@ -270,7 +270,7 @@ Dropzone.propTypes = { */ validator: PropTypes.func, /** A component to display initial state of the `Dropzone`. */ - inputComponent: PropTypes.oneOfType([PropTypes.func, PropTypes.node]), + inputComponent: PropTypes.oneOfType([PropTypes.elementType, PropTypes.node]), }; export default Dropzone; diff --git a/src/Icon/index.jsx b/src/Icon/index.jsx index 482b37d03b..f30732e9b8 100644 --- a/src/Icon/index.jsx +++ b/src/Icon/index.jsx @@ -74,7 +74,7 @@ Icon.propTypes = { * An icon component to render. * Example import of a Paragon icon component: `import { Check } from '@edx/paragon/icons';` */ - src: PropTypes.oneOfType([PropTypes.element, PropTypes.func]), + src: PropTypes.oneOfType([PropTypes.element, PropTypes.elementType]), /** HTML element attributes to pass through to the underlying svg element */ svgAttrs: PropTypes.shape({ 'aria-label': PropTypes.string, diff --git a/src/IconButton/index.jsx b/src/IconButton/index.jsx index 3c07593435..aa3cdc158c 100644 --- a/src/IconButton/index.jsx +++ b/src/IconButton/index.jsx @@ -80,7 +80,7 @@ IconButton.propTypes = { /** An icon component to render. Example import of a Paragon icon component: * `import { Check } from '@edx/paragon/dist/icon';` * */ - src: PropTypes.oneOfType([PropTypes.element, PropTypes.func]), + src: PropTypes.oneOfType([PropTypes.element, PropTypes.elementType]), /** Alt text for your icon. For best practice, avoid using alt text to describe * the image in the `IconButton`. Instead, we recommend describing the function * of the button. */ diff --git a/src/Menu/MenuItem.jsx b/src/Menu/MenuItem.jsx index a8034a18e7..165fc8f5a2 100644 --- a/src/Menu/MenuItem.jsx +++ b/src/Menu/MenuItem.jsx @@ -40,9 +40,9 @@ MenuItem.propTypes = { /** Specifies the base element */ as: PropTypes.elementType, /** Specifies the jsx before the content of the ``MenuItem`` */ - iconBefore: PropTypes.oneOfType([PropTypes.element, PropTypes.func]), + iconBefore: PropTypes.oneOfType([PropTypes.element, PropTypes.elementType]), /** Specifies the jsx after the content of the ``MenuItem`` */ - iconAfter: PropTypes.oneOfType([PropTypes.element, PropTypes.func]), + iconAfter: PropTypes.oneOfType([PropTypes.element, PropTypes.elementType]), }; MenuItem.defaultProps = { diff --git a/src/Overlay/README.md b/src/Overlay/README.md index da86dc330c..af259d0d0d 100644 --- a/src/Overlay/README.md +++ b/src/Overlay/README.md @@ -38,7 +38,7 @@ This component is used to power Tooltips and Popovers. Click me to see
      - + {({ placement, arrowProps, show: _show, popper, ...props }) => (
      ` transition, * or a custom react-transition-group `` component can be provided. */ - transition: PropTypes.func, + transition: PropTypes.oneOfType([PropTypes.object, PropTypes.bool]), }; OverlayTrigger.propTypes = { diff --git a/www/src/components/Menu.tsx b/www/src/components/Menu.tsx index c2fe25d406..1c267a7259 100644 --- a/www/src/components/Menu.tsx +++ b/www/src/components/Menu.tsx @@ -75,7 +75,7 @@ export interface IComponentNavItem { type: string, status?: string, }, - isActive: boolean, + isActive?: boolean, } export function ComponentNavItem({ From 9896842d42e6b4bfda9dac61435ed4166e6c3074 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Fri, 22 Dec 2023 09:16:34 -0500 Subject: [PATCH 18/23] docs: update dependent-usage.json (#2963) --- dependent-usage.json | 22 +++++----------------- 1 file changed, 5 insertions(+), 17 deletions(-) diff --git a/dependent-usage.json b/dependent-usage.json index 6b25032651..e7d956509e 100644 --- a/dependent-usage.json +++ b/dependent-usage.json @@ -1,5 +1,5 @@ { - "lastModified": 1703167725243, + "lastModified": 1703254054911, "projectUsages": [ { "version": "2.6.4", @@ -26330,9 +26330,9 @@ }, { "filePath": "src/components/dashboard/sidebar/SubsidiesSummary.jsx", - "line": 124, + "line": 117, "column": 6, - "index": 4472 + "index": 4440 }, { "filePath": "src/components/enterprise-banner/EnterpriseBanner.jsx", @@ -26564,12 +26564,6 @@ "column": 6, "index": 1045 }, - { - "filePath": "src/components/dashboard/sidebar/LearnerCreditSummaryCard.jsx", - "line": 44, - "column": 6, - "index": 1247 - }, { "filePath": "src/components/executive-education-2u/components/CourseSummaryCard.jsx", "line": 40, @@ -26842,12 +26836,6 @@ "column": 16, "index": 15199 }, - { - "filePath": "src/components/dashboard/sidebar/LearnerCreditSummaryCard.jsx", - "line": 45, - "column": 8, - "index": 1305 - }, { "filePath": "src/components/error-page/ErrorPage.jsx", "line": 29, @@ -27092,9 +27080,9 @@ }, { "filePath": "src/components/dashboard/sidebar/LearnerCreditSummaryCard.jsx", - "line": 21, + "line": 22, "column": 10, - "index": 643 + "index": 680 }, { "filePath": "src/components/dashboard/sidebar/SubscriptionSummaryCard.jsx", From fceb4baa84c8f94211b7ba58ffd61aa40d6b9ac9 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Sat, 23 Dec 2023 09:18:19 -0500 Subject: [PATCH 19/23] docs: update dependent-usage.json (#2965) --- dependent-usage.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dependent-usage.json b/dependent-usage.json index e7d956509e..caf111eb9b 100644 --- a/dependent-usage.json +++ b/dependent-usage.json @@ -1,5 +1,5 @@ { - "lastModified": 1703254054911, + "lastModified": 1703340541428, "projectUsages": [ { "version": "2.6.4", From 6edd6cb234a7b1533a113a3cd4fd7fc9936fe779 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Sun, 24 Dec 2023 09:16:18 -0500 Subject: [PATCH 20/23] docs: update dependent-usage.json (#2966) --- dependent-usage.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dependent-usage.json b/dependent-usage.json index caf111eb9b..591685aeef 100644 --- a/dependent-usage.json +++ b/dependent-usage.json @@ -1,5 +1,5 @@ { - "lastModified": 1703340541428, + "lastModified": 1703426840856, "projectUsages": [ { "version": "2.6.4", From 944ca29b461d956d2387b2183d1d17554a271254 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Mon, 25 Dec 2023 09:12:21 -0500 Subject: [PATCH 21/23] docs: update dependent-usage.json (#2968) --- dependent-usage.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dependent-usage.json b/dependent-usage.json index 591685aeef..b7645b8b53 100644 --- a/dependent-usage.json +++ b/dependent-usage.json @@ -1,5 +1,5 @@ { - "lastModified": 1703426840856, + "lastModified": 1703513252957, "projectUsages": [ { "version": "2.6.4", From 7c399b1947af2fd444173ac1ef4e6be755cdd775 Mon Sep 17 00:00:00 2001 From: PKulkoRaccoonGang Date: Tue, 26 Dec 2023 16:39:13 +0200 Subject: [PATCH 22/23] refactor: fixed button tokens --- src/Button/index.scss | 6 +++--- styles/css/core/variables.css | 8 +++++--- styles/css/themes/light/variables.css | 22 ++++++++++----------- tokens/src/core/components/Button/core.json | 12 +++++++---- tokens/src/themes/light/alias/color.json | 20 +++++++++---------- 5 files changed, 37 insertions(+), 31 deletions(-) diff --git a/src/Button/index.scss b/src/Button/index.scss index 3b460a9a83..22c6b07fa2 100644 --- a/src/Button/index.scss +++ b/src/Button/index.scss @@ -41,15 +41,15 @@ bottom: calc(var(--pgn-spacing-btn-focus-distance-to-border) * -1); left: calc(var(--pgn-spacing-btn-focus-distance-to-border) * -1); border: solid var(--pgn-size-btn-focus-width) var(--pgn-btn-focus-outline-color, var(--pgn-color-body-base)); - border-radius: var(--pgn-size-btn-focus-border-radius); + border-radius: var(--pgn-size-btn-focus-border-radius-base); } &.btn-lg::before { - border-radius: var(--pgn-size-btn-focus-border-radius); + border-radius: var(--pgn-size-btn-focus-border-radius-lg); } &.btn-sm::before { - border-radius: var(--pgn-size-btn-focus-border-radius); + border-radius: var(--pgn-size-btn-focus-border-radius-sm); } &:active, diff --git a/styles/css/core/variables.css b/styles/css/core/variables.css index 728ae6f797..59586ffea2 100644 --- a/styles/css/core/variables.css +++ b/styles/css/core/variables.css @@ -1,7 +1,7 @@ /** * IMPORTANT: This file is the result of assembling design tokens * Do not edit directly - * Generated on Wed, 06 Dec 2023 09:28:09 GMT + * Generated on Tue, 26 Dec 2023 14:13:40 GMT */ :root { @@ -236,7 +236,6 @@ --pgn-spacing-card-margin-group: 12px; --pgn-spacing-card-spacer-y: .75rem; --pgn-spacing-card-spacer-x: 1.25rem; - --pgn-spacing-btn-focus-gap: 1px; --pgn-spacing-btn-block-spacing-y: .5rem; --pgn-spacing-bubble-expandable-padding-x: .25rem; --pgn-spacing-bubble-expandable-padding-y: 0; @@ -493,6 +492,7 @@ --pgn-spacing-card-margin-grid: var(--pgn-spacing-card-margin-group); --pgn-spacing-card-margin-deck: var(--pgn-spacing-card-margin-group); --pgn-spacing-btn-focus-border-gap: calc(var(--pgn-size-btn-focus-width) + var(--pgn-spacing-btn-focus-gap)); + --pgn-spacing-btn-focus-gap: var(--pgn-size-btn-focus-width); --pgn-spacing-btn-padding-x-sm: var(--pgn-spacing-input-btn-padding-sm-x); --pgn-spacing-btn-padding-x-lg: var(--pgn-spacing-input-btn-padding-lg-x); --pgn-spacing-btn-padding-x-base: var(--pgn-spacing-input-btn-padding-x); @@ -584,7 +584,8 @@ --pgn-size-form-input-height-base: calc(var(--pgn-typography-form-input-line-height-base) * 1em + var(--pgn-spacing-form-input-padding-y-base) * 2 + var(--pgn-size-form-input-height-border)); --pgn-size-dropdown-border-radius-inner: calc(var(--pgn-size-dropdown-border-radius-base) - var(--pgn-size-dropdown-border-width)); --pgn-size-card-image-border-radius: var(--pgn-size-card-border-radius-base); - --pgn-size-btn-focus-border-radius: calc(var(--pgn-size-btn-border-radius-base) + var(--pgn-spacing-btn-focus-border-gap)); + --pgn-size-btn-focus-border-radius-sm: var(--pgn-size-btn-border-radius-base); + --pgn-size-btn-focus-border-radius-base: calc(var(--pgn-size-btn-border-radius-base) + var(--pgn-spacing-btn-focus-border-gap)); --pgn-size-btn-border-width: var(--pgn-size-input-btn-border-width); --pgn-typography-form-control-file-font-weight: var(--pgn-typography-form-input-font-weight); --pgn-typography-form-control-select-font-weight: var(--pgn-typography-form-input-font-weight); @@ -600,5 +601,6 @@ --pgn-size-form-control-select-height-base: var(--pgn-size-form-input-height-base); --pgn-size-form-input-height-border: calc(var(--pgn-size-form-input-width-border) * 2); --pgn-size-form-input-height-lg: calc(var(--pgn-typography-form-input-line-height-lg) * 1em + var(--pgn-spacing-input-btn-padding-lg-y) * 2 + var(--pgn-size-form-input-height-border)); + --pgn-size-btn-focus-border-radius-lg: var(--pgn-size-btn-focus-border-radius-base); --pgn-size-form-control-select-height-lg: var(--pgn-size-form-input-height-lg); } diff --git a/styles/css/themes/light/variables.css b/styles/css/themes/light/variables.css index 87c12d7599..902d932990 100644 --- a/styles/css/themes/light/variables.css +++ b/styles/css/themes/light/variables.css @@ -1,7 +1,7 @@ /** * IMPORTANT: This file is the result of assembling design tokens * Do not edit directly - * Generated on Wed, 06 Dec 2023 09:28:09 GMT + * Generated on Tue, 26 Dec 2023 14:13:40 GMT */ :root { @@ -580,7 +580,6 @@ --pgn-color-alert-title: var(--pgn-color-black); --pgn-color-theme-active-gray: var(--pgn-color-gray-900); --pgn-color-theme-hover-gray: var(--pgn-color-gray-700); - --pgn-color-theme-focus-gray: var(--pgn-color-gray-300); --pgn-color-theme-border-gray: var(--pgn-color-gray-200); --pgn-color-theme-bg-gray: var(--pgn-color-gray-100); --pgn-color-border: var(--pgn-color-gray-200); @@ -1112,10 +1111,11 @@ --pgn-color-theme-default-light: var(--pgn-color-light-500); --pgn-color-theme-default-brand: var(--pgn-color-brand-500); --pgn-color-theme-default-primary: var(--pgn-color-primary-500); - --pgn-color-theme-focus-dark: var(--pgn-color-dark-300); - --pgn-color-theme-focus-light: var(--pgn-color-light-300); - --pgn-color-theme-focus-brand: var(--pgn-color-brand-300); - --pgn-color-theme-focus-primary: var(--pgn-color-primary-300); + --pgn-color-theme-focus-gray: var(--pgn-color-gray-500); + --pgn-color-theme-focus-dark: var(--pgn-color-dark-500); + --pgn-color-theme-focus-light: var(--pgn-color-light-500); + --pgn-color-theme-focus-brand: var(--pgn-color-brand-500); + --pgn-color-theme-focus-primary: var(--pgn-color-primary-500); --pgn-color-theme-border-dark: var(--pgn-color-dark-200); --pgn-color-theme-border-light: var(--pgn-color-light-200); --pgn-color-theme-border-brand: var(--pgn-color-brand-200); @@ -1444,11 +1444,11 @@ --pgn-color-theme-default-info: var(--pgn-color-info-500); --pgn-color-theme-default-success: var(--pgn-color-success-500); --pgn-color-theme-default-secondary: var(--pgn-color-secondary-500); - --pgn-color-theme-focus-danger: var(--pgn-color-danger-300); - --pgn-color-theme-focus-warning: var(--pgn-color-warning-300); - --pgn-color-theme-focus-info: var(--pgn-color-info-300); - --pgn-color-theme-focus-success: var(--pgn-color-success-300); - --pgn-color-theme-focus-secondary: var(--pgn-color-secondary-300); + --pgn-color-theme-focus-danger: var(--pgn-color-danger-500); + --pgn-color-theme-focus-warning: var(--pgn-color-warning-500); + --pgn-color-theme-focus-info: var(--pgn-color-info-500); + --pgn-color-theme-focus-success: var(--pgn-color-success-500); + --pgn-color-theme-focus-secondary: var(--pgn-color-secondary-500); --pgn-color-theme-border-danger: var(--pgn-color-danger-200); --pgn-color-theme-border-warning: var(--pgn-color-warning-200); --pgn-color-theme-border-info: var(--pgn-color-info-200); diff --git a/tokens/src/core/components/Button/core.json b/tokens/src/core/components/Button/core.json index 65fe7cacf2..96fdbadb33 100644 --- a/tokens/src/core/components/Button/core.json +++ b/tokens/src/core/components/Button/core.json @@ -27,7 +27,7 @@ "spacing-y": { "value": ".5rem", "type": "dimension", "source": "$btn-block-spacing-y" } }, "focus": { - "gap": { "value": "1px", "type": "dimension", "source": "$btn-focus-gap" }, + "gap": { "value": "{size.btn.focus.width}", "type": "dimension", "source": "$btn-focus-gap" }, "border-gap": { "value": "calc({size.btn.focus.width} + {spacing.btn.focus.gap})", "type": "dimension", @@ -88,9 +88,13 @@ "focus": { "width": { "value": "2px", "type": "dimension", "source": "$btn-focus-width" }, "border-radius": { - "value": "calc({size.btn.border.radius.base} + {spacing.btn.focus.border-gap})", - "type": "dimension", - "source": "$btn-focus-border-radius" + "base": { + "value": "calc({size.btn.border.radius.base} + {spacing.btn.focus.border-gap})", + "type": "dimension", + "source": "$btn-focus-border-radius" + }, + "lg": { "value": "{size.btn.focus.border-radius.base}", "type": "dimension", "source": "$btn-focus-border-radius-lg" }, + "sm": { "value": "{size.btn.border.radius.base}", "type": "dimension", "source": "$btn-focus-border-radius-sm" } } } } diff --git a/tokens/src/themes/light/alias/color.json b/tokens/src/themes/light/alias/color.json index ec29f72280..58d1299348 100644 --- a/tokens/src/themes/light/alias/color.json +++ b/tokens/src/themes/light/alias/color.json @@ -62,16 +62,16 @@ "gray": { "value": "{color.gray.200}", "type": "color", "description": "Theme-specific gray border color." } }, "focus": { - "primary": { "value": "{color.primary.300}", "type": "color", "description": "Theme-specific primary focus color." }, - "secondary": { "value": "{color.secondary.300}", "type": "color", "description": "Theme-specific secondary focus color." }, - "brand": { "value": "{color.brand.300}", "type": "color", "description": "Theme-specific brand focus color." }, - "success": { "value": "{color.success.300}", "type": "color", "description": "Theme-specific success focus color." }, - "info": { "value": "{color.info.300}", "type": "color", "description": "Theme-specific info focus color." }, - "warning": { "value": "{color.warning.300}", "type": "color", "description": "Theme-specific warning focus color." }, - "danger": { "value": "{color.danger.300}", "type": "color", "description": "Theme-specific danger focus color." }, - "light": { "value": "{color.light.300}", "type": "color", "description": "Theme-specific light focus color." }, - "dark": { "value": "{color.dark.300}", "type": "color", "description": "Theme-specific dark focus color." }, - "gray": { "value": "{color.gray.300}", "type": "color", "description": "Theme-specific gray focus color." } + "primary": { "value": "{color.primary.500}", "type": "color", "description": "Theme-specific primary focus color." }, + "secondary": { "value": "{color.secondary.500}", "type": "color", "description": "Theme-specific secondary focus color." }, + "brand": { "value": "{color.brand.500}", "type": "color", "description": "Theme-specific brand focus color." }, + "success": { "value": "{color.success.500}", "type": "color", "description": "Theme-specific success focus color." }, + "info": { "value": "{color.info.500}", "type": "color", "description": "Theme-specific info focus color." }, + "warning": { "value": "{color.warning.500}", "type": "color", "description": "Theme-specific warning focus color." }, + "danger": { "value": "{color.danger.500}", "type": "color", "description": "Theme-specific danger focus color." }, + "light": { "value": "{color.light.500}", "type": "color", "description": "Theme-specific light focus color." }, + "dark": { "value": "{color.dark.500}", "type": "color", "description": "Theme-specific dark focus color." }, + "gray": { "value": "{color.gray.500}", "type": "color", "description": "Theme-specific gray focus color." } }, "default": { "primary": { "value": "{color.primary.500}", "type": "color", "description": "Theme-specific primary default color." }, From 2b79e3aeaf2ab15cd782b93f206ff592d5cfe10f Mon Sep 17 00:00:00 2001 From: PKulkoRaccoonGang Date: Tue, 26 Dec 2023 22:01:19 +0200 Subject: [PATCH 23/23] refactor: code refactoring --- .../functions/trackGenerateComponent.js | 26 ++++++++++++++----- 1 file changed, 19 insertions(+), 7 deletions(-) diff --git a/www/netlify/functions/trackGenerateComponent.js b/www/netlify/functions/trackGenerateComponent.js index 52b21f548d..5f44db94a7 100644 --- a/www/netlify/functions/trackGenerateComponent.js +++ b/www/netlify/functions/trackGenerateComponent.js @@ -1,12 +1,24 @@ -const { handler: actualHandler } = require('./sendAnalyticsData'); +const { v4: uuidv4 } = require('uuid'); +const Analytics = require('analytics-node'); +const { COMPONENT_GENERATED_EVENT } = require('../../segment-events'); + +const analytics = new Analytics(process.env.SEGMENT_KEY); exports.handler = async function eventHandler(event) { - const body = JSON.parse(event.body); - event.body = JSON.stringify({ - ...body, - eventId: COMPONENT_GENERATED_EVENT, - properties: { componentName: body.componentName }, + // Only allow POST + if (event.httpMethod !== 'POST') { + return { statusCode: 405, body: 'Method Not Allowed' }; + } + const { componentName } = JSON.parse(event.body); + // dispatch event to Segment + analytics.track({ + anonymousId: uuidv4(), + event: COMPONENT_GENERATED_EVENT, + properties: { componentName }, }); - return actualHandler(event); + return { + statusCode: 200, + body: JSON.stringify({ success: true }), + }; };