diff --git a/browser/package-lock.json b/browser/package-lock.json index d434411ce..0488d5568 100644 --- a/browser/package-lock.json +++ b/browser/package-lock.json @@ -13,9 +13,10 @@ "@types/react-router": "^5.1.19", "@types/react-transition-group": "2.9.2", "classnames": "2.3.1", + "dompurify": "^3.2.6", "file-saver": "1.3.8", "igniteui-dockmanager": "^1.17.0", - "igniteui-react": "^19.2.0", + "igniteui-react": "19.3.0-rc.1", "igniteui-react-charts": "^19.0.1", "igniteui-react-core": "^19.0.1", "igniteui-react-dashboards": "^19.0.1", @@ -29,8 +30,10 @@ "igniteui-react-maps": "^19.0.1", "igniteui-react-spreadsheet": "^19.0.1", "igniteui-react-spreadsheet-chart-adapter": "^19.0.1", - "igniteui-webcomponents": "6.2.0", + "igniteui-webcomponents": "^6.2.0", "lit-html": "^3.2.0", + "marked": "^12.0.0", + "marked-shiki": "^1.2.0", "prop-types": "15.7.2", "react": "^18.2.0", "react-dom": "^18.2.0", @@ -39,6 +42,7 @@ "react-router": "4.3.1", "react-router-dom": "^5.2.0", "react-transition-group": "4.4.2", + "shiki": "^3.0.0", "tslib": "^2.4.0" }, "devDependencies": { @@ -4137,6 +4141,73 @@ "integrity": "sha512-0HejFckBN2W+ucM6cUOlwsByTKt9/+0tWhqUffNIcHqCXkthY/mZ7AuYPK/2IIaGWhdl0h+tICDO0ssLMd6XMQ==", "dev": true }, + "node_modules/@shikijs/core": { + "version": "3.13.0", + "resolved": "https://registry.npmjs.org/@shikijs/core/-/core-3.13.0.tgz", + "integrity": "sha512-3P8rGsg2Eh2qIHekwuQjzWhKI4jV97PhvYjYUzGqjvJfqdQPz+nMlfWahU24GZAyW1FxFI1sYjyhfh5CoLmIUA==", + "license": "MIT", + "dependencies": { + "@shikijs/types": "3.13.0", + "@shikijs/vscode-textmate": "^10.0.2", + "@types/hast": "^3.0.4", + "hast-util-to-html": "^9.0.5" + } + }, + "node_modules/@shikijs/engine-javascript": { + "version": "3.13.0", + "resolved": "https://registry.npmjs.org/@shikijs/engine-javascript/-/engine-javascript-3.13.0.tgz", + "integrity": "sha512-Ty7xv32XCp8u0eQt8rItpMs6rU9Ki6LJ1dQOW3V/56PKDcpvfHPnYFbsx5FFUP2Yim34m/UkazidamMNVR4vKg==", + "license": "MIT", + "dependencies": { + "@shikijs/types": "3.13.0", + "@shikijs/vscode-textmate": "^10.0.2", + "oniguruma-to-es": "^4.3.3" + } + }, + "node_modules/@shikijs/engine-oniguruma": { + "version": "3.13.0", + "resolved": "https://registry.npmjs.org/@shikijs/engine-oniguruma/-/engine-oniguruma-3.13.0.tgz", + "integrity": "sha512-O42rBGr4UDSlhT2ZFMxqM7QzIU+IcpoTMzb3W7AlziI1ZF7R8eS2M0yt5Ry35nnnTX/LTLXFPUjRFCIW+Operg==", + "license": "MIT", + "dependencies": { + "@shikijs/types": "3.13.0", + "@shikijs/vscode-textmate": "^10.0.2" + } + }, + "node_modules/@shikijs/langs": { + "version": "3.13.0", + "resolved": "https://registry.npmjs.org/@shikijs/langs/-/langs-3.13.0.tgz", + "integrity": "sha512-672c3WAETDYHwrRP0yLy3W1QYB89Hbpj+pO4KhxK6FzIrDI2FoEXNiNCut6BQmEApYLfuYfpgOZaqbY+E9b8wQ==", + "license": "MIT", + "dependencies": { + "@shikijs/types": "3.13.0" + } + }, + "node_modules/@shikijs/themes": { + "version": "3.13.0", + "resolved": "https://registry.npmjs.org/@shikijs/themes/-/themes-3.13.0.tgz", + "integrity": "sha512-Vxw1Nm1/Od8jyA7QuAenaV78BG2nSr3/gCGdBkLpfLscddCkzkL36Q5b67SrLLfvAJTOUzW39x4FHVCFriPVgg==", + "license": "MIT", + "dependencies": { + "@shikijs/types": "3.13.0" + } + }, + "node_modules/@shikijs/types": { + "version": "3.13.0", + "resolved": "https://registry.npmjs.org/@shikijs/types/-/types-3.13.0.tgz", + "integrity": "sha512-oM9P+NCFri/mmQ8LoFGVfVyemm5Hi27330zuOBp0annwJdKH1kOLndw3zCtAVDehPLg9fKqoEx3Ht/wNZxolfw==", + "license": "MIT", + "dependencies": { + "@shikijs/vscode-textmate": "^10.0.2", + "@types/hast": "^3.0.4" + } + }, + "node_modules/@shikijs/vscode-textmate": { + "version": "10.0.2", + "resolved": "https://registry.npmjs.org/@shikijs/vscode-textmate/-/vscode-textmate-10.0.2.tgz", + "integrity": "sha512-83yeghZ2xxin3Nj8z1NMd/NCuca+gsYXswywDy5bHvwlWL8tpTQmzGeUuHd9FC3E/SBEMvzJRwWEOz5gGes9Qg==", + "license": "MIT" + }, "node_modules/@sinclair/typebox": { "version": "0.27.8", "resolved": "https://registry.npmjs.org/@sinclair/typebox/-/typebox-0.27.8.tgz", @@ -4699,6 +4770,15 @@ "chokidar": "^3.3.1" } }, + "node_modules/@types/hast": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/@types/hast/-/hast-3.0.4.tgz", + "integrity": "sha512-WPs+bbQw5aCj+x6laNGWLH3wviHtoCv/P3+otBhbOhJgG8qtpdAMlTCxLtsTWA7LH1Oh/bFCHsBn0TPS5m30EQ==", + "license": "MIT", + "dependencies": { + "@types/unist": "*" + } + }, "node_modules/@types/history": { "version": "4.7.11", "resolved": "https://registry.npmjs.org/@types/history/-/history-4.7.11.tgz", @@ -5044,8 +5124,7 @@ "node_modules/@types/unist": { "version": "2.0.10", "resolved": "https://registry.npmjs.org/@types/unist/-/unist-2.0.10.tgz", - "integrity": "sha512-IfYcSBWE3hLpBg8+X2SEa8LVkJdJEkT2Ese2aaLs3ptGdVtABxndrMaxuFlQ1qdFf9Q5rDvDpxI3WwgvKFAsQA==", - "dev": true + "integrity": "sha512-IfYcSBWE3hLpBg8+X2SEa8LVkJdJEkT2Ese2aaLs3ptGdVtABxndrMaxuFlQ1qdFf9Q5rDvDpxI3WwgvKFAsQA==" }, "node_modules/@types/vinyl": { "version": "2.0.11", @@ -5333,8 +5412,7 @@ "node_modules/@ungap/structured-clone": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/@ungap/structured-clone/-/structured-clone-1.2.0.tgz", - "integrity": "sha512-zuVdFrMJiuCDQUMCzQaD6KL28MjnqqN8XnAqiEq9PNm/hCPTSGfrXCOfwj1ow4LFb/tNymJPwsNbVePc1xFqrQ==", - "dev": true + "integrity": "sha512-zuVdFrMJiuCDQUMCzQaD6KL28MjnqqN8XnAqiEq9PNm/hCPTSGfrXCOfwj1ow4LFb/tNymJPwsNbVePc1xFqrQ==" }, "node_modules/@webassemblyjs/ast": { "version": "1.14.1", @@ -7229,6 +7307,16 @@ "node": ">=4" } }, + "node_modules/ccount": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/ccount/-/ccount-2.0.1.tgz", + "integrity": "sha512-eyrF0jiFpY+3drT6383f1qhkbGsLSifNAjA61IUjZjmLCWjItY6LB9ft9YhoDgwfmclB2zhu51Lc7+95b8NRAg==", + "license": "MIT", + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, "node_modules/chalk": { "version": "4.1.2", "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", @@ -7264,6 +7352,26 @@ "url": "https://github.com/sponsors/wooorm" } }, + "node_modules/character-entities-html4": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/character-entities-html4/-/character-entities-html4-2.1.0.tgz", + "integrity": "sha512-1v7fgQRj6hnSwFpq1Eu0ynr/CDEw0rXo2B61qXrLNdHZmPKgb7fqS1a2JwF0rISo9q77jDI8VMEHoApn8qDoZA==", + "license": "MIT", + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, + "node_modules/character-entities-legacy": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/character-entities-legacy/-/character-entities-legacy-3.0.0.tgz", + "integrity": "sha512-RpPp0asT/6ufRm//AJVwpViZbGM/MkjQFxJccQRHmISF/22NBtsHqAWmL+/pmkPWoIUJdWyeVleTl1wydHATVQ==", + "license": "MIT", + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, "node_modules/check-types": { "version": "11.2.3", "resolved": "https://registry.npmjs.org/check-types/-/check-types-11.2.3.tgz", @@ -7627,6 +7735,16 @@ "node": ">= 0.8" } }, + "node_modules/comma-separated-tokens": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/comma-separated-tokens/-/comma-separated-tokens-2.0.3.tgz", + "integrity": "sha512-Fu4hJdvzeylCfQPp9SGWidpzrMs7tTrlu6Vb8XGaRGck8QSNZJJp538Wrb60Lax4fPwR64ViY468OIUTbRlGZg==", + "license": "MIT", + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, "node_modules/commander": { "version": "8.3.0", "resolved": "https://registry.npmjs.org/commander/-/commander-8.3.0.tgz", @@ -8628,7 +8746,6 @@ "version": "2.0.3", "resolved": "https://registry.npmjs.org/dequal/-/dequal-2.0.3.tgz", "integrity": "sha512-0je+qPKHEMohvfRTCEo3CrPG6cAzAYgmzKyxRiYSSDkS6eGJdyVJm7WaYA5ECaAD9wLB2T4EEeymA5aFVcYXCA==", - "dev": true, "engines": { "node": ">=6" } @@ -8712,6 +8829,19 @@ "node": ">= 0.8.0" } }, + "node_modules/devlop": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/devlop/-/devlop-1.1.0.tgz", + "integrity": "sha512-RWmIqhcFf1lRYBvNmr7qTNuyCt/7/ns2jbpp1+PalgE/rDQcBT0fioSMUpJ93irlUhC5hrg4cYqe6U+0ImW0rA==", + "license": "MIT", + "dependencies": { + "dequal": "^2.0.0" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, "node_modules/didyoumean": { "version": "1.2.2", "resolved": "https://registry.npmjs.org/didyoumean/-/didyoumean-1.2.2.tgz", @@ -8859,6 +8989,15 @@ "url": "https://github.com/fb55/domhandler?sponsor=1" } }, + "node_modules/dompurify": { + "version": "3.2.7", + "resolved": "https://registry.npmjs.org/dompurify/-/dompurify-3.2.7.tgz", + "integrity": "sha512-WhL/YuveyGXJaerVlMYGWhvQswa7myDG17P7Vu65EWC05o8vfeNbvNf4d/BOvH99+ZW+LlQsc1GDKMa1vNK6dw==", + "license": "(MPL-2.0 OR Apache-2.0)", + "optionalDependencies": { + "@types/trusted-types": "^2.0.7" + } + }, "node_modules/domutils": { "version": "2.8.0", "resolved": "https://registry.npmjs.org/domutils/-/domutils-2.8.0.tgz", @@ -12717,6 +12856,48 @@ "node": ">= 0.4" } }, + "node_modules/hast-util-to-html": { + "version": "9.0.5", + "resolved": "https://registry.npmjs.org/hast-util-to-html/-/hast-util-to-html-9.0.5.tgz", + "integrity": "sha512-OguPdidb+fbHQSU4Q4ZiLKnzWo8Wwsf5bZfbvu7//a9oTYoqD/fWpe96NuHkoS9h0ccGOTe0C4NGXdtS0iObOw==", + "license": "MIT", + "dependencies": { + "@types/hast": "^3.0.0", + "@types/unist": "^3.0.0", + "ccount": "^2.0.0", + "comma-separated-tokens": "^2.0.0", + "hast-util-whitespace": "^3.0.0", + "html-void-elements": "^3.0.0", + "mdast-util-to-hast": "^13.0.0", + "property-information": "^7.0.0", + "space-separated-tokens": "^2.0.0", + "stringify-entities": "^4.0.0", + "zwitch": "^2.0.4" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/hast-util-to-html/node_modules/@types/unist": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/@types/unist/-/unist-3.0.3.tgz", + "integrity": "sha512-ko/gIFJRv177XgZsZcBwnqJN5x/Gien8qNOn0D5bQU/zAzVf9Zt3BlcUiLqhV9y4ARk0GbT3tnUiPNgnTXzc/Q==", + "license": "MIT" + }, + "node_modules/hast-util-whitespace": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/hast-util-whitespace/-/hast-util-whitespace-3.0.0.tgz", + "integrity": "sha512-88JUN06ipLwsnv+dVn+OIYOvAuvBMy/Qoi6O7mQHxdPXpjy+Cd6xRkWwux7DKO+4sYILtLBRIKgsdpS2gQc7qw==", + "license": "MIT", + "dependencies": { + "@types/hast": "^3.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, "node_modules/he": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/he/-/he-1.2.0.tgz", @@ -12838,6 +13019,16 @@ "node": ">=12" } }, + "node_modules/html-void-elements": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/html-void-elements/-/html-void-elements-3.0.0.tgz", + "integrity": "sha512-bEqo66MRXsUGxWHV5IP0PUiAWwoEjba4VCzg0LjFJBpchPaTfyfCKTG6bc5F8ucKec3q5y6qOdGyYTSBEvhCrg==", + "license": "MIT", + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, "node_modules/html-webpack-plugin": { "version": "5.6.0", "resolved": "https://registry.npmjs.org/html-webpack-plugin/-/html-webpack-plugin-5.6.0.tgz", @@ -13073,14 +13264,14 @@ } }, "node_modules/igniteui-react": { - "version": "19.2.0", - "resolved": "https://registry.npmjs.org/igniteui-react/-/igniteui-react-19.2.0.tgz", - "integrity": "sha512-Yve116z/AkFQtAabqKdbNVygVIFu3UL4WIFV9YcmQf0ExM3678F3mv8DVMNr56Lnj+Rdj7aQ4j5qMA9Xfr1Khg==", + "version": "19.3.0-rc.1", + "resolved": "https://registry.npmjs.org/igniteui-react/-/igniteui-react-19.3.0-rc.1.tgz", + "integrity": "sha512-KWH+IiFrqcsbEWib46BIBDaK9E97JgdNWRhWk0XtzLYFvcqSB4475A9OwfVMvAjj6uKZ8/buYC10jAgH96wcLg==", "license": "Infragistics(R) Ultimate license (http://www.infragistics.com/legal/ultimate/license/)", "dependencies": { "@lit/react": "^1.0.7", - "igniteui-dockmanager": "~1.16.0", - "igniteui-webcomponents": "~6.2.0", + "igniteui-dockmanager": "~1.17.0", + "igniteui-webcomponents": "~6.3.1", "lit": "^3.3.0" } }, @@ -13252,24 +13443,16 @@ "igniteui-react-spreadsheet": "25.1.0.45" } }, - "node_modules/igniteui-react/node_modules/igniteui-dockmanager": { - "version": "1.16.1", - "resolved": "https://registry.npmjs.org/igniteui-dockmanager/-/igniteui-dockmanager-1.16.1.tgz", - "integrity": "sha512-4sZUTe7kaN5D25wbGDcUOR+m2bseP4LjCZWCKz6h7osbUqdXRPCeXdh2MA9OVUimYXBCaeDVtENLbBAqRXpAiQ==", - "license": "SEE LICENSE IN LICENSE", - "dependencies": { - "igniteui-trial-watermark": "^1.0.3" - } - }, "node_modules/igniteui-trial-watermark": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/igniteui-trial-watermark/-/igniteui-trial-watermark-1.0.3.tgz", "integrity": "sha512-q6thtu+7R6MOB+i9GorFPCcWeOImW43BzCAtKnDAYWwaoueb8Lg1EhBkIhAyfEIH+yZ/9c5lnZdU61/GRPoP+g==" }, "node_modules/igniteui-webcomponents": { - "version": "6.2.0", - "resolved": "https://registry.npmjs.org/igniteui-webcomponents/-/igniteui-webcomponents-6.2.0.tgz", - "integrity": "sha512-hoWGseuMqQ1WDXCfYwalQ7oaI0C8oZAGTij2oFj2KQk+LXn7bdLoB3N7fefAXMweAEzaZopGVkTgZ/ckh2LEGA==", + "version": "6.3.1", + "resolved": "https://registry.npmjs.org/igniteui-webcomponents/-/igniteui-webcomponents-6.3.1.tgz", + "integrity": "sha512-t0D5xpBmtLLaPGAdfsX+u/nyTBUPm4W13sx777YiiTBH5MpYqEkrLirYi1GTJNQ6v7prepUuGOCj7yuSx/MJ3g==", + "license": "SEE LICENSE IN LICENSE", "dependencies": { "@floating-ui/dom": "^1.7.0", "@lit-labs/virtualizer": "^2.1.0", @@ -13278,6 +13461,26 @@ }, "engines": { "node": ">=20" + }, + "peerDependencies": { + "dompurify": "^3.2.0", + "marked": "^16.3.0", + "marked-shiki": "^1.2.0", + "shiki": "^3.12.0" + }, + "peerDependenciesMeta": { + "dompurify": { + "optional": true + }, + "marked": { + "optional": true + }, + "marked-shiki": { + "optional": true + }, + "shiki": { + "optional": true + } } }, "node_modules/igniteui-webcomponents-grids": { @@ -17229,6 +17432,28 @@ "node": ">=0.10.0" } }, + "node_modules/marked": { + "version": "12.0.2", + "resolved": "https://registry.npmjs.org/marked/-/marked-12.0.2.tgz", + "integrity": "sha512-qXUm7e/YKFoqFPYPa3Ukg9xlI5cyAtGmyEIzMfW//m6kXwCy2Ps9DYf5ioijFKQ8qyuscrHoY04iJGctu2Kg0Q==", + "license": "MIT", + "bin": { + "marked": "bin/marked.js" + }, + "engines": { + "node": ">= 18" + } + }, + "node_modules/marked-shiki": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/marked-shiki/-/marked-shiki-1.2.1.tgz", + "integrity": "sha512-yHxYQhPY5oYaIRnROn98foKhuClark7M373/VpLxiy5TrDu9Jd/LsMwo8w+U91Up4oDb9IXFrP0N1MFRz8W/DQ==", + "license": "MIT", + "peerDependencies": { + "marked": ">=7.0.0", + "shiki": ">=1.0.0" + } + }, "node_modules/matchdep": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/matchdep/-/matchdep-2.0.0.tgz", @@ -17471,6 +17696,214 @@ "url": "https://opencollective.com/unified" } }, + "node_modules/mdast-util-to-hast": { + "version": "13.2.0", + "resolved": "https://registry.npmjs.org/mdast-util-to-hast/-/mdast-util-to-hast-13.2.0.tgz", + "integrity": "sha512-QGYKEuUsYT9ykKBCMOEDLsU5JRObWQusAolFMeko/tYPufNkRffBAQjIE+99jbA87xv6FgmjLtwjh9wBWajwAA==", + "license": "MIT", + "dependencies": { + "@types/hast": "^3.0.0", + "@types/mdast": "^4.0.0", + "@ungap/structured-clone": "^1.0.0", + "devlop": "^1.0.0", + "micromark-util-sanitize-uri": "^2.0.0", + "trim-lines": "^3.0.0", + "unist-util-position": "^5.0.0", + "unist-util-visit": "^5.0.0", + "vfile": "^6.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/mdast-util-to-hast/node_modules/@types/mdast": { + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/@types/mdast/-/mdast-4.0.4.tgz", + "integrity": "sha512-kGaNbPh1k7AFzgpud/gMdvIm5xuECykRR+JnWKQno9TAXVa6WIVCGTPvYGekIDL4uwCZQSYbUxNBSb1aUo79oA==", + "license": "MIT", + "dependencies": { + "@types/unist": "*" + } + }, + "node_modules/mdast-util-to-hast/node_modules/@types/unist": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/@types/unist/-/unist-3.0.3.tgz", + "integrity": "sha512-ko/gIFJRv177XgZsZcBwnqJN5x/Gien8qNOn0D5bQU/zAzVf9Zt3BlcUiLqhV9y4ARk0GbT3tnUiPNgnTXzc/Q==", + "license": "MIT" + }, + "node_modules/mdast-util-to-hast/node_modules/micromark-util-character": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/micromark-util-character/-/micromark-util-character-2.1.1.tgz", + "integrity": "sha512-wv8tdUTJ3thSFFFJKtpYKOYiGP2+v96Hvk4Tu8KpCAsTMs6yi+nVmGh1syvSCsaxz45J6Jbw+9DD6g97+NV67Q==", + "funding": [ + { + "type": "GitHub Sponsors", + "url": "https://github.com/sponsors/unifiedjs" + }, + { + "type": "OpenCollective", + "url": "https://opencollective.com/unified" + } + ], + "license": "MIT", + "dependencies": { + "micromark-util-symbol": "^2.0.0", + "micromark-util-types": "^2.0.0" + } + }, + "node_modules/mdast-util-to-hast/node_modules/micromark-util-encode": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/micromark-util-encode/-/micromark-util-encode-2.0.1.tgz", + "integrity": "sha512-c3cVx2y4KqUnwopcO9b/SCdo2O67LwJJ/UyqGfbigahfegL9myoEFoDYZgkT7f36T0bLrM9hZTAaAyH+PCAXjw==", + "funding": [ + { + "type": "GitHub Sponsors", + "url": "https://github.com/sponsors/unifiedjs" + }, + { + "type": "OpenCollective", + "url": "https://opencollective.com/unified" + } + ], + "license": "MIT" + }, + "node_modules/mdast-util-to-hast/node_modules/micromark-util-sanitize-uri": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/micromark-util-sanitize-uri/-/micromark-util-sanitize-uri-2.0.1.tgz", + "integrity": "sha512-9N9IomZ/YuGGZZmQec1MbgxtlgougxTodVwDzzEouPKo3qFWvymFHWcnDi2vzV1ff6kas9ucW+o3yzJK9YB1AQ==", + "funding": [ + { + "type": "GitHub Sponsors", + "url": "https://github.com/sponsors/unifiedjs" + }, + { + "type": "OpenCollective", + "url": "https://opencollective.com/unified" + } + ], + "license": "MIT", + "dependencies": { + "micromark-util-character": "^2.0.0", + "micromark-util-encode": "^2.0.0", + "micromark-util-symbol": "^2.0.0" + } + }, + "node_modules/mdast-util-to-hast/node_modules/micromark-util-symbol": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/micromark-util-symbol/-/micromark-util-symbol-2.0.1.tgz", + "integrity": "sha512-vs5t8Apaud9N28kgCrRUdEed4UJ+wWNvicHLPxCa9ENlYuAY31M0ETy5y1vA33YoNPDFTghEbnh6efaE8h4x0Q==", + "funding": [ + { + "type": "GitHub Sponsors", + "url": "https://github.com/sponsors/unifiedjs" + }, + { + "type": "OpenCollective", + "url": "https://opencollective.com/unified" + } + ], + "license": "MIT" + }, + "node_modules/mdast-util-to-hast/node_modules/micromark-util-types": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/micromark-util-types/-/micromark-util-types-2.0.2.tgz", + "integrity": "sha512-Yw0ECSpJoViF1qTU4DC6NwtC4aWGt1EkzaQB8KPPyCRR8z9TWeV0HbEFGTO+ZY1wB22zmxnJqhPyTpOVCpeHTA==", + "funding": [ + { + "type": "GitHub Sponsors", + "url": "https://github.com/sponsors/unifiedjs" + }, + { + "type": "OpenCollective", + "url": "https://opencollective.com/unified" + } + ], + "license": "MIT" + }, + "node_modules/mdast-util-to-hast/node_modules/unist-util-is": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/unist-util-is/-/unist-util-is-6.0.0.tgz", + "integrity": "sha512-2qCTHimwdxLfz+YzdGfkqNlH0tLi9xjTnHddPmJwtIG9MGsdbutfTc4P+haPD7l7Cjxf/WZj+we5qfVPvvxfYw==", + "license": "MIT", + "dependencies": { + "@types/unist": "^3.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/mdast-util-to-hast/node_modules/unist-util-stringify-position": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/unist-util-stringify-position/-/unist-util-stringify-position-4.0.0.tgz", + "integrity": "sha512-0ASV06AAoKCDkS2+xw5RXJywruurpbC4JZSm7nr7MOt1ojAzvyyaO+UxZf18j8FCF6kmzCZKcAgN/yu2gm2XgQ==", + "license": "MIT", + "dependencies": { + "@types/unist": "^3.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/mdast-util-to-hast/node_modules/unist-util-visit": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/unist-util-visit/-/unist-util-visit-5.0.0.tgz", + "integrity": "sha512-MR04uvD+07cwl/yhVuVWAtw+3GOR/knlL55Nd/wAdblk27GCVt3lqpTivy/tkJcZoNPzTwS1Y+KMojlLDhoTzg==", + "license": "MIT", + "dependencies": { + "@types/unist": "^3.0.0", + "unist-util-is": "^6.0.0", + "unist-util-visit-parents": "^6.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/mdast-util-to-hast/node_modules/unist-util-visit-parents": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/unist-util-visit-parents/-/unist-util-visit-parents-6.0.1.tgz", + "integrity": "sha512-L/PqWzfTP9lzzEa6CKs0k2nARxTdZduw3zyh8d2NVBnsyvHjSX4TWse388YrrQKbvI8w20fGjGlhgT96WwKykw==", + "license": "MIT", + "dependencies": { + "@types/unist": "^3.0.0", + "unist-util-is": "^6.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/mdast-util-to-hast/node_modules/vfile": { + "version": "6.0.3", + "resolved": "https://registry.npmjs.org/vfile/-/vfile-6.0.3.tgz", + "integrity": "sha512-KzIbH/9tXat2u30jf+smMwFCsno4wHVdNmzFyL+T/L3UGqqk6JKfVqOFOZEpZSHADH1k40ab6NUIXZq422ov3Q==", + "license": "MIT", + "dependencies": { + "@types/unist": "^3.0.0", + "vfile-message": "^4.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/mdast-util-to-hast/node_modules/vfile-message": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/vfile-message/-/vfile-message-4.0.3.tgz", + "integrity": "sha512-QTHzsGd1EhbZs4AsQ20JX1rC3cOlt/IWJruk893DfLRr57lcnOeMaWG4K0JrRta4mIJZKth2Au3mM3u03/JWKw==", + "license": "MIT", + "dependencies": { + "@types/unist": "^3.0.0", + "unist-util-stringify-position": "^4.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, "node_modules/mdast-util-to-markdown": { "version": "1.5.0", "resolved": "https://registry.npmjs.org/mdast-util-to-markdown/-/mdast-util-to-markdown-1.5.0.tgz", @@ -18800,6 +19233,23 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/oniguruma-parser": { + "version": "0.12.1", + "resolved": "https://registry.npmjs.org/oniguruma-parser/-/oniguruma-parser-0.12.1.tgz", + "integrity": "sha512-8Unqkvk1RYc6yq2WBYRj4hdnsAxVze8i7iPfQr8e4uSP3tRv0rpZcbGUDvxfQQcdwHt/e9PrMvGCsa8OqG9X3w==", + "license": "MIT" + }, + "node_modules/oniguruma-to-es": { + "version": "4.3.3", + "resolved": "https://registry.npmjs.org/oniguruma-to-es/-/oniguruma-to-es-4.3.3.tgz", + "integrity": "sha512-rPiZhzC3wXwE59YQMRDodUwwT9FZ9nNBwQQfsd1wfdtlKEyCdRV0avrTcSZ5xlIvGRVPd/cx6ZN45ECmS39xvg==", + "license": "MIT", + "dependencies": { + "oniguruma-parser": "^0.12.1", + "regex": "^6.0.1", + "regex-recursion": "^6.0.2" + } + }, "node_modules/open": { "version": "8.4.2", "resolved": "https://registry.npmjs.org/open/-/open-8.4.2.tgz", @@ -20868,6 +21318,16 @@ "resolved": "https://registry.npmjs.org/react-is/-/react-is-16.13.1.tgz", "integrity": "sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ==" }, + "node_modules/property-information": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/property-information/-/property-information-7.1.0.tgz", + "integrity": "sha512-TwEZ+X+yCJmYfL7TPUOcvBZ4QfoT5YenQiJuX//0th53DE6w0xxLEtfK3iyryQFddXuvkIk51EEgrJQ0WJkOmQ==", + "license": "MIT", + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, "node_modules/proxy-addr": { "version": "2.0.7", "resolved": "https://registry.npmjs.org/proxy-addr/-/proxy-addr-2.0.7.tgz", @@ -21564,6 +22024,15 @@ "@babel/runtime": "^7.8.4" } }, + "node_modules/regex": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/regex/-/regex-6.0.1.tgz", + "integrity": "sha512-uorlqlzAKjKQZ5P+kTJr3eeJGSVroLKoHmquUj4zHWuR+hEyNqlXsSKlYYF5F4NI6nl7tWCs0apKJ0lmfsXAPA==", + "license": "MIT", + "dependencies": { + "regex-utilities": "^2.3.0" + } + }, "node_modules/regex-not": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/regex-not/-/regex-not-1.0.2.tgz", @@ -21583,6 +22052,21 @@ "integrity": "sha512-TVILVSz2jY5D47F4mA4MppkBrafEaiUWJO/TcZHEIuI13AqoZMkK1WMA4Om1YkYbTx+9Ki1/tSUXbceyr9saRg==", "dev": true }, + "node_modules/regex-recursion": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/regex-recursion/-/regex-recursion-6.0.2.tgz", + "integrity": "sha512-0YCaSCq2VRIebiaUviZNs0cBz1kg5kVS2UKUfNIx8YVs1cN3AV7NTctO5FOKBA+UT2BPJIWZauYHPqJODG50cg==", + "license": "MIT", + "dependencies": { + "regex-utilities": "^2.3.0" + } + }, + "node_modules/regex-utilities": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/regex-utilities/-/regex-utilities-2.3.0.tgz", + "integrity": "sha512-8VhliFJAWRaUiVvREIiW2NXXTmHs4vMNnSzuJVhscgmGav3g9VDxLrQndI3dZZVVdp0ZO/5v0xmX516/7M9cng==", + "license": "MIT" + }, "node_modules/regexp.prototype.flags": { "version": "1.5.2", "resolved": "https://registry.npmjs.org/regexp.prototype.flags/-/regexp.prototype.flags-1.5.2.tgz", @@ -23049,6 +23533,22 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/shiki": { + "version": "3.13.0", + "resolved": "https://registry.npmjs.org/shiki/-/shiki-3.13.0.tgz", + "integrity": "sha512-aZW4l8Og16CokuCLf8CF8kq+KK2yOygapU5m3+hoGw0Mdosc6fPitjM+ujYarppj5ZIKGyPDPP1vqmQhr+5/0g==", + "license": "MIT", + "dependencies": { + "@shikijs/core": "3.13.0", + "@shikijs/engine-javascript": "3.13.0", + "@shikijs/engine-oniguruma": "3.13.0", + "@shikijs/langs": "3.13.0", + "@shikijs/themes": "3.13.0", + "@shikijs/types": "3.13.0", + "@shikijs/vscode-textmate": "^10.0.2", + "@types/hast": "^3.0.4" + } + }, "node_modules/side-channel": { "version": "1.0.6", "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.0.6.tgz", @@ -23416,6 +23916,16 @@ "deprecated": "Please use @jridgewell/sourcemap-codec instead", "dev": true }, + "node_modules/space-separated-tokens": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/space-separated-tokens/-/space-separated-tokens-2.0.2.tgz", + "integrity": "sha512-PEGlAwrG8yXGXRjW32fGbg66JAlOAwbObuqVoJpv/mRgoWDQfgH1wDPvtzWyUSNAXBGSk8h755YDbbcEy3SH2Q==", + "license": "MIT", + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, "node_modules/sparkles": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/sparkles/-/sparkles-1.0.1.tgz", @@ -23906,6 +24416,20 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/stringify-entities": { + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/stringify-entities/-/stringify-entities-4.0.4.tgz", + "integrity": "sha512-IwfBptatlO+QCJUo19AqvrPNqlVMpW9YEL2LIVY+Rpv2qsjCGxaDLNRgeGsQWJhfItebuJhsGSLjaBbNSQ+ieg==", + "license": "MIT", + "dependencies": { + "character-entities-html4": "^2.0.0", + "character-entities-legacy": "^3.0.0" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, "node_modules/stringify-object": { "version": "3.3.0", "resolved": "https://registry.npmjs.org/stringify-object/-/stringify-object-3.3.0.tgz", @@ -24836,6 +25360,16 @@ "node": ">=8" } }, + "node_modules/trim-lines": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/trim-lines/-/trim-lines-3.0.1.tgz", + "integrity": "sha512-kRj8B+YHZCc9kQYdWfJB2/oUl9rA99qbowYYBtr4ui4mZyAQ2JpvVBd/6U2YloATfqBhBTSMhTpgBHtU0Mf3Rg==", + "license": "MIT", + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, "node_modules/trough": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/trough/-/trough-2.2.0.tgz", @@ -25389,6 +25923,25 @@ "url": "https://opencollective.com/unified" } }, + "node_modules/unist-util-position": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/unist-util-position/-/unist-util-position-5.0.0.tgz", + "integrity": "sha512-fucsC7HjXvkB5R3kTCO7kUjRdrS0BJt3M/FPxmHMBOm8JQi2BsHAHFsy27E0EolP8rp0NzXsJ+jNPyDWvOJZPA==", + "license": "MIT", + "dependencies": { + "@types/unist": "^3.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/unist-util-position/node_modules/@types/unist": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/@types/unist/-/unist-3.0.3.tgz", + "integrity": "sha512-ko/gIFJRv177XgZsZcBwnqJN5x/Gien8qNOn0D5bQU/zAzVf9Zt3BlcUiLqhV9y4ARk0GbT3tnUiPNgnTXzc/Q==", + "license": "MIT" + }, "node_modules/unist-util-stringify-position": { "version": "3.0.3", "resolved": "https://registry.npmjs.org/unist-util-stringify-position/-/unist-util-stringify-position-3.0.3.tgz", @@ -26958,7 +27511,6 @@ "version": "2.0.4", "resolved": "https://registry.npmjs.org/zwitch/-/zwitch-2.0.4.tgz", "integrity": "sha512-bXE4cR/kVZhKZX/RjPEflHaKVhUVl85noU3v6b8apfQEc1x4A+zBxjZ4lN8LqGd6WZ3dl98pY4o717VFmoPp+A==", - "dev": true, "funding": { "type": "github", "url": "https://github.com/sponsors/wooorm" diff --git a/browser/package.json b/browser/package.json index f3d7582e4..7b3e9d0b6 100644 --- a/browser/package.json +++ b/browser/package.json @@ -22,9 +22,10 @@ "@types/react-router": "^5.1.19", "@types/react-transition-group": "2.9.2", "classnames": "2.3.1", + "dompurify": "^3.2.6", "file-saver": "1.3.8", "igniteui-dockmanager": "^1.17.0", - "igniteui-react": "^19.2.0", + "igniteui-react": "19.3.0-rc.1", "igniteui-react-charts": "^19.0.1", "igniteui-react-core": "^19.0.1", "igniteui-react-dashboards": "^19.0.1", @@ -40,6 +41,8 @@ "igniteui-react-spreadsheet-chart-adapter": "^19.0.1", "igniteui-webcomponents": "^6.2.0", "lit-html": "^3.2.0", + "marked": "^12.0.0", + "marked-shiki": "^1.2.0", "prop-types": "15.7.2", "react": "^18.2.0", "react-dom": "^18.2.0", @@ -48,6 +51,7 @@ "react-router": "4.3.1", "react-router-dom": "^5.2.0", "react-transition-group": "4.4.2", + "shiki": "^3.0.0", "tslib": "^2.4.0" }, "devDependencies": { diff --git a/browser/public/meta.json b/browser/public/meta.json index 3e100a9f0..0b9bc519a 100644 --- a/browser/public/meta.json +++ b/browser/public/meta.json @@ -1 +1 @@ -{"version":"23.2.915","date":"2025-09-05 14:48:39","note":"this file is auto-generated"} \ No newline at end of file +{"version":"23.2.915","date":"2025-10-06 11:38:17","note":"this file is auto-generated"} \ No newline at end of file diff --git a/browser/src/navigation/SamplesBrowser.json b/browser/src/navigation/SamplesBrowser.json index 3e100a9f0..0b9bc519a 100644 --- a/browser/src/navigation/SamplesBrowser.json +++ b/browser/src/navigation/SamplesBrowser.json @@ -1 +1 @@ -{"version":"23.2.915","date":"2025-09-05 14:48:39","note":"this file is auto-generated"} \ No newline at end of file +{"version":"23.2.915","date":"2025-10-06 11:38:17","note":"this file is auto-generated"} \ No newline at end of file diff --git a/browser/src/navigation/SamplesBrowser.tsx b/browser/src/navigation/SamplesBrowser.tsx index 3e2308b3a..e6dfb1fc3 100644 --- a/browser/src/navigation/SamplesBrowser.tsx +++ b/browser/src/navigation/SamplesBrowser.tsx @@ -23,6 +23,7 @@ import { editorsRoutingData } from "../samples/editors/RoutingData"; import { notificationsRoutingData } from "../samples/notifications/RoutingData"; import { menusRoutingData } from "../samples/menus/RoutingData"; import { schedulingRoutingData } from "../samples/scheduling/RoutingData"; +import { interactionsRoutingData } from "../samples/interactions/RoutingData"; // import { SamplesBuster, SamplesBusterState } from '../SamplesBuster'; import SamplesCache from './SamplesCache'; @@ -89,7 +90,8 @@ export class SamplesBrowser extends React.Component editorsRoutingData, notificationsRoutingData, menusRoutingData, - schedulingRoutingData + schedulingRoutingData, + interactionsRoutingData ]; for (const routingData of routingProviders) { diff --git a/browser/tasks/gulp-samples.js b/browser/tasks/gulp-samples.js index faf61ca04..fa9653225 100644 --- a/browser/tasks/gulp-samples.js +++ b/browser/tasks/gulp-samples.js @@ -856,7 +856,7 @@ function updateIG(cb) { { version: "^19.0.1", name: "igniteui-react-spreadsheet" }, { version: "^19.0.1", name: "igniteui-react-datasources" }, { version: "^19.0.1", name: "igniteui-react-dashboards" }, - { version: "^19.2.0", name: "igniteui-react" }, + { version: "19.3.0-rc.1", name: "igniteui-react" }, // these IG packages are sometimes updated: { version: "^6.2.0", name: "igniteui-webcomponents" }, { version: "^1.17.0", name: "igniteui-dockmanager" }, diff --git a/samples/interactions/chat/features/.eslintrc.js b/samples/interactions/chat/features/.eslintrc.js new file mode 100644 index 000000000..b45160a9e --- /dev/null +++ b/samples/interactions/chat/features/.eslintrc.js @@ -0,0 +1,75 @@ +// https://www.robertcooper.me/using-eslint-and-prettier-in-a-typescript-project +module.exports = { + parser: "@typescript-eslint/parser", // Specifies the ESLint parser + parserOptions: { + ecmaVersion: 2020, // Allows for the parsing of modern ECMAScript features + sourceType: "module", // Allows for the use of imports + ecmaFeatures: { + jsx: true // Allows for the parsing of JSX + } + }, + settings: { + react: { + version: "999.999.999" // Tells eslint-plugin-react to automatically detect the version of React to use + } + }, + extends: [ + "eslint:recommended", + "plugin:react/recommended", // Uses the recommended rules from @eslint-plugin-react + "plugin:@typescript-eslint/recommended" // Uses the recommended rules from @typescript-eslint/eslint-plugin + ], + rules: { + // Place to specify ESLint rules. Can be used to overwrite rules specified from the extended configs + "default-case": "off", + "no-undef": "off", + "no-unused-vars": "off", + "no-extend-native": "off", + "no-throw-literal": "off", + "no-useless-concat": "off", + "no-mixed-operators": "off", + "no-prototype-builtins": "off", + "prefer-const": "off", + "prefer-rest-params": "off", + "jsx-a11y/alt-text": "off", + "jsx-a11y/iframe-has-title": "off", + "@typescript-eslint/no-unused-vars": "off", + "@typescript-eslint/no-explicit-any": "off", + "@typescript-eslint/no-inferrable-types": "off", + "@typescript-eslint/no-useless-constructor": "off", + "@typescript-eslint/no-use-before-define": "off", + "@typescript-eslint/no-non-null-assertion": "off", + "@typescript-eslint/interface-name-prefix": "off", + "@typescript-eslint/prefer-namespace-keyword": "off", + "@typescript-eslint/explicit-function-return-type": "off", + "@typescript-eslint/explicit-module-boundary-types": "off" + }, + "overrides": [ + { + "files": ["*.ts", "*.tsx"], + "rules": { + "default-case": "off", + "no-undef": "off", + "no-unused-vars": "off", + "no-extend-native": "off", + "no-throw-literal": "off", + "no-useless-concat": "off", + "no-mixed-operators": "off", + "no-prototype-builtins": "off", + "prefer-const": "off", + "prefer-rest-params": "off", + "jsx-a11y/alt-text": "off", + "jsx-a11y/iframe-has-title": "off", + "@typescript-eslint/no-unused-vars": "off", + "@typescript-eslint/no-explicit-any": "off", + "@typescript-eslint/no-inferrable-types": "off", + "@typescript-eslint/no-useless-constructor": "off", + "@typescript-eslint/no-use-before-define": "off", + "@typescript-eslint/no-non-null-assertion": "off", + "@typescript-eslint/interface-name-prefix": "off", + "@typescript-eslint/prefer-namespace-keyword": "off", + "@typescript-eslint/explicit-function-return-type": "off", + "@typescript-eslint/explicit-module-boundary-types": "off" + } + } + ] + }; \ No newline at end of file diff --git a/samples/interactions/chat/features/README.md b/samples/interactions/chat/features/README.md new file mode 100644 index 000000000..0ebf76fe7 --- /dev/null +++ b/samples/interactions/chat/features/README.md @@ -0,0 +1,56 @@ + + + +This folder contains implementation of React application with example of Features feature using [Chat](https://www.infragistics.com/products/ignite-ui-react/react/components/general-getting-started.html) component. + + + + + + View Docs + + + View Code + + + Run Sample + + + Run Sample + + + + +## Branches + +> **_NOTE:_** You should use [master](https://github.com/IgniteUI/igniteui-react-examples/tree/master) branch of this repository if you want to run samples on your computer. Use the [vnext](https://github.com/IgniteUI/igniteui-react-examples/tree/vnext) branch only when you want to contribute new samples to this repository. + +## Instructions + +Follow these instructions to run this example: + + +``` +git clone https://github.com/IgniteUI/igniteui-react-examples.git +git checkout master +cd ./igniteui-react-examples +cd ./samples/interactions/chat/features +``` + +open above folder in VS Code or type: +``` +code . +``` + +In terminal window, run: +``` +npm install --legacy-peer-deps +npm run-script start +``` + +Then open http://localhost:4200/ in your browser + + +## Learn More + +To learn more about **Ignite UI for React** components, check out the [React documentation](https://www.infragistics.com/products/ignite-ui-react/react/components/general-getting-started.html). diff --git a/samples/interactions/chat/features/package.json b/samples/interactions/chat/features/package.json new file mode 100644 index 000000000..b442c00ff --- /dev/null +++ b/samples/interactions/chat/features/package.json @@ -0,0 +1,42 @@ +{ + "name": "react-chat-features", + "description": "This project provides example of Chat Features using Infragistics React components", + "author": "Infragistics", + "homepage": ".", + "version": "1.4.0", + "private": true, + "scripts": { + "start": "set PORT=4200 && react-scripts --max_old_space_size=10240 start", + "build": "react-scripts --max_old_space_size=10240 build ", + "test": "react-scripts test --env=jsdom", + "eject": "react-scripts eject" + }, + "dependencies": { + "igniteui-dockmanager": "^1.17.0", + "igniteui-react": "19.3.0-rc.1", + "igniteui-react-core": "^19.0.1", + "dompurify": "^3.2.6", + "marked": "^12.0.0", + "marked-shiki": "^1.2.0", + "react": "^18.2.0", + "react-dom": "^18.2.0", + "react-scripts": "^5.0.1", + "shiki": "^3.0.0", + "tslib": "^2.4.0" + }, + "devDependencies": { + "@types/jest": "^29.2.0", + "@types/node": "^18.11.7", + "@types/react": "^18.0.24", + "@types/react-dom": "^18.0.8", + "react-app-rewired": "^2.2.1", + "typescript": "^4.8.4", + "worker-loader": "^3.0.8" + }, + "browserslist": [ + ">0.2%", + "not dead", + "not ie <= 11", + "not op_mini all" + ] +} diff --git a/samples/interactions/chat/features/public/index.html b/samples/interactions/chat/features/public/index.html new file mode 100644 index 000000000..7cb63a2f3 --- /dev/null +++ b/samples/interactions/chat/features/public/index.html @@ -0,0 +1,10 @@ + + + + ChatFeatures + + + +
+ + \ No newline at end of file diff --git a/samples/interactions/chat/features/sandbox.config.json b/samples/interactions/chat/features/sandbox.config.json new file mode 100644 index 000000000..00acba0c1 --- /dev/null +++ b/samples/interactions/chat/features/sandbox.config.json @@ -0,0 +1,5 @@ +{ + "infiniteLoopProtection": false, + "hardReloadOnChange": false, + "view": "browser" +} \ No newline at end of file diff --git a/samples/interactions/chat/features/src/ChatFeatures.css b/samples/interactions/chat/features/src/ChatFeatures.css new file mode 100644 index 000000000..0283e6ce2 --- /dev/null +++ b/samples/interactions/chat/features/src/ChatFeatures.css @@ -0,0 +1,4 @@ +.chat-wrapper { + width: 100%; + height: 100%; +} diff --git a/samples/interactions/chat/features/src/index.css b/samples/interactions/chat/features/src/index.css new file mode 100644 index 000000000..e69de29bb diff --git a/samples/interactions/chat/features/src/index.tsx b/samples/interactions/chat/features/src/index.tsx new file mode 100644 index 000000000..e33d4055d --- /dev/null +++ b/samples/interactions/chat/features/src/index.tsx @@ -0,0 +1,146 @@ +import React, { useState, useEffect } from "react"; +import ReactDOM from "react-dom/client"; +import "./index.css"; +import "./ChatFeatures.css"; +import { + ChatMessageRenderContext, + IgrChat, + IgrChatOptions +} from "igniteui-react"; +import { createMarkdownRenderer } from "igniteui-webcomponents/extras"; +import "igniteui-webcomponents/themes/light/bootstrap.css"; + +export default function ChatFeatures() { + const [draftMessage, setDraftMessage] = useState(null); + + let initialMessages = [ + { + id: '1', + text: `Hello. How can we assist you today?`, + sender: 'support', + timestamp: (Date.now() - 3500000).toString() + }, + { + id: '2', + text: `Hello. I have problem with styling IgcAvatarComponent. Can you take a look at the attached file and help me?`, + sender: 'user', + timestamp: (Date.now() - 3400000).toString(), + attachments: [ + { + id: 'AvatarStyles.css', + name: 'AvatarStyles.css', + url: './styles/AvatarStyles.css', + type: 'text/css' + }, + ], + }, + { + id: '3', + text: `Sure, give me a moment to check the file.`, + sender: 'support', + timestamp: (Date.now() - 3300000).toString() + }, + { + id: '4', + text: + ` +Thank you for your patience. It seems that the issue is the name of the CSS part. Here is the fixed code: +\`\`\`css +igc-avatar::part(base) { + --size: 60px; + color: var(--ig-success-500-contrast); + background: var(--ig-success-500); + border-radius: 20px; +} +\`\`\` + `, + sender: 'support', + timestamp: (Date.now() - 3200000).toString() + } + ]; + const [messages, setMessages] = useState(initialMessages); + + let messageHeader = ({ message }: ChatMessageRenderContext) => { + return message.sender !== 'user' + ?
+ Developer Support +
+ : null; + }; + + let suggestionPrefix = () => { + return 💡; + }; + + const [options, setOptions] = useState({ + disableAutoScroll: false, + disableInputAttachments: false, + inputPlaceholder: 'Type your message here...', + headerText: 'Developer Support', + suggestionsPosition: "below-input", + renderers: { + messageHeader, + messageContent: ({ message }: ChatMessageRenderContext) => message?.text, + suggestionPrefix + }, + suggestions: [ 'Send me an e-mail when support is available.' ] + }); + + const [markdownRenderer, setMarkdownRenderer] = useState(null); + + useEffect(() => { + let mounted = true; + createMarkdownRenderer().then(renderer => { + if (!mounted) return; + + setMarkdownRenderer(renderer); + setOptions(prev => ({ + ...prev, + renderers: { + ...prev.renderers, + messageContent: ({ message }: ChatMessageRenderContext) => renderer && message.text ? renderer(message) : message.text + } + })); + }); + return () => { mounted = false; }; + }, []); + + function onMessageCreated(e: any): void { + e.preventDefault(); + + const newMessage = e.detail; + setMessages(prev => [...prev, newMessage]); + setOptions(prev => ({ ...prev, isTyping: true, suggestions: [] })); + + const responseMessage = { + id: Date.now().toString(), + text: 'Our support team is currently unavailable. We\'ll get back to you as soon as possible.', + sender: 'support', + timestamp: Date.now().toString() + }; + + setDraftMessage({ text: '', attachments: [] }); + setMessages(prev => [...prev, responseMessage]); + setOptions(prev => ({ ...prev, isTyping: false })); + } + + return ( +
+
+ +
+
+ ); +} + +// rendering above component to the React DOM +const root = ReactDOM.createRoot(document.getElementById("root")); +root.render(); diff --git a/samples/interactions/chat/features/src/react-app-env.d.ts b/samples/interactions/chat/features/src/react-app-env.d.ts new file mode 100644 index 000000000..6431bc5fc --- /dev/null +++ b/samples/interactions/chat/features/src/react-app-env.d.ts @@ -0,0 +1 @@ +/// diff --git a/samples/interactions/chat/features/tsconfig.json b/samples/interactions/chat/features/tsconfig.json new file mode 100644 index 000000000..8c0d146f9 --- /dev/null +++ b/samples/interactions/chat/features/tsconfig.json @@ -0,0 +1,44 @@ +{ + "compilerOptions": { + "resolveJsonModule": true, + "esModuleInterop": true, + "baseUrl": ".", + "outDir": "build/dist", + "module": "esnext", + "target": "es5", + "lib": [ + "es6", + "dom" + ], + "sourceMap": true, + "allowJs": true, + "jsx": "react-jsx", + "moduleResolution": "node", + "rootDir": "src", + "forceConsistentCasingInFileNames": true, + "noImplicitReturns": true, + "noImplicitThis": true, + "noImplicitAny": true, + "noUnusedLocals": false, + "importHelpers": true, + "allowSyntheticDefaultImports": true, + "skipLibCheck": true, + "strict": false, + "isolatedModules": true, + "noEmit": true + }, + "exclude": [ + "node_modules", + "build", + "scripts", + "acceptance-tests", + "webpack", + "jest", + "src/setupTests.ts", + "**/odatajs-4.0.0.js", + "config-overrides.js" + ], + "include": [ + "src" + ] +} diff --git a/samples/interactions/chat/overview/.eslintrc.js b/samples/interactions/chat/overview/.eslintrc.js new file mode 100644 index 000000000..b45160a9e --- /dev/null +++ b/samples/interactions/chat/overview/.eslintrc.js @@ -0,0 +1,75 @@ +// https://www.robertcooper.me/using-eslint-and-prettier-in-a-typescript-project +module.exports = { + parser: "@typescript-eslint/parser", // Specifies the ESLint parser + parserOptions: { + ecmaVersion: 2020, // Allows for the parsing of modern ECMAScript features + sourceType: "module", // Allows for the use of imports + ecmaFeatures: { + jsx: true // Allows for the parsing of JSX + } + }, + settings: { + react: { + version: "999.999.999" // Tells eslint-plugin-react to automatically detect the version of React to use + } + }, + extends: [ + "eslint:recommended", + "plugin:react/recommended", // Uses the recommended rules from @eslint-plugin-react + "plugin:@typescript-eslint/recommended" // Uses the recommended rules from @typescript-eslint/eslint-plugin + ], + rules: { + // Place to specify ESLint rules. Can be used to overwrite rules specified from the extended configs + "default-case": "off", + "no-undef": "off", + "no-unused-vars": "off", + "no-extend-native": "off", + "no-throw-literal": "off", + "no-useless-concat": "off", + "no-mixed-operators": "off", + "no-prototype-builtins": "off", + "prefer-const": "off", + "prefer-rest-params": "off", + "jsx-a11y/alt-text": "off", + "jsx-a11y/iframe-has-title": "off", + "@typescript-eslint/no-unused-vars": "off", + "@typescript-eslint/no-explicit-any": "off", + "@typescript-eslint/no-inferrable-types": "off", + "@typescript-eslint/no-useless-constructor": "off", + "@typescript-eslint/no-use-before-define": "off", + "@typescript-eslint/no-non-null-assertion": "off", + "@typescript-eslint/interface-name-prefix": "off", + "@typescript-eslint/prefer-namespace-keyword": "off", + "@typescript-eslint/explicit-function-return-type": "off", + "@typescript-eslint/explicit-module-boundary-types": "off" + }, + "overrides": [ + { + "files": ["*.ts", "*.tsx"], + "rules": { + "default-case": "off", + "no-undef": "off", + "no-unused-vars": "off", + "no-extend-native": "off", + "no-throw-literal": "off", + "no-useless-concat": "off", + "no-mixed-operators": "off", + "no-prototype-builtins": "off", + "prefer-const": "off", + "prefer-rest-params": "off", + "jsx-a11y/alt-text": "off", + "jsx-a11y/iframe-has-title": "off", + "@typescript-eslint/no-unused-vars": "off", + "@typescript-eslint/no-explicit-any": "off", + "@typescript-eslint/no-inferrable-types": "off", + "@typescript-eslint/no-useless-constructor": "off", + "@typescript-eslint/no-use-before-define": "off", + "@typescript-eslint/no-non-null-assertion": "off", + "@typescript-eslint/interface-name-prefix": "off", + "@typescript-eslint/prefer-namespace-keyword": "off", + "@typescript-eslint/explicit-function-return-type": "off", + "@typescript-eslint/explicit-module-boundary-types": "off" + } + } + ] + }; \ No newline at end of file diff --git a/samples/interactions/chat/overview/README.md b/samples/interactions/chat/overview/README.md new file mode 100644 index 000000000..4a3c2cd4f --- /dev/null +++ b/samples/interactions/chat/overview/README.md @@ -0,0 +1,56 @@ + + + +This folder contains implementation of React application with example of Overview feature using [Chat](https://www.infragistics.com/products/ignite-ui-react/react/components/general-getting-started.html) component. + + + + + + View Docs + + + View Code + + + Run Sample + + + Run Sample + + + + +## Branches + +> **_NOTE:_** You should use [master](https://github.com/IgniteUI/igniteui-react-examples/tree/master) branch of this repository if you want to run samples on your computer. Use the [vnext](https://github.com/IgniteUI/igniteui-react-examples/tree/vnext) branch only when you want to contribute new samples to this repository. + +## Instructions + +Follow these instructions to run this example: + + +``` +git clone https://github.com/IgniteUI/igniteui-react-examples.git +git checkout master +cd ./igniteui-react-examples +cd ./samples/interactions/chat/overview +``` + +open above folder in VS Code or type: +``` +code . +``` + +In terminal window, run: +``` +npm install --legacy-peer-deps +npm run-script start +``` + +Then open http://localhost:4200/ in your browser + + +## Learn More + +To learn more about **Ignite UI for React** components, check out the [React documentation](https://www.infragistics.com/products/ignite-ui-react/react/components/general-getting-started.html). diff --git a/samples/interactions/chat/overview/package.json b/samples/interactions/chat/overview/package.json new file mode 100644 index 000000000..7ce4970e9 --- /dev/null +++ b/samples/interactions/chat/overview/package.json @@ -0,0 +1,38 @@ +{ + "name": "react-chat-overview", + "description": "This project provides example of Chat Overview using Infragistics React components", + "author": "Infragistics", + "homepage": ".", + "version": "1.4.0", + "private": true, + "scripts": { + "start": "set PORT=4200 && react-scripts --max_old_space_size=10240 start", + "build": "react-scripts --max_old_space_size=10240 build ", + "test": "react-scripts test --env=jsdom", + "eject": "react-scripts eject" + }, + "dependencies": { + "igniteui-dockmanager": "^1.17.0", + "igniteui-react": "19.3.0-rc.1", + "igniteui-react-core": "^19.0.1", + "react": "^18.2.0", + "react-dom": "^18.2.0", + "react-scripts": "^5.0.1", + "tslib": "^2.4.0" + }, + "devDependencies": { + "@types/jest": "^29.2.0", + "@types/node": "^18.11.7", + "@types/react": "^18.0.24", + "@types/react-dom": "^18.0.8", + "react-app-rewired": "^2.2.1", + "typescript": "^4.8.4", + "worker-loader": "^3.0.8" + }, + "browserslist": [ + ">0.2%", + "not dead", + "not ie <= 11", + "not op_mini all" + ] +} diff --git a/samples/interactions/chat/overview/public/index.html b/samples/interactions/chat/overview/public/index.html new file mode 100644 index 000000000..78ac09ffe --- /dev/null +++ b/samples/interactions/chat/overview/public/index.html @@ -0,0 +1,10 @@ + + + + ChatOverview + + + +
+ + \ No newline at end of file diff --git a/samples/interactions/chat/overview/sandbox.config.json b/samples/interactions/chat/overview/sandbox.config.json new file mode 100644 index 000000000..00acba0c1 --- /dev/null +++ b/samples/interactions/chat/overview/sandbox.config.json @@ -0,0 +1,5 @@ +{ + "infiniteLoopProtection": false, + "hardReloadOnChange": false, + "view": "browser" +} \ No newline at end of file diff --git a/samples/interactions/chat/overview/src/ChatOverview.css b/samples/interactions/chat/overview/src/ChatOverview.css new file mode 100644 index 000000000..0283e6ce2 --- /dev/null +++ b/samples/interactions/chat/overview/src/ChatOverview.css @@ -0,0 +1,4 @@ +.chat-wrapper { + width: 100%; + height: 100%; +} diff --git a/samples/interactions/chat/overview/src/index.css b/samples/interactions/chat/overview/src/index.css new file mode 100644 index 000000000..e69de29bb diff --git a/samples/interactions/chat/overview/src/index.tsx b/samples/interactions/chat/overview/src/index.tsx new file mode 100644 index 000000000..30eb9f02c --- /dev/null +++ b/samples/interactions/chat/overview/src/index.tsx @@ -0,0 +1,122 @@ +import React, { useState } from "react"; +import ReactDOM from "react-dom/client"; +import "./index.css"; +import "./ChatOverview.css"; +import { + ChatMessageRenderContext, + IgrAvatar, + IgrChat, + IgrChatOptions +} from "igniteui-react"; +import "igniteui-webcomponents/themes/light/bootstrap.css"; + +export default function ChatOverview() { + const [draftMessage, setDraftMessage] = useState(null); + + let initialMessages = [ + { + id: '1', + text: `Hi, I have a question about my recent order, #7890.`, + sender: 'user', + timestamp: (Date.now() - 3500000).toString() + }, + { + id: '2', + text: `Hello! I can help with that. What is your question regarding order #7890?`, + sender: 'support', + timestamp: (Date.now() - 3400000).toString() + }, + { + id: '3', + text: `The tracking status shows 'delivered', but I haven't received it yet. Can you confirm the delivery location?`, + sender: 'user', + timestamp: (Date.now() - 3300000).toString() + }, + { + id: '4', + text: `I've reviewed the delivery details. It seems the package was left in a different spot. Here's a photo from our delivery driver showing where it was placed. Please check your porch and side door.`, + sender: 'support', + timestamp: (Date.now() - 3200000).toString(), + attachments: [ + { + id: 'delivery-location-image', + name: 'Delivery location', + url: 'https://media.istockphoto.com/id/1207972183/photo/merchandise-delivery-from-online-ordering.jpg?s=612x612&w=0&k=20&c=cGcMqd_8FALv4Tueh7sllYZuDXurkfkqoJf6IAIWhJk=', + type: 'image' + }, + ], + }, + ]; + const [messages, setMessages] = useState(initialMessages); + + let messageHeader = ({ message }: ChatMessageRenderContext) => { + return message.sender !== 'user' + ?
+ + + Customer Support +
+ : null; + }; + + const [options, setOptions] = useState({ + disableAutoScroll: false, + disableInputAttachments: false, + suggestions: [`It's there. Thanks.`, `It's not there.`], + inputPlaceholder: 'Type your message here...', + headerText: 'Customer Support', + renderers: { + messageHeader + } + }); + + function onMessageCreated(e: any): void { + e.preventDefault(); + + const newMessage = e.detail; + setMessages(prev => [...prev, newMessage]); + setOptions(prev => ({ ...prev, isTyping: true, suggestions: [] })); + + const messageText = e.detail.text.toLowerCase(); + const responseText = messageText.includes('not there') + ? `We're sorry to hear that. Checking with the delivery service for more details.` + : messageText.includes('it\'s there') + ? `Glad to hear that! If you have any more questions or need further assistance, feel free to ask. We're here to help!` + : `Our support team is currently unavailable. We'll get back to you as soon as possible.`; + + const responseMessage = { + id: Date.now().toString(), + text: responseText, + sender: 'support', + timestamp: Date.now().toString(), + }; + + setDraftMessage({ text: '', attachments: [] }); + setMessages(prev => [...prev, responseMessage]); + setOptions(prev => ({ ...prev, isTyping: false })); + } + + return ( +
+
+ +
+
+ ); +} + +// rendering above component to the React DOM +const root = ReactDOM.createRoot(document.getElementById("root")); +root.render(); diff --git a/samples/interactions/chat/overview/src/react-app-env.d.ts b/samples/interactions/chat/overview/src/react-app-env.d.ts new file mode 100644 index 000000000..6431bc5fc --- /dev/null +++ b/samples/interactions/chat/overview/src/react-app-env.d.ts @@ -0,0 +1 @@ +/// diff --git a/samples/interactions/chat/overview/tsconfig.json b/samples/interactions/chat/overview/tsconfig.json new file mode 100644 index 000000000..8c0d146f9 --- /dev/null +++ b/samples/interactions/chat/overview/tsconfig.json @@ -0,0 +1,44 @@ +{ + "compilerOptions": { + "resolveJsonModule": true, + "esModuleInterop": true, + "baseUrl": ".", + "outDir": "build/dist", + "module": "esnext", + "target": "es5", + "lib": [ + "es6", + "dom" + ], + "sourceMap": true, + "allowJs": true, + "jsx": "react-jsx", + "moduleResolution": "node", + "rootDir": "src", + "forceConsistentCasingInFileNames": true, + "noImplicitReturns": true, + "noImplicitThis": true, + "noImplicitAny": true, + "noUnusedLocals": false, + "importHelpers": true, + "allowSyntheticDefaultImports": true, + "skipLibCheck": true, + "strict": false, + "isolatedModules": true, + "noEmit": true + }, + "exclude": [ + "node_modules", + "build", + "scripts", + "acceptance-tests", + "webpack", + "jest", + "src/setupTests.ts", + "**/odatajs-4.0.0.js", + "config-overrides.js" + ], + "include": [ + "src" + ] +} diff --git a/samples/interactions/chat/styling/.eslintrc.js b/samples/interactions/chat/styling/.eslintrc.js new file mode 100644 index 000000000..b45160a9e --- /dev/null +++ b/samples/interactions/chat/styling/.eslintrc.js @@ -0,0 +1,75 @@ +// https://www.robertcooper.me/using-eslint-and-prettier-in-a-typescript-project +module.exports = { + parser: "@typescript-eslint/parser", // Specifies the ESLint parser + parserOptions: { + ecmaVersion: 2020, // Allows for the parsing of modern ECMAScript features + sourceType: "module", // Allows for the use of imports + ecmaFeatures: { + jsx: true // Allows for the parsing of JSX + } + }, + settings: { + react: { + version: "999.999.999" // Tells eslint-plugin-react to automatically detect the version of React to use + } + }, + extends: [ + "eslint:recommended", + "plugin:react/recommended", // Uses the recommended rules from @eslint-plugin-react + "plugin:@typescript-eslint/recommended" // Uses the recommended rules from @typescript-eslint/eslint-plugin + ], + rules: { + // Place to specify ESLint rules. Can be used to overwrite rules specified from the extended configs + "default-case": "off", + "no-undef": "off", + "no-unused-vars": "off", + "no-extend-native": "off", + "no-throw-literal": "off", + "no-useless-concat": "off", + "no-mixed-operators": "off", + "no-prototype-builtins": "off", + "prefer-const": "off", + "prefer-rest-params": "off", + "jsx-a11y/alt-text": "off", + "jsx-a11y/iframe-has-title": "off", + "@typescript-eslint/no-unused-vars": "off", + "@typescript-eslint/no-explicit-any": "off", + "@typescript-eslint/no-inferrable-types": "off", + "@typescript-eslint/no-useless-constructor": "off", + "@typescript-eslint/no-use-before-define": "off", + "@typescript-eslint/no-non-null-assertion": "off", + "@typescript-eslint/interface-name-prefix": "off", + "@typescript-eslint/prefer-namespace-keyword": "off", + "@typescript-eslint/explicit-function-return-type": "off", + "@typescript-eslint/explicit-module-boundary-types": "off" + }, + "overrides": [ + { + "files": ["*.ts", "*.tsx"], + "rules": { + "default-case": "off", + "no-undef": "off", + "no-unused-vars": "off", + "no-extend-native": "off", + "no-throw-literal": "off", + "no-useless-concat": "off", + "no-mixed-operators": "off", + "no-prototype-builtins": "off", + "prefer-const": "off", + "prefer-rest-params": "off", + "jsx-a11y/alt-text": "off", + "jsx-a11y/iframe-has-title": "off", + "@typescript-eslint/no-unused-vars": "off", + "@typescript-eslint/no-explicit-any": "off", + "@typescript-eslint/no-inferrable-types": "off", + "@typescript-eslint/no-useless-constructor": "off", + "@typescript-eslint/no-use-before-define": "off", + "@typescript-eslint/no-non-null-assertion": "off", + "@typescript-eslint/interface-name-prefix": "off", + "@typescript-eslint/prefer-namespace-keyword": "off", + "@typescript-eslint/explicit-function-return-type": "off", + "@typescript-eslint/explicit-module-boundary-types": "off" + } + } + ] + }; \ No newline at end of file diff --git a/samples/interactions/chat/styling/README.md b/samples/interactions/chat/styling/README.md new file mode 100644 index 000000000..2e27363ea --- /dev/null +++ b/samples/interactions/chat/styling/README.md @@ -0,0 +1,56 @@ + + + +This folder contains implementation of React application with example of Styling feature using [Chat](https://www.infragistics.com/products/ignite-ui-react/react/components/general-getting-started.html) component. + + + + + + View Docs + + + View Code + + + Run Sample + + + Run Sample + + + + +## Branches + +> **_NOTE:_** You should use [master](https://github.com/IgniteUI/igniteui-react-examples/tree/master) branch of this repository if you want to run samples on your computer. Use the [vnext](https://github.com/IgniteUI/igniteui-react-examples/tree/vnext) branch only when you want to contribute new samples to this repository. + +## Instructions + +Follow these instructions to run this example: + + +``` +git clone https://github.com/IgniteUI/igniteui-react-examples.git +git checkout master +cd ./igniteui-react-examples +cd ./samples/interactions/chat/styling +``` + +open above folder in VS Code or type: +``` +code . +``` + +In terminal window, run: +``` +npm install --legacy-peer-deps +npm run-script start +``` + +Then open http://localhost:4200/ in your browser + + +## Learn More + +To learn more about **Ignite UI for React** components, check out the [React documentation](https://www.infragistics.com/products/ignite-ui-react/react/components/general-getting-started.html). diff --git a/samples/interactions/chat/styling/package.json b/samples/interactions/chat/styling/package.json new file mode 100644 index 000000000..7c044d629 --- /dev/null +++ b/samples/interactions/chat/styling/package.json @@ -0,0 +1,38 @@ +{ + "name": "react-chat-styling", + "description": "This project provides example of Chat Styling using Infragistics React components", + "author": "Infragistics", + "homepage": ".", + "version": "1.4.0", + "private": true, + "scripts": { + "start": "set PORT=4200 && react-scripts --max_old_space_size=10240 start", + "build": "react-scripts --max_old_space_size=10240 build ", + "test": "react-scripts test --env=jsdom", + "eject": "react-scripts eject" + }, + "dependencies": { + "igniteui-dockmanager": "^1.17.0", + "igniteui-react": "19.3.0-rc.1", + "igniteui-react-core": "^19.0.1", + "react": "^18.2.0", + "react-dom": "^18.2.0", + "react-scripts": "^5.0.1", + "tslib": "^2.4.0" + }, + "devDependencies": { + "@types/jest": "^29.2.0", + "@types/node": "^18.11.7", + "@types/react": "^18.0.24", + "@types/react-dom": "^18.0.8", + "react-app-rewired": "^2.2.1", + "typescript": "^4.8.4", + "worker-loader": "^3.0.8" + }, + "browserslist": [ + ">0.2%", + "not dead", + "not ie <= 11", + "not op_mini all" + ] +} diff --git a/samples/interactions/chat/styling/public/index.html b/samples/interactions/chat/styling/public/index.html new file mode 100644 index 000000000..37b7658d4 --- /dev/null +++ b/samples/interactions/chat/styling/public/index.html @@ -0,0 +1,10 @@ + + + + ChatStyling + + + +
+ + \ No newline at end of file diff --git a/samples/interactions/chat/styling/sandbox.config.json b/samples/interactions/chat/styling/sandbox.config.json new file mode 100644 index 000000000..00acba0c1 --- /dev/null +++ b/samples/interactions/chat/styling/sandbox.config.json @@ -0,0 +1,5 @@ +{ + "infiniteLoopProtection": false, + "hardReloadOnChange": false, + "view": "browser" +} \ No newline at end of file diff --git a/samples/interactions/chat/styling/src/ChatStyling.css b/samples/interactions/chat/styling/src/ChatStyling.css new file mode 100644 index 000000000..fc1ad8a70 --- /dev/null +++ b/samples/interactions/chat/styling/src/ChatStyling.css @@ -0,0 +1,60 @@ +.chat-wrapper { + width: 100%; + height: 100%; +} + +igc-chat { + border: 2px solid var(--ig-gray-300); +} + +igc-chat::part(header) { + display: flex; + align-items: center; + padding: 10px; + border-bottom: 1px solid var(--ig-gray-300); + background-color: var(--ig-gray-200); + font-family: 'Franklin Gothic Medium'; + color: var(--ig-gray-700); +} + +igc-chat::part(message-container) { + background: var(--igc-chat-bubble-bg, #eee); + color: var(--igc-chat-text-color, #222); + padding: 12px; + border-radius: 8px; + transition: background .15s; +} + +igc-chat::part(message-sent) { + background: var(--igc-chat-sent-bubble-bg, #e6f4ff); + color: var(--igc-chat-sent-text-color, #03396b); +} + +igc-chat::part(message-header) { + color: #c00000; + font-weight: bold; + margin: 8px; +} + +igc-chat::part(message-actions-container) { + border-top: 1px solid var(--ig-gray-300); +} + +igc-chat::part(suggestion) { + background-color: var(--ig-primary-100); + color: var(--ig-primary-800); + margin: .125rem; + border-radius: 20px; + cursor: pointer; + transition: background-color 0.3s, color 0.3s; +} + +igc-chat::part(message-attachment) { + box-shadow: 0 4px 8px rgba(0, 0, 0, 0.5); + background: var(--igc-chat-sent-bubble-bg); + +} + +igc-chat::part(input-attachments-container) { + border: 5px solid var(--ig-gray-300); +} \ No newline at end of file diff --git a/samples/interactions/chat/styling/src/index.css b/samples/interactions/chat/styling/src/index.css new file mode 100644 index 000000000..e69de29bb diff --git a/samples/interactions/chat/styling/src/index.tsx b/samples/interactions/chat/styling/src/index.tsx new file mode 100644 index 000000000..ece33b1d2 --- /dev/null +++ b/samples/interactions/chat/styling/src/index.tsx @@ -0,0 +1,124 @@ +import React, { useState } from "react"; +import ReactDOM from "react-dom/client"; +import "./index.css"; +import "./ChatStyling.css"; +import { + ChatMessageRenderContext, + IgrAvatar, + IgrChat, + IgrChatOptions +} from "igniteui-react"; +import "igniteui-webcomponents/themes/light/bootstrap.css"; + +export default function ChatStyling() { + const [draftMessage, setDraftMessage] = useState(null); + + let initialMessages = [ + { + id: '1', + text: `Hi, I have a question about my recent order, #7890.`, + sender: 'user', + timestamp: (Date.now() - 3500000).toString() + }, + { + id: '2', + text: `Hello! I can help with that. What is your question regarding order #7890?`, + sender: 'support', + timestamp: (Date.now() - 3400000).toString() + }, + { + id: '3', + text: `The tracking status shows 'delivered', but I haven't received it yet. Can you confirm the delivery location?`, + sender: 'user', + timestamp: (Date.now() - 3300000).toString() + }, + { + id: '4', + text: `I've reviewed the delivery details. It seems the package was left in a different spot. Here's a photo from our delivery driver showing where it was placed. Please check your porch and side door.`, + sender: 'support', + timestamp: (Date.now() - 3200000).toString(), + attachments: [ + { + id: 'delivery-location-image', + name: 'Delivery location', + url: 'https://media.istockphoto.com/id/1207972183/photo/merchandise-delivery-from-online-ordering.jpg?s=612x612&w=0&k=20&c=cGcMqd_8FALv4Tueh7sllYZuDXurkfkqoJf6IAIWhJk=', + type: 'image' + }, + ], + }, + ]; + const [messages, setMessages] = useState(initialMessages); + + let messageHeader = ({ message }: ChatMessageRenderContext) => { + return message.sender !== 'user' + ?
+ + + Customer Support +
+ : null; + }; + + const [options, setOptions] = useState({ + disableAutoScroll: false, + disableInputAttachments: false, + suggestions: [`It's there. Thanks.`, `It's not there.`], + inputPlaceholder: 'Type your message here...', + headerText: 'Customer Support', + renderers: { + messageHeader + } + }); + + // TODO: Check why this is not available in WC Styling Sample + function onMessageCreated(e: any): void { + e.preventDefault(); + + const newMessage = e.detail; + setMessages(prev => [...prev, newMessage]); + setOptions(prev => ({ ...prev, isTyping: true, suggestions: [] })); + + + const messageText = e.detail.text.toLowerCase(); + const responseText = messageText.includes('not there') + ? `We're sorry to hear that. Checking with the delivery service for more details.` + : messageText.includes('it\'s there') + ? `Glad to hear that! If you have any more questions or need further assistance, feel free to ask. We're here to help!` + : `Our support team is currently unavailable. We'll get back to you as soon as possible.`; + + const responseMessage = { + id: Date.now().toString(), + text: responseText, + sender: 'support', + timestamp: Date.now().toString(), + }; + + setDraftMessage({ text: '', attachments: [] }); + setMessages(prev => [...prev, responseMessage]); + setOptions(prev => ({ ...prev, isTyping: false })); + } + + return ( +
+
+ +
+
+ ); +} + +// rendering above component to the React DOM +const root = ReactDOM.createRoot(document.getElementById("root")); +root.render(); diff --git a/samples/interactions/chat/styling/src/react-app-env.d.ts b/samples/interactions/chat/styling/src/react-app-env.d.ts new file mode 100644 index 000000000..6431bc5fc --- /dev/null +++ b/samples/interactions/chat/styling/src/react-app-env.d.ts @@ -0,0 +1 @@ +/// diff --git a/samples/interactions/chat/styling/tsconfig.json b/samples/interactions/chat/styling/tsconfig.json new file mode 100644 index 000000000..8c0d146f9 --- /dev/null +++ b/samples/interactions/chat/styling/tsconfig.json @@ -0,0 +1,44 @@ +{ + "compilerOptions": { + "resolveJsonModule": true, + "esModuleInterop": true, + "baseUrl": ".", + "outDir": "build/dist", + "module": "esnext", + "target": "es5", + "lib": [ + "es6", + "dom" + ], + "sourceMap": true, + "allowJs": true, + "jsx": "react-jsx", + "moduleResolution": "node", + "rootDir": "src", + "forceConsistentCasingInFileNames": true, + "noImplicitReturns": true, + "noImplicitThis": true, + "noImplicitAny": true, + "noUnusedLocals": false, + "importHelpers": true, + "allowSyntheticDefaultImports": true, + "skipLibCheck": true, + "strict": false, + "isolatedModules": true, + "noEmit": true + }, + "exclude": [ + "node_modules", + "build", + "scripts", + "acceptance-tests", + "webpack", + "jest", + "src/setupTests.ts", + "**/odatajs-4.0.0.js", + "config-overrides.js" + ], + "include": [ + "src" + ] +}