From 95dccc0618be5de971e733ae524e0e50c1c867f8 Mon Sep 17 00:00:00 2001 From: IlyaDoronin Date: Fri, 22 Dec 2023 12:49:55 +0300 Subject: [PATCH 01/13] chore: prettier --- package.json | 6 +- prettierrc | 12 ++++ src/App.tsx | 200 +++++++++++++++++++++++++-------------------------- yarn.lock | 5 ++ 4 files changed, 121 insertions(+), 102 deletions(-) create mode 100644 prettierrc diff --git a/package.json b/package.json index 43f2c04c..06dfcb31 100755 --- a/package.json +++ b/package.json @@ -58,7 +58,8 @@ "build": "craco build", "test": "craco test", "eject": "craco eject", - "cypress:open": "cypress open" + "cypress:open": "cypress open", + "code:format": "prettier . --write --ignore-unknown" }, "browserslist": { "production": [ @@ -79,6 +80,7 @@ "@types/react-beautiful-dnd": "^13.1.4", "@types/react-cytoscapejs": "^1.2.4", "craco-alias": "^3.0.1", - "cypress": "^13.6.1" + "cypress": "^13.6.1", + "prettier": "^3.1.1" } } diff --git a/prettierrc b/prettierrc new file mode 100644 index 00000000..80e56165 --- /dev/null +++ b/prettierrc @@ -0,0 +1,12 @@ +{ + "semi": true, + "trailingComma": "es5", + "singleQuote": false, + "printWidth": 120, + "tabWidth": 2, + "useTabs": false, + "endOfLine": "auto", + "bracketSpacing": true, + "arrowParens": "always", + "jsxSingleQuote": false +} diff --git a/src/App.tsx b/src/App.tsx index 7136bf2e..96b97130 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -1,100 +1,100 @@ -import ContactFormModal from "@ui_kit/ContactForm"; -import ImageCrop from "@ui_kit/Modal/ImageCrop"; -import dayjs from "dayjs"; -import "dayjs/locale/ru"; -import SigninDialog from "./pages/auth/Signin"; -import SignupDialog from "./pages/auth/Signup"; -import { ViewPage } from "./pages/ViewPublicationPage"; -import { Route, Routes, useLocation, useNavigate, Navigate } from "react-router-dom"; -import "./index.css"; -import ContactFormPage from "./pages/ContactFormPage/ContactFormPage"; -import InstallQuiz from "./pages/InstallQuiz/InstallQuiz"; -import Landing from "./pages/Landing/Landing"; -import QuestionsPage from "./pages/Questions/QuestionsPage"; -import { Result } from "./pages/ResultPage/Result"; -import { ResultSettings } from "./pages/ResultPage/ResultSettings"; -import MyQuizzesFull from "./pages/createQuize/MyQuizzesFull"; -import Main from "./pages/main"; -import EditPage from "./pages/startPage/EditPage"; -import { clearAuthToken, getMessageFromFetchError, useUserAccountFetcher, useUserFetcher } from "@frontend/kitui"; -import { clearUserData, setUser, setUserAccount, useUserStore } from "@root/user"; -import { enqueueSnackbar } from "notistack"; -import PrivateRoute from "@ui_kit/PrivateRoute"; - -import { Restore } from "./pages/startPage/Restore"; - -dayjs.locale("ru"); - -const routeslink = [ - { path: "/list", page: , header: false, sidebar: false }, - { path: "/questions/:quizId", page: , header: true, sidebar: true }, - { path: "/contacts", page: , header: true, sidebar: true }, - { path: "/result", page: , header: true, sidebar: true }, - { path: "/settings", page: , header: true, sidebar: true }, -] as const; - -export default function App() { - const userId = useUserStore((state) => state.userId); - const location = useLocation(); - const navigate = useNavigate(); - - useUserFetcher({ - url: `https://hub.pena.digital/user/${userId}`, - userId, - onNewUser: setUser, - onError: (error) => { - const errorMessage = getMessageFromFetchError(error); - if (errorMessage) { - enqueueSnackbar(errorMessage); - clearUserData(); - clearAuthToken(); - } - }, - }); - - useUserAccountFetcher({ - url: "https://squiz.pena.digital/customer/account", - userId, - onNewUserAccount: setUserAccount, - onError: (error) => { - const errorMessage = getMessageFromFetchError(error); - if (errorMessage) { - enqueueSnackbar(errorMessage); - clearUserData(); - clearAuthToken(); - navigate("/signin"); - } - }, - }); - - if (location.state?.redirectTo) - return ; - - return ( - <> - - {location.state?.backgroundLocation && ( - - } /> - } /> - } /> - - )} - - } /> - } /> - } /> - } /> - }> - {routeslink.map((e, i) => ( - } /> - ))} - - } /> - } /> - } /> - - - - ); -} +import ContactFormModal from "@ui_kit/ContactForm"; +import ImageCrop from "@ui_kit/Modal/ImageCrop"; +import dayjs from "dayjs"; +import "dayjs/locale/ru"; +import SigninDialog from "./pages/auth/Signin"; +import SignupDialog from "./pages/auth/Signup"; +import { ViewPage } from "./pages/ViewPublicationPage"; +import { Route, Routes, useLocation, useNavigate, Navigate } from "react-router-dom"; +import "./index.css"; +import ContactFormPage from "./pages/ContactFormPage/ContactFormPage"; +import InstallQuiz from "./pages/InstallQuiz/InstallQuiz"; +import Landing from "./pages/Landing/Landing"; +import QuestionsPage from "./pages/Questions/QuestionsPage"; +import { Result } from "./pages/ResultPage/Result"; +import { ResultSettings } from "./pages/ResultPage/ResultSettings"; +import MyQuizzesFull from "./pages/createQuize/MyQuizzesFull"; +import Main from "./pages/main"; +import EditPage from "./pages/startPage/EditPage"; +import { clearAuthToken, getMessageFromFetchError, useUserAccountFetcher, useUserFetcher } from "@frontend/kitui"; +import { clearUserData, setUser, setUserAccount, useUserStore } from "@root/user"; +import { enqueueSnackbar } from "notistack"; +import PrivateRoute from "@ui_kit/PrivateRoute"; + +import { Restore } from "./pages/startPage/Restore"; + +dayjs.locale("ru"); + +const routeslink = [ + { path: "/list", page: , header: false, sidebar: false }, + { path: "/questions/:quizId", page: , header: true, sidebar: true }, + { path: "/contacts", page: , header: true, sidebar: true }, + { path: "/result", page: , header: true, sidebar: true }, + { path: "/settings", page: , header: true, sidebar: true }, +] as const; + +export default function App() { + const userId = useUserStore((state) => state.userId); + const location = useLocation(); + const navigate = useNavigate(); + + useUserFetcher({ + url: `https://hub.pena.digital/user/${userId}`, + userId, + onNewUser: setUser, + onError: (error) => { + const errorMessage = getMessageFromFetchError(error); + if (errorMessage) { + enqueueSnackbar(errorMessage); + clearUserData(); + clearAuthToken(); + } + }, + }); + + useUserAccountFetcher({ + url: "https://squiz.pena.digital/customer/account", + userId, + onNewUserAccount: setUserAccount, + onError: (error) => { + const errorMessage = getMessageFromFetchError(error); + if (errorMessage) { + enqueueSnackbar(errorMessage); + clearUserData(); + clearAuthToken(); + navigate("/signin"); + } + }, + }); + + if (location.state?.redirectTo) + return ; + + return ( + <> + + {location.state?.backgroundLocation && ( + + } /> + } /> + } /> + + )} + + } /> + } /> + } /> + } /> + }> + {routeslink.map((e, i) => ( + } /> + ))} + + } /> + } /> + } /> + + + + ); +} diff --git a/yarn.lock b/yarn.lock index 5c6fbdc9..8a861543 100755 --- a/yarn.lock +++ b/yarn.lock @@ -8313,6 +8313,11 @@ prelude-ls@~1.1.2: resolved "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.1.2.tgz" integrity sha512-ESF23V4SKG6lVSGZgYNpbsiaAkdab6ZgOxe52p7+Kid3W3u3bxR4Vfd/o21dmN7jSt0IwgZ4v5MUd26FEtXE9w== +prettier@^3.1.1: + version "3.1.1" + resolved "https://registry.yarnpkg.com/prettier/-/prettier-3.1.1.tgz#6ba9f23165d690b6cbdaa88cb0807278f7019848" + integrity sha512-22UbSzg8luF4UuZtzgiUOfcGM8s4tjBv6dJRT7j275NXsy2jb4aJa4NNveul5x4eqlF1wuhuR2RElK71RvmVaw== + pretty-bytes@^5.3.0, pretty-bytes@^5.4.1, pretty-bytes@^5.6.0: version "5.6.0" resolved "https://registry.npmjs.org/pretty-bytes/-/pretty-bytes-5.6.0.tgz" From 1ac0e4d59b0def75d98090e79799239d88e14787 Mon Sep 17 00:00:00 2001 From: IlyaDoronin Date: Fri, 22 Dec 2023 17:00:47 +0300 Subject: [PATCH 02/13] chore: husky lint-staged --- .husky/pre-commit | 4 + package.json | 174 ++++++++++++++++---------------- yarn.lock | 252 +++++++++++++++++++++++++++++++++++++++++++++- 3 files changed, 343 insertions(+), 87 deletions(-) create mode 100644 .husky/pre-commit diff --git a/.husky/pre-commit b/.husky/pre-commit new file mode 100644 index 00000000..5a182ef1 --- /dev/null +++ b/.husky/pre-commit @@ -0,0 +1,4 @@ +#!/usr/bin/env sh +. "$(dirname -- "$0")/_/husky.sh" + +yarn lint-staged diff --git a/package.json b/package.json index 06dfcb31..2d46973e 100755 --- a/package.json +++ b/package.json @@ -1,86 +1,92 @@ { - "name": "squidward", - "version": "0.1.0", - "private": true, - "dependencies": { - "@craco/craco": "^7.0.0", - "@emotion/react": "^11.10.5", - "@emotion/styled": "^11.10.5", - "@frontend/kitui": "^1.0.55", - "@mui/icons-material": "^5.10.14", - "@mui/material": "^5.10.14", - "@mui/x-date-pickers": "^6.16.1", - "@testing-library/jest-dom": "^5.14.1", - "@testing-library/react": "^13.0.0", - "@testing-library/user-event": "^13.2.1", - "@types/cytoscape": "^3.19.16", - "@types/file-saver": "^2.0.5", - "@types/jest": "^27.0.1", - "@types/node": "^16.7.13", - "@types/react": "^18.0.0", - "@types/react-dnd": "^3.0.2", - "@types/react-dom": "^18.0.0", - "axios": "^1.5.1", - "cypress-file-upload": "^5.0.8", - "cytoscape": "^3.26.0", - "cytoscape-popper": "^2.0.0", - "dayjs": "^1.11.10", - "emoji-mart": "^5.5.2", - "file-saver": "^2.0.5", - "formik": "^2.4.5", - "html-to-image": "^1.11.11", - "immer": "^10.0.3", - "jszip": "^3.10.1", - "nanoid": "^5.0.3", - "notistack": "^3.0.1", - "react": "^18.2.0", - "react-beautiful-dnd": "^13.1.1", - "react-cytoscapejs": "^2.0.0", - "react-dnd": "^16.0.1", - "react-dnd-html5-backend": "^16.0.1", - "react-dom": "^18.2.0", - "react-easy-crop": "^5.0.0", - "react-error-boundary": "^4.0.11", - "react-image-crop": "^10.1.5", - "react-image-file-resizer": "^0.4.8", - "react-rnd": "^10.4.1", - "react-router-dom": "^6.6.2", - "react-scripts": "5.0.1", - "swr": "^2.2.4", - "typescript": "^5.2.2", - "use-debounce": "^9.0.4", - "web-vitals": "^2.1.0", - "yup": "^1.3.2", - "zustand": "^4.3.8" - }, - "scripts": { - "start": "craco start", - "build": "craco build", - "test": "craco test", - "eject": "craco eject", - "cypress:open": "cypress open", - "code:format": "prettier . --write --ignore-unknown" - }, - "browserslist": { - "production": [ - ">0.2%", - "not dead", - "not op_mini all" - ], - "development": [ - "last 1 chrome version", - "last 1 firefox version", - "last 1 safari version" - ] - }, - "devDependencies": { - "@emoji-mart/data": "^1.1.2", - "@emoji-mart/react": "^1.1.1", - "@types/cytoscape-popper": "^2.0.4", - "@types/react-beautiful-dnd": "^13.1.4", - "@types/react-cytoscapejs": "^1.2.4", - "craco-alias": "^3.0.1", - "cypress": "^13.6.1", - "prettier": "^3.1.1" - } + "name": "squidward", + "version": "0.1.0", + "private": true, + "dependencies": { + "@craco/craco": "^7.0.0", + "@emotion/react": "^11.10.5", + "@emotion/styled": "^11.10.5", + "@frontend/kitui": "^1.0.55", + "@mui/icons-material": "^5.10.14", + "@mui/material": "^5.10.14", + "@mui/x-date-pickers": "^6.16.1", + "@testing-library/jest-dom": "^5.14.1", + "@testing-library/react": "^13.0.0", + "@testing-library/user-event": "^13.2.1", + "@types/cytoscape": "^3.19.16", + "@types/file-saver": "^2.0.5", + "@types/jest": "^27.0.1", + "@types/node": "^16.7.13", + "@types/react": "^18.0.0", + "@types/react-dnd": "^3.0.2", + "@types/react-dom": "^18.0.0", + "axios": "^1.5.1", + "cypress-file-upload": "^5.0.8", + "cytoscape": "^3.26.0", + "cytoscape-popper": "^2.0.0", + "dayjs": "^1.11.10", + "emoji-mart": "^5.5.2", + "file-saver": "^2.0.5", + "formik": "^2.4.5", + "html-to-image": "^1.11.11", + "immer": "^10.0.3", + "jszip": "^3.10.1", + "nanoid": "^5.0.3", + "notistack": "^3.0.1", + "react": "^18.2.0", + "react-beautiful-dnd": "^13.1.1", + "react-cytoscapejs": "^2.0.0", + "react-dnd": "^16.0.1", + "react-dnd-html5-backend": "^16.0.1", + "react-dom": "^18.2.0", + "react-easy-crop": "^5.0.0", + "react-error-boundary": "^4.0.11", + "react-image-crop": "^10.1.5", + "react-image-file-resizer": "^0.4.8", + "react-rnd": "^10.4.1", + "react-router-dom": "^6.6.2", + "react-scripts": "5.0.1", + "swr": "^2.2.4", + "typescript": "^5.2.2", + "use-debounce": "^9.0.4", + "web-vitals": "^2.1.0", + "yup": "^1.3.2", + "zustand": "^4.3.8" + }, + "scripts": { + "start": "craco start", + "build": "craco build", + "test": "craco test", + "eject": "craco eject", + "cypress:open": "cypress open", + "code:format": "prettier ./public --write --ignore-unknown", + "prepare": "husky install" + }, + "browserslist": { + "production": [ + ">0.2%", + "not dead", + "not op_mini all" + ], + "development": [ + "last 1 chrome version", + "last 1 firefox version", + "last 1 safari version" + ] + }, + "devDependencies": { + "@emoji-mart/data": "^1.1.2", + "@emoji-mart/react": "^1.1.1", + "@types/cytoscape-popper": "^2.0.4", + "@types/react-beautiful-dnd": "^13.1.4", + "@types/react-cytoscapejs": "^1.2.4", + "craco-alias": "^3.0.1", + "cypress": "^13.6.1", + "husky": "^8.0.3", + "lint-staged": "^15.2.0", + "prettier": "^3.1.1" + }, + "lint-staged": { + "**/*": "yarn code:format" + } } diff --git a/yarn.lock b/yarn.lock index 8a861543..b2214c6d 100755 --- a/yarn.lock +++ b/yarn.lock @@ -2916,6 +2916,13 @@ ansi-escapes@^4.2.1, ansi-escapes@^4.3.0, ansi-escapes@^4.3.1: dependencies: type-fest "^0.21.3" +ansi-escapes@^6.2.0: + version "6.2.0" + resolved "https://registry.yarnpkg.com/ansi-escapes/-/ansi-escapes-6.2.0.tgz#8a13ce75286f417f1963487d86ba9f90dccf9947" + integrity sha512-kzRaCqXnpzWs+3z5ABPQiVke+iq0KXkHo8xiWV4RPTi5Yli0l97BEQuhXV1s7+aSU/fu1kUuxgS4MsQ0fRuygw== + dependencies: + type-fest "^3.0.0" + ansi-html-community@^0.0.8: version "0.0.8" resolved "https://registry.npmjs.org/ansi-html-community/-/ansi-html-community-0.0.8.tgz" @@ -2950,6 +2957,11 @@ ansi-styles@^5.0.0: resolved "https://registry.npmjs.org/ansi-styles/-/ansi-styles-5.2.0.tgz" integrity sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA== +ansi-styles@^6.0.0, ansi-styles@^6.2.1: + version "6.2.1" + resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-6.2.1.tgz#0e62320cf99c21afff3b3012192546aacbfb05c5" + integrity sha512-bN798gFfQX+viw3R7yrGWRqnrN2oRkEkUjjl4JNn4E8GxxbjtG3FbrEIIY3l8/hrwUwIeCZvi4QuOTP4MErVug== + anymatch@^3.0.3, anymatch@~3.1.2: version "3.1.3" resolved "https://registry.npmjs.org/anymatch/-/anymatch-3.1.3.tgz" @@ -3525,6 +3537,11 @@ caseless@~0.12.0: resolved "https://registry.npmjs.org/caseless/-/caseless-0.12.0.tgz" integrity sha512-4tYFyifaFfGacoiObjJegolkwSU4xQNGbVgUiNYVUxbQ2x2lUsFvY4hVgVzGiIe6WLOPqycWXA40l+PWsxthUw== +chalk@5.3.0: + version "5.3.0" + resolved "https://registry.yarnpkg.com/chalk/-/chalk-5.3.0.tgz#67c20a7ebef70e7f3970a01f90fa210cb6860385" + integrity sha512-dLitG79d+GV1Nb/VYcCDFivJeK1hiukt9QjRNVOsUtTy1rR1YJsmpGGTZ3qJos+uw7WmWF4wUwBd9jxjocFC2w== + chalk@^2.0.0, chalk@^2.4.1: version "2.4.2" resolved "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz" @@ -3619,6 +3636,13 @@ cli-cursor@^3.1.0: dependencies: restore-cursor "^3.1.0" +cli-cursor@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/cli-cursor/-/cli-cursor-4.0.0.tgz#3cecfe3734bf4fe02a8361cbdc0f6fe28c6a57ea" + integrity sha512-VGtlMu3x/4DOtIUwEkRezxUZ2lBacNJCHash0N0WeZDBS+7Ux1dm3XWAgWYxLJFMMdOeXMHXorshEFhbMSGelg== + dependencies: + restore-cursor "^4.0.0" + cli-table3@~0.6.1: version "0.6.3" resolved "https://registry.npmjs.org/cli-table3/-/cli-table3-0.6.3.tgz" @@ -3636,6 +3660,14 @@ cli-truncate@^2.1.0: slice-ansi "^3.0.0" string-width "^4.2.0" +cli-truncate@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/cli-truncate/-/cli-truncate-4.0.0.tgz#6cc28a2924fee9e25ce91e973db56c7066e6172a" + integrity sha512-nPdaFdQ0h/GEigbPClz11D0v/ZJEwxmeVZGeMo3Z5StPtUTkA9o1lD6QwoirYiSDzbcwn2XcjwmCp68W1IS4TA== + dependencies: + slice-ansi "^5.0.0" + string-width "^7.0.0" + client-only@^0.0.1: version "0.0.1" resolved "https://registry.npmjs.org/client-only/-/client-only-0.0.1.tgz" @@ -3722,7 +3754,7 @@ colorette@^2.0.10: resolved "https://registry.npmjs.org/colorette/-/colorette-2.0.19.tgz" integrity sha512-3tlv/dIP7FWvj3BsbHrGLJ6l/oKh1O3TcgBqMn+yyCagOxc23fyzDS6HypQbgxWbkpDnf52p1LuR4eWDQ/K9WQ== -colorette@^2.0.16: +colorette@^2.0.16, colorette@^2.0.20: version "2.0.20" resolved "https://registry.npmjs.org/colorette/-/colorette-2.0.20.tgz" integrity sha512-IfEDxwoWIjkeXL1eXcDiow4UbKjhLdq6/EuSVR9GMN7KVH3r9gQ83e73hsz1Nd1T3ijd5xv1wcWRYO+D6kCI2w== @@ -3734,6 +3766,11 @@ combined-stream@^1.0.6, combined-stream@^1.0.8, combined-stream@~1.0.6: dependencies: delayed-stream "~1.0.0" +commander@11.1.0: + version "11.1.0" + resolved "https://registry.yarnpkg.com/commander/-/commander-11.1.0.tgz#62fdce76006a68e5c1ab3314dc92e800eb83d906" + integrity sha512-yPVavfyCcRhmorC7rWlkHn15b4wDVgVmBA7kV4QVBsF7kv/9TKJAbAXVTxvTnwP8HHKjRCJDClKbciiYS7p0DQ== + commander@^2.20.0: version "2.20.3" resolved "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz" @@ -4216,7 +4253,7 @@ debug@2.6.9, debug@^2.6.0, debug@^2.6.9: dependencies: ms "2.0.0" -debug@4, debug@^4.1.0, debug@^4.1.1, debug@^4.3.2, debug@^4.3.4: +debug@4, debug@4.3.4, debug@^4.1.0, debug@^4.1.1, debug@^4.3.2, debug@^4.3.4: version "4.3.4" resolved "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz" integrity sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ== @@ -4551,6 +4588,11 @@ emoji-mart@^5.5.2: resolved "https://registry.npmjs.org/emoji-mart/-/emoji-mart-5.5.2.tgz" integrity sha512-Sqc/nso4cjxhOwWJsp9xkVm8OF5c+mJLZJFoFfzRuKO+yWiN7K8c96xmtughYb0d/fZ8UC6cLIQ/p4BR6Pv3/A== +emoji-regex@^10.3.0: + version "10.3.0" + resolved "https://registry.yarnpkg.com/emoji-regex/-/emoji-regex-10.3.0.tgz#76998b9268409eb3dae3de989254d456e70cfe23" + integrity sha512-QpLs9D9v9kArv4lfDEgg1X/gN5XLnf/A6l9cs8SPZLRZR3ZkY9+kwIQTxm+fsSej5UMYGE8fdoaZVIBlqG0XTw== + emoji-regex@^8.0.0: version "8.0.0" resolved "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz" @@ -4993,6 +5035,11 @@ eventemitter3@^4.0.0: resolved "https://registry.npmjs.org/eventemitter3/-/eventemitter3-4.0.7.tgz" integrity sha512-8guHBZCwKnFhYdHr2ysuRWErTwhoN2X8XELRlrRwpmfeY2jjuUN4taQMsULKUVo1K4DvZl+0pgfyoysHxvmvEw== +eventemitter3@^5.0.1: + version "5.0.1" + resolved "https://registry.yarnpkg.com/eventemitter3/-/eventemitter3-5.0.1.tgz#53f5ffd0a492ac800721bb42c66b841de96423c4" + integrity sha512-GWkBvjiSZK87ELrYOSESUYeVIc9mvLLf/nXalMOS5dYrgZq9o5OVkbZAVM06CVxYsCwH9BDZFPlQTlPA1j4ahA== + events@^3.2.0: version "3.3.0" resolved "https://registry.npmjs.org/events/-/events-3.3.0.tgz" @@ -5013,6 +5060,21 @@ execa@4.1.0: signal-exit "^3.0.2" strip-final-newline "^2.0.0" +execa@8.0.1: + version "8.0.1" + resolved "https://registry.yarnpkg.com/execa/-/execa-8.0.1.tgz#51f6a5943b580f963c3ca9c6321796db8cc39b8c" + integrity sha512-VyhnebXciFV2DESc+p6B+y0LjSm0krU4OgJN44qFAhBY0TJ+1V61tYD2+wHusZ6F9n5K+vl8k0sTy7PEfV4qpg== + dependencies: + cross-spawn "^7.0.3" + get-stream "^8.0.1" + human-signals "^5.0.0" + is-stream "^3.0.0" + merge-stream "^2.0.0" + npm-run-path "^5.1.0" + onetime "^6.0.0" + signal-exit "^4.1.0" + strip-final-newline "^3.0.0" + execa@^5.0.0: version "5.1.1" resolved "https://registry.npmjs.org/execa/-/execa-5.1.1.tgz" @@ -5437,6 +5499,11 @@ get-caller-file@^2.0.5: resolved "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz" integrity sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg== +get-east-asian-width@^1.0.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/get-east-asian-width/-/get-east-asian-width-1.2.0.tgz#5e6ebd9baee6fb8b7b6bd505221065f0cd91f64e" + integrity sha512-2nk+7SIVb14QrgXFHcm84tD4bKQz0RxPuMT8Ag5KPOq7J5fEmAg0UbXdTOSHqNuHSU28k55qnceesxXRZGzKWA== + get-intrinsic@^1.0.2, get-intrinsic@^1.1.0, get-intrinsic@^1.1.1, get-intrinsic@^1.1.3: version "1.1.3" resolved "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.1.3.tgz" @@ -5468,6 +5535,11 @@ get-stream@^6.0.0: resolved "https://registry.npmjs.org/get-stream/-/get-stream-6.0.1.tgz" integrity sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg== +get-stream@^8.0.1: + version "8.0.1" + resolved "https://registry.yarnpkg.com/get-stream/-/get-stream-8.0.1.tgz#def9dfd71742cd7754a7761ed43749a27d02eca2" + integrity sha512-VaUJspBffn/LMCJVoMvSAdmscJyS1auj5Zulnn5UoYcY531UWmdwhRWkcGKnGU93m5HSXP9LP2usOryrBtQowA== + get-symbol-description@^1.0.0: version "1.0.0" resolved "https://registry.npmjs.org/get-symbol-description/-/get-symbol-description-1.0.0.tgz" @@ -5823,6 +5895,16 @@ human-signals@^2.1.0: resolved "https://registry.npmjs.org/human-signals/-/human-signals-2.1.0.tgz" integrity sha512-B4FFZ6q/T2jhhksgkbEW3HBvWIfDW85snkQgawt07S7J5QXTk6BkNV+0yAeZrM5QpMAdYlocGoljn0sJ/WQkFw== +human-signals@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/human-signals/-/human-signals-5.0.0.tgz#42665a284f9ae0dade3ba41ebc37eb4b852f3a28" + integrity sha512-AXcZb6vzzrFAUE61HnN4mpLqd/cSIwNQjtNWR0euPm6y0iqx3G4gOXaIDdtdDwZmhwe82LA6+zinmW4UBWVePQ== + +husky@^8.0.3: + version "8.0.3" + resolved "https://registry.yarnpkg.com/husky/-/husky-8.0.3.tgz#4936d7212e46d1dea28fef29bb3a108872cd9184" + integrity sha512-+dQSyqPh4x1hlO1swXBiNb2HzTDN1I2IGLQx1GrBuiqFJfoMrnZWwVmatvSiO+Iz8fBUnf+lekwNo4c2LlXItg== + iconv-lite@0.4.24: version "0.4.24" resolved "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz" @@ -6028,6 +6110,18 @@ is-fullwidth-code-point@^3.0.0: resolved "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz" integrity sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg== +is-fullwidth-code-point@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/is-fullwidth-code-point/-/is-fullwidth-code-point-4.0.0.tgz#fae3167c729e7463f8461ce512b080a49268aa88" + integrity sha512-O4L094N2/dZ7xqVdrXhh9r1KODPJpFms8B5sGdJLPy664AgvXsreZUyCQQNItZRDlYug4xStLjNp/sz3HvBowQ== + +is-fullwidth-code-point@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/is-fullwidth-code-point/-/is-fullwidth-code-point-5.0.0.tgz#9609efced7c2f97da7b60145ef481c787c7ba704" + integrity sha512-OVa3u9kkBbw7b8Xw5F9P+D/T9X+Z4+JruYVNapTjPYZYUznQ5YfWeFkOj606XYYW8yugTfC8Pj0hYqvi4ryAhA== + dependencies: + get-east-asian-width "^1.0.0" + is-generator-fn@^2.0.0: version "2.1.0" resolved "https://registry.npmjs.org/is-generator-fn/-/is-generator-fn-2.1.0.tgz" @@ -6137,6 +6231,11 @@ is-stream@^2.0.0: resolved "https://registry.npmjs.org/is-stream/-/is-stream-2.0.1.tgz" integrity sha512-hFoiJiTl63nn+kstHGBtewWSKnQLpyb155KHheA1l39uvtO9nWIop1p3udqPcUd/xbF1VLMO4n7OI6p7RbngDg== +is-stream@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/is-stream/-/is-stream-3.0.0.tgz#e6bfd7aa6bef69f4f472ce9bb681e3e57b4319ac" + integrity sha512-LnQR4bZ9IADDRSkvpqMGvt/tEJWclzklNgSw48V5EAaAeDd6qGvN8ei6k5p0tvxSR171VmGyHuTiAOfxAbr8kA== + is-string@^1.0.5, is-string@^1.0.7: version "1.0.7" resolved "https://registry.npmjs.org/is-string/-/is-string-1.0.7.tgz" @@ -6975,6 +7074,11 @@ lie@~3.3.0: dependencies: immediate "~3.0.5" +lilconfig@3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/lilconfig/-/lilconfig-3.0.0.tgz#f8067feb033b5b74dab4602a5f5029420be749bc" + integrity sha512-K2U4W2Ff5ibV7j7ydLr+zLAkIg5JJ4lPn1Ltsdt+Tz/IjQ8buJ55pZAxoP34lqIiwtF9iAvtLv3JGv7CAyAg+g== + lilconfig@^2.0.3, lilconfig@^2.0.5, lilconfig@^2.0.6: version "2.0.6" resolved "https://registry.npmjs.org/lilconfig/-/lilconfig-2.0.6.tgz" @@ -6985,6 +7089,34 @@ lines-and-columns@^1.1.6: resolved "https://registry.npmjs.org/lines-and-columns/-/lines-and-columns-1.2.4.tgz" integrity sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg== +lint-staged@^15.2.0: + version "15.2.0" + resolved "https://registry.yarnpkg.com/lint-staged/-/lint-staged-15.2.0.tgz#3111534ca58096a3c8f70b044b6e7fe21b36f859" + integrity sha512-TFZzUEV00f+2YLaVPWBWGAMq7So6yQx+GG8YRMDeOEIf95Zn5RyiLMsEiX4KTNl9vq/w+NqRJkLA1kPIo15ufQ== + dependencies: + chalk "5.3.0" + commander "11.1.0" + debug "4.3.4" + execa "8.0.1" + lilconfig "3.0.0" + listr2 "8.0.0" + micromatch "4.0.5" + pidtree "0.6.0" + string-argv "0.3.2" + yaml "2.3.4" + +listr2@8.0.0: + version "8.0.0" + resolved "https://registry.yarnpkg.com/listr2/-/listr2-8.0.0.tgz#aa7c230995f8ce378585f7c96c0c6d1cefa4700d" + integrity sha512-u8cusxAcyqAiQ2RhYvV7kRKNLgUvtObIbhOX2NCXqvp1UU32xIg5CT22ykS2TPKJXZWJwtK3IKLiqAGlGNE+Zg== + dependencies: + cli-truncate "^4.0.0" + colorette "^2.0.20" + eventemitter3 "^5.0.1" + log-update "^6.0.0" + rfdc "^1.3.0" + wrap-ansi "^9.0.0" + listr2@^3.8.3: version "3.14.0" resolved "https://registry.npmjs.org/listr2/-/listr2-3.14.0.tgz" @@ -7098,6 +7230,17 @@ log-update@^4.0.0: slice-ansi "^4.0.0" wrap-ansi "^6.2.0" +log-update@^6.0.0: + version "6.0.0" + resolved "https://registry.yarnpkg.com/log-update/-/log-update-6.0.0.tgz#0ddeb7ac6ad658c944c1de902993fce7c33f5e59" + integrity sha512-niTvB4gqvtof056rRIrTZvjNYE4rCUzO6X/X+kYjd7WFxXeJ0NwEFnRxX6ehkvv3jTwrXnNdtAak5XYZuIyPFw== + dependencies: + ansi-escapes "^6.2.0" + cli-cursor "^4.0.0" + slice-ansi "^7.0.0" + strip-ansi "^7.1.0" + wrap-ansi "^9.0.0" + loose-envify@^1.1.0, loose-envify@^1.4.0: version "1.4.0" resolved "https://registry.npmjs.org/loose-envify/-/loose-envify-1.4.0.tgz" @@ -7204,7 +7347,7 @@ methods@~1.1.2: resolved "https://registry.npmjs.org/methods/-/methods-1.1.2.tgz" integrity sha512-iclAHeNqNm68zFtnZ0e+1L2yUIdvzNoauKU4WBA3VvH/vPFieF7qfRlwUZU+DA9P9bPXIS90ulxoUoCH23sV2w== -micromatch@^4.0.2, micromatch@^4.0.4, micromatch@^4.0.5: +micromatch@4.0.5, micromatch@^4.0.2, micromatch@^4.0.4, micromatch@^4.0.5: version "4.0.5" resolved "https://registry.npmjs.org/micromatch/-/micromatch-4.0.5.tgz" integrity sha512-DMy+ERcEW2q8Z2Po+WNXuw3c5YaUSFjAO5GsJqfEl7UjvtIuFKO6ZrKvcItdy98dwFI2N1tg3zNIdKaQT+aNdA== @@ -7234,6 +7377,11 @@ mimic-fn@^2.1.0: resolved "https://registry.npmjs.org/mimic-fn/-/mimic-fn-2.1.0.tgz" integrity sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg== +mimic-fn@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/mimic-fn/-/mimic-fn-4.0.0.tgz#60a90550d5cb0b239cca65d893b1a53b29871ecc" + integrity sha512-vqiC06CuhBTUdZH+RYl8sFrL096vA45Ok5ISO6sE/Mr1jRbGH4Csnhi8f3wKVl7x8mO4Au7Ir9D3Oyv1VYMFJw== + min-indent@^1.0.0: version "1.0.1" resolved "https://registry.npmjs.org/min-indent/-/min-indent-1.0.1.tgz" @@ -7393,6 +7541,13 @@ npm-run-path@^4.0.0, npm-run-path@^4.0.1: dependencies: path-key "^3.0.0" +npm-run-path@^5.1.0: + version "5.2.0" + resolved "https://registry.yarnpkg.com/npm-run-path/-/npm-run-path-5.2.0.tgz#224cdd22c755560253dd71b83a1ef2f758b2e955" + integrity sha512-W4/tgAXFqFA0iL7fk0+uQ3g7wkL8xJmx3XdK0VGb4cHW//eZTtKGvFBBoRKVTpY7n6ze4NL9ly7rgXcHufqXKg== + dependencies: + path-key "^4.0.0" + nth-check@^1.0.2: version "1.0.2" resolved "https://registry.npmjs.org/nth-check/-/nth-check-1.0.2.tgz" @@ -7526,6 +7681,13 @@ onetime@^5.1.0, onetime@^5.1.2: dependencies: mimic-fn "^2.1.0" +onetime@^6.0.0: + version "6.0.0" + resolved "https://registry.yarnpkg.com/onetime/-/onetime-6.0.0.tgz#7c24c18ed1fd2e9bca4bd26806a33613c77d34b4" + integrity sha512-1FlR+gjXK7X+AsAHso35MnyN5KqGwJRi/31ft6x0M194ht7S+rWAvd7PHss9xSKMzE0asv1pyIHaJYq+BbacAQ== + dependencies: + mimic-fn "^4.0.0" + open@^8.0.9, open@^8.4.0: version "8.4.0" resolved "https://registry.npmjs.org/open/-/open-8.4.0.tgz" @@ -7687,6 +7849,11 @@ path-key@^3.0.0, path-key@^3.1.0: resolved "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz" integrity sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q== +path-key@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/path-key/-/path-key-4.0.0.tgz#295588dc3aee64154f877adb9d780b81c554bf18" + integrity sha512-haREypq7xkM7ErfgIyA0z+Bj4AGKlMSdlQE2jvJo6huWD1EdkKYV+G/T4nq0YEF2vgTT8kqMFKo1uHn950r4SQ== + path-parse@^1.0.7: version "1.0.7" resolved "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz" @@ -7727,6 +7894,11 @@ picomatch@^2.0.4, picomatch@^2.2.1, picomatch@^2.2.2, picomatch@^2.2.3, picomatc resolved "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz" integrity sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA== +pidtree@0.6.0: + version "0.6.0" + resolved "https://registry.yarnpkg.com/pidtree/-/pidtree-0.6.0.tgz#90ad7b6d42d5841e69e0a2419ef38f8883aa057c" + integrity sha512-eG2dWTVw5bzqGRztnHExczNxt5VGsE6OwTeCG3fdUf9KBsZzO3R5OIIIzWR+iZA0NtZ+RDVdaoE2dK1cn6jH4g== + pify@^2.2.0, pify@^2.3.0: version "2.3.0" resolved "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz" @@ -9004,6 +9176,14 @@ restore-cursor@^3.1.0: onetime "^5.1.0" signal-exit "^3.0.2" +restore-cursor@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/restore-cursor/-/restore-cursor-4.0.0.tgz#519560a4318975096def6e609d44100edaa4ccb9" + integrity sha512-I9fPXU9geO9bHOt9pHHOhOkYerIMsmVaWB0rA2AI9ERh/+x/i7MV5HKBNrg+ljO5eoPVgCcnFuRjJ9uH6I/3eg== + dependencies: + onetime "^5.1.0" + signal-exit "^3.0.2" + retry@^0.13.1: version "0.13.1" resolved "https://registry.npmjs.org/retry/-/retry-0.13.1.tgz" @@ -9290,6 +9470,11 @@ signal-exit@^3.0.2, signal-exit@^3.0.3: resolved "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.7.tgz" integrity sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ== +signal-exit@^4.1.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-4.1.0.tgz#952188c1cbd546070e2dd20d0f41c0ae0530cb04" + integrity sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw== + sisteransi@^1.0.5: version "1.0.5" resolved "https://registry.npmjs.org/sisteransi/-/sisteransi-1.0.5.tgz" @@ -9323,6 +9508,22 @@ slice-ansi@^4.0.0: astral-regex "^2.0.0" is-fullwidth-code-point "^3.0.0" +slice-ansi@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/slice-ansi/-/slice-ansi-5.0.0.tgz#b73063c57aa96f9cd881654b15294d95d285c42a" + integrity sha512-FC+lgizVPfie0kkhqUScwRu1O/lF6NOgJmlCgK+/LYxDCTk8sGelYaHDhFcDN+Sn3Cv+3VSa4Byeo+IMCzpMgQ== + dependencies: + ansi-styles "^6.0.0" + is-fullwidth-code-point "^4.0.0" + +slice-ansi@^7.0.0: + version "7.1.0" + resolved "https://registry.yarnpkg.com/slice-ansi/-/slice-ansi-7.1.0.tgz#cd6b4655e298a8d1bdeb04250a433094b347b9a9" + integrity sha512-bSiSngZ/jWeX93BqeIAbImyTbEihizcwNjFoRUIY/T1wWQsfsm2Vw1agPKylXvQTU7iASGdHhyqRlqQzfz+Htg== + dependencies: + ansi-styles "^6.2.1" + is-fullwidth-code-point "^5.0.0" + sockjs@^0.3.24: version "0.3.24" resolved "https://registry.npmjs.org/sockjs/-/sockjs-0.3.24.tgz" @@ -9456,6 +9657,11 @@ statuses@2.0.1: resolved "https://registry.npmjs.org/statuses/-/statuses-1.5.0.tgz" integrity sha512-OpZ3zP+jT1PI7I8nemJX4AKmAX070ZkYPVWV/AaKTJl+tXCTGyVdC1a4SL8RUQYEwk/f34ZX8UTykN68FwrqAA== +string-argv@0.3.2: + version "0.3.2" + resolved "https://registry.yarnpkg.com/string-argv/-/string-argv-0.3.2.tgz#2b6d0ef24b656274d957d54e0a4bbf6153dc02b6" + integrity sha512-aqD2Q0144Z+/RqG52NeHEkZauTAUWJO8c6yTftGJKO3Tja5tUgIfmIl6kExvhtxSDP7fXB6DvzkfMpCd/F3G+Q== + string-length@^4.0.1: version "4.0.2" resolved "https://registry.npmjs.org/string-length/-/string-length-4.0.2.tgz" @@ -9486,6 +9692,15 @@ string-width@^4.1.0, string-width@^4.2.0: is-fullwidth-code-point "^3.0.0" strip-ansi "^6.0.1" +string-width@^7.0.0: + version "7.0.0" + resolved "https://registry.yarnpkg.com/string-width/-/string-width-7.0.0.tgz#14aa1b7aaa126d5b64fa79d3c894da8a9650ba06" + integrity sha512-GPQHj7row82Hjo9hKZieKcHIhaAIKOJvFSIZXuCU9OASVZrMNUaZuz++SPVrBjnLsnk4k+z9f2EIypgxf2vNFw== + dependencies: + emoji-regex "^10.3.0" + get-east-asian-width "^1.0.0" + strip-ansi "^7.1.0" + string.prototype.matchall@^4.0.6, string.prototype.matchall@^4.0.8: version "4.0.8" resolved "https://registry.npmjs.org/string.prototype.matchall/-/string.prototype.matchall-4.0.8.tgz" @@ -9555,6 +9770,13 @@ strip-ansi@^7.0.1: dependencies: ansi-regex "^6.0.1" +strip-ansi@^7.1.0: + version "7.1.0" + resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-7.1.0.tgz#d5b6568ca689d8561370b0707685d22434faff45" + integrity sha512-iq6eVVI64nQQTRYq2KtEg2d2uU7LElhTJwsH4YzIHZshxlgZms/wIc4VoDQTlG/IvVIrBKG06CrZnp0qv7hkcQ== + dependencies: + ansi-regex "^6.0.1" + strip-bom@^3.0.0: version "3.0.0" resolved "https://registry.npmjs.org/strip-bom/-/strip-bom-3.0.0.tgz" @@ -9575,6 +9797,11 @@ strip-final-newline@^2.0.0: resolved "https://registry.npmjs.org/strip-final-newline/-/strip-final-newline-2.0.0.tgz" integrity sha512-BrpvfNAE3dcvq7ll3xVumzjKjZQ5tI1sEUIKr3Uoks0XUl45St3FlatVqef9prk4jRDzhW6WZg+3bk93y6pLjA== +strip-final-newline@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/strip-final-newline/-/strip-final-newline-3.0.0.tgz#52894c313fbff318835280aed60ff71ebf12b8fd" + integrity sha512-dOESqjYr96iWYylGObzd39EuNTa5VJxyvVAEm5Jnh7KGo75V43Hk1odPQkNDyXNmUR6k+gEiDVXnjB8HJ3crXw== + strip-indent@^3.0.0: version "3.0.0" resolved "https://registry.npmjs.org/strip-indent/-/strip-indent-3.0.0.tgz" @@ -10006,6 +10233,11 @@ type-fest@^2.19.0: resolved "https://registry.npmjs.org/type-fest/-/type-fest-2.19.0.tgz" integrity sha512-RAH822pAdBgcNMAfWnCBU3CFZcfZ/i1eZjwFU/dsLKumyuuP3niueg2UAukXYF0E2AAoc82ZSSf9J0WQBinzHA== +type-fest@^3.0.0: + version "3.13.1" + resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-3.13.1.tgz#bb744c1f0678bea7543a2d1ec24e83e68e8c8706" + integrity sha512-tLq3bSNx+xSpwvAJnzrK0Ep5CLNWjvFTOp71URMaAEWBfRb9nnJiBoUe0tF8bI4ZFO3omgBR6NvnbzVUT3Ly4g== + type-is@~1.6.18: version "1.6.18" resolved "https://registry.npmjs.org/type-is/-/type-is-1.6.18.tgz" @@ -10659,6 +10891,15 @@ wrap-ansi@^7.0.0: string-width "^4.1.0" strip-ansi "^6.0.0" +wrap-ansi@^9.0.0: + version "9.0.0" + resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-9.0.0.tgz#1a3dc8b70d85eeb8398ddfb1e4a02cd186e58b3e" + integrity sha512-G8ura3S+3Z2G+mkgNRq8dqaFZAuxfsxpBB8OCTGRTCtp+l/v9nbFNmCUP1BZMts3G1142MsZfn6eeUKrr4PD1Q== + dependencies: + ansi-styles "^6.2.1" + string-width "^7.0.0" + strip-ansi "^7.1.0" + wrappy@1: version "1.0.2" resolved "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz" @@ -10714,6 +10955,11 @@ yallist@^4.0.0: resolved "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz" integrity sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A== +yaml@2.3.4: + version "2.3.4" + resolved "https://registry.yarnpkg.com/yaml/-/yaml-2.3.4.tgz#53fc1d514be80aabf386dc6001eb29bf3b7523b2" + integrity sha512-8aAvwVUSHpfEqTQ4w/KMlf3HcRdt50E5ODIQJBw1fQ5RL34xabzxtUlzTXVqc4rkZsPbvrXKWnABCD7kWSmocA== + yaml@^1.10.0, yaml@^1.10.2, yaml@^1.7.2: version "1.10.2" resolved "https://registry.npmjs.org/yaml/-/yaml-1.10.2.tgz" From 901f162efd3d11cb9baa703987ad9af597dd2a02 Mon Sep 17 00:00:00 2001 From: IlyaDoronin Date: Fri, 22 Dec 2023 17:01:36 +0300 Subject: [PATCH 03/13] fix: husky installed --- public/index.html | 11 +++++++---- public/site.webmanifest | 34 +++++++++++++++++----------------- 2 files changed, 24 insertions(+), 21 deletions(-) diff --git a/public/index.html b/public/index.html index a96c59f9..daa88ffe 100755 --- a/public/index.html +++ b/public/index.html @@ -1,4 +1,4 @@ - + @@ -7,9 +7,12 @@ - - - + + + Pena Quiz diff --git a/public/site.webmanifest b/public/site.webmanifest index b20abb7c..fa99de77 100644 --- a/public/site.webmanifest +++ b/public/site.webmanifest @@ -1,19 +1,19 @@ { - "name": "", - "short_name": "", - "icons": [ - { - "src": "/android-chrome-192x192.png", - "sizes": "192x192", - "type": "image/png" - }, - { - "src": "/android-chrome-512x512.png", - "sizes": "512x512", - "type": "image/png" - } - ], - "theme_color": "#ffffff", - "background_color": "#ffffff", - "display": "standalone" + "name": "", + "short_name": "", + "icons": [ + { + "src": "/android-chrome-192x192.png", + "sizes": "192x192", + "type": "image/png" + }, + { + "src": "/android-chrome-512x512.png", + "sizes": "512x512", + "type": "image/png" + } + ], + "theme_color": "#ffffff", + "background_color": "#ffffff", + "display": "standalone" } From d785097a83c2e8d1f7ae41d09b27ce88608f4f62 Mon Sep 17 00:00:00 2001 From: IlyaDoronin Date: Fri, 22 Dec 2023 17:04:35 +0300 Subject: [PATCH 04/13] test: husky From 575780a605a9075308684025ca512eea9ad42f05 Mon Sep 17 00:00:00 2001 From: IlyaDoronin Date: Fri, 22 Dec 2023 17:06:41 +0300 Subject: [PATCH 05/13] test: 1 --- package.json | 3 ++- public/index.html | 2 ++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/package.json b/package.json index 2d46973e..62fea0ff 100755 --- a/package.json +++ b/package.json @@ -87,6 +87,7 @@ "prettier": "^3.1.1" }, "lint-staged": { - "**/*": "yarn code:format" + "**/*": "yarn code:format", + "--allow-empty": true } } diff --git a/public/index.html b/public/index.html index daa88ffe..263475a5 100755 --- a/public/index.html +++ b/public/index.html @@ -19,4 +19,6 @@
+ +
324
From 93ae3f471992eaae87e3339c67f03284c02a337b Mon Sep 17 00:00:00 2001 From: IlyaDoronin Date: Fri, 22 Dec 2023 17:06:58 +0300 Subject: [PATCH 06/13] test: 2 --- .husky/pre-commit | 2 +- package.json | 3 +-- public/index.html | 2 -- 3 files changed, 2 insertions(+), 5 deletions(-) diff --git a/.husky/pre-commit b/.husky/pre-commit index 5a182ef1..3ab2e13d 100644 --- a/.husky/pre-commit +++ b/.husky/pre-commit @@ -1,4 +1,4 @@ #!/usr/bin/env sh . "$(dirname -- "$0")/_/husky.sh" -yarn lint-staged +yarn lint-staged --allow-empty diff --git a/package.json b/package.json index 62fea0ff..2d46973e 100755 --- a/package.json +++ b/package.json @@ -87,7 +87,6 @@ "prettier": "^3.1.1" }, "lint-staged": { - "**/*": "yarn code:format", - "--allow-empty": true + "**/*": "yarn code:format" } } diff --git a/public/index.html b/public/index.html index 263475a5..daa88ffe 100755 --- a/public/index.html +++ b/public/index.html @@ -19,6 +19,4 @@
- -
324
From 27708d097f07abe955c16ef6474ecfb941cdd230 Mon Sep 17 00:00:00 2001 From: IlyaDoronin Date: Fri, 22 Dec 2023 17:14:36 +0300 Subject: [PATCH 07/13] test: 4 --- public/index.html | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/public/index.html b/public/index.html index daa88ffe..adc153ea 100755 --- a/public/index.html +++ b/public/index.html @@ -10,13 +10,15 @@ - Pena Quiz - - - -
- + + + href="https://fonts.googleapis.com/css2?family=Rubik:wght@400;500;600&display=swap" + rel="stylesheet" + /> + Pena Quiz + + + +
+ From 7d982e4d49007a8051cbfb108c3880bbf1db2ad4 Mon Sep 17 00:00:00 2001 From: IlyaDoronin Date: Fri, 22 Dec 2023 17:18:29 +0300 Subject: [PATCH 08/13] fix: tests --- public/index.html | 20 +++++++++----------- 1 file changed, 9 insertions(+), 11 deletions(-) diff --git a/public/index.html b/public/index.html index adc153ea..daa88ffe 100755 --- a/public/index.html +++ b/public/index.html @@ -10,15 +10,13 @@ - Pena Quiz - - - -
- + href="https://fonts.googleapis.com/css2?family=Rubik:wght@400;500;600&display=swap" + rel="stylesheet" + /> + Pena Quiz + + + +
+ From b9aacedd620ee431bd8d3683b76ae855bd1dd7d7 Mon Sep 17 00:00:00 2001 From: Nastya Date: Sat, 30 Dec 2023 21:51:16 +0300 Subject: [PATCH 09/13] =?UTF-8?q?=D0=BD=D0=BE=D0=B4=D1=8B=20=D0=B1=D0=B5?= =?UTF-8?q?=D0=B7=20=D0=B8=D0=BC=D0=B5=D0=BD=D0=B8=20=D0=B3=D0=BE=D0=B2?= =?UTF-8?q?=D0=BE=D1=80=D1=8F=D1=82=20=D0=BF=D0=BE=D1=80=D1=8F=D0=B4=D0=BA?= =?UTF-8?q?=D0=BE=D0=B2=D1=8B=D0=B9=20=D0=BD=D0=BE=D0=BC=D0=B5=D1=80,=20?= =?UTF-8?q?=D0=BA=D0=B2=D0=B8=D0=B7=D1=8B=20=D0=B1=D0=B5=D0=B7=20=D0=B8?= =?UTF-8?q?=D0=BC=D0=B5=D0=BD=D0=B8=20=D0=B3=D0=BE=D0=B2=D0=BE=D1=80=D1=8F?= =?UTF-8?q?=D1=82=20=D1=82=D0=B8=D0=BF=20=D0=B8=20=D0=BA=D0=BE=D0=BB=D0=B2?= =?UTF-8?q?=D0=BE=20=D0=B2=D0=BE=D0=BF=D1=80=D0=BE=D1=81=D0=BE=D0=B2=20?= =?UTF-8?q?=D0=B2=D0=BD=D1=83=D1=82=D1=80=D0=B8,=20=D1=82=D0=B5=D1=81?= =?UTF-8?q?=D1=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/model/quiz/quiz.ts | 2 ++ src/pages/Questions/BranchingMap/CsComponent.tsx | 2 +- src/pages/Questions/BranchingMap/helper.ts | 2 +- src/pages/ViewPublicationPage/Footer.tsx | 2 +- src/pages/createQuize/QuizCard.tsx | 12 +++++++++++- src/pages/startPage/EditPage.tsx | 1 + src/utils/checkQuestionHint.ts | 4 +++- 7 files changed, 20 insertions(+), 5 deletions(-) diff --git a/src/model/quiz/quiz.ts b/src/model/quiz/quiz.ts index 0de02cdc..7ce0d363 100644 --- a/src/model/quiz/quiz.ts +++ b/src/model/quiz/quiz.ts @@ -55,6 +55,8 @@ export interface Quiz { average_time: number; /** set true if squiz realize group functionality */ super: boolean; + + questions_count: number; /** group of new quiz */ group_id: number; } diff --git a/src/pages/Questions/BranchingMap/CsComponent.tsx b/src/pages/Questions/BranchingMap/CsComponent.tsx index c2cb3168..994572fa 100644 --- a/src/pages/Questions/BranchingMap/CsComponent.tsx +++ b/src/pages/Questions/BranchingMap/CsComponent.tsx @@ -142,7 +142,7 @@ function CsComponent({ { data: { id: targetQuestion.content.id, - label: targetQuestion.title === "" || targetQuestion.title === " " ? "noname" : targetQuestion.title, + label: targetQuestion.title === "" || targetQuestion.title === " " ? "noname №" + targetQuestion.page : targetQuestion.title, parentType: parentNodeContentId } }, diff --git a/src/pages/Questions/BranchingMap/helper.ts b/src/pages/Questions/BranchingMap/helper.ts index a158e26c..2d328fa1 100644 --- a/src/pages/Questions/BranchingMap/helper.ts +++ b/src/pages/Questions/BranchingMap/helper.ts @@ -21,7 +21,7 @@ export const storeToNodes = (questions: AnyTypedQuizQuestion[]) => { if (question.content.rule.parentId) { nodes.push({data: { id: question.content.id, - label: question.title === "" || question.title === " " ? "noname" : question.title, + label: question.title === "" || question.title === " " ? "noname №" + question.page : question.title, parentType: question.content.rule.parentId }}) // nodes.push({ diff --git a/src/pages/ViewPublicationPage/Footer.tsx b/src/pages/ViewPublicationPage/Footer.tsx index d4d368ea..51b56a6f 100644 --- a/src/pages/ViewPublicationPage/Footer.tsx +++ b/src/pages/ViewPublicationPage/Footer.tsx @@ -157,7 +157,7 @@ export const Footer = ({ setCurrentQuestion, question, setShowContactForm, setSh if (!question.required) {//вопрос не обязателен и не нашли совпадений между ответами и условиями ветвления console.log("вопрос не обязателен ищем дальше") const defaultQ = question.content.rule.default - if (defaultQ) return defaultQ + if (defaultQ.length > 1 && defaultQ !== " ") return defaultQ //Вопросы типа страница, ползунок, своё поле для ввода и дата не могут иметь больше 1 ребёнка. Пользователь не может настроить там дефолт //Кинуть на ребёнка надо даже если там нет дефолта if ( diff --git a/src/pages/createQuize/QuizCard.tsx b/src/pages/createQuize/QuizCard.tsx index 02e8d0e8..ab6154ef 100755 --- a/src/pages/createQuize/QuizCard.tsx +++ b/src/pages/createQuize/QuizCard.tsx @@ -27,6 +27,8 @@ export default function QuizCard({ quiz, openCount = 0, applicationCount = 0, co navigate("/edit"); } + const questionCount = useRef(quiz.questions_count.toString() || "") + return ( - {quiz.name} + { + quiz.name.length === 0 || quiz.name === " " ? + quiz.config.type === "form" ? + "Анкета " + questionCount.current + : + "Квиз " + questionCount.current + : + quiz.name + } { const getData = async () => { diff --git a/src/utils/checkQuestionHint.ts b/src/utils/checkQuestionHint.ts index 95378457..dcdba809 100644 --- a/src/utils/checkQuestionHint.ts +++ b/src/utils/checkQuestionHint.ts @@ -53,9 +53,11 @@ export const checkQuestionHint = (questions: AnyTypedQuizQuestion, quiz:Quiz): R question.content.rule.main.forEach((condition: QuestionBranchingRuleMain) => { buffer.forEach((oldCondition: QuestionBranchingRuleMain) => { if (areRulesEqual(condition.rules, oldCondition.rules)) { + const q = getQuestionByContentId(condition.next) + const oldq = getQuestionByContentId(oldCondition.next) pushProblem( question.content.id, - `У вопроса "${getQuestionByContentId(condition.next)?.title || "noname"}" и "${getQuestionByContentId(oldCondition.next)?.title || "noname"}" одинаковые условия ветвления`, + `У вопроса "${q?.title || "noname №" + q?.page}" и "${oldq?.title || "noname №" + oldq?.page}" одинаковые условия ветвления`, question.title ) } From 80efd95de1a547de15bc1bb97a7e045d6c7d1701 Mon Sep 17 00:00:00 2001 From: Tamara Date: Sat, 30 Dec 2023 23:31:49 +0300 Subject: [PATCH 10/13] =?UTF-8?q?=D0=B7=D0=B0=D0=BC=D0=B5=D0=BD=D0=B0=20?= =?UTF-8?q?=D1=82=D0=B5=D0=BA=D1=81=D1=82=D0=BE=D0=B2,=20-=D1=87=D0=B5?= =?UTF-8?q?=D0=BA=D0=B1=D0=BE=D0=BA=D1=81=D1=8B=20=D0=B2=D0=BD=D1=83=D1=82?= =?UTF-8?q?=D1=80=D0=B5=D0=BD=D0=BD=D0=B5=D0=B5=20=D0=BD=D0=B0=D0=B7=D0=B2?= =?UTF-8?q?=D0=B0=D0=BD=D0=B8=D0=B5=20=D0=B2=D0=BE=D0=BF=D1=80=D0=BE=D1=81?= =?UTF-8?q?=D0=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/model/quizSettings.ts | 2 +- src/pages/ContactFormPage/ContactFormPage.tsx | 2 +- src/pages/DesignPage/DesignFilling.tsx | 3 +- src/pages/InstallQuiz/AutoOpenInstall.tsx | 8 +- src/pages/InstallQuiz/BannerInstall.tsx | 8 +- src/pages/InstallQuiz/ButtonSocial.tsx | 10 +- src/pages/InstallQuiz/InBodyInstall.tsx | 8 +- src/pages/InstallQuiz/InstallQuiz.tsx | 48 ++++---- src/pages/InstallQuiz/InstallQzCode.tsx | 10 +- .../InstallQuiz/InstallQzOnSiteParent.tsx | 2 +- src/pages/InstallQuiz/OnButtonInstall.tsx | 4 +- src/pages/InstallQuiz/VidjetInstall.tsx | 4 +- .../Questions/BranchingMap/CsComponent.tsx | 2 +- .../Questions/BranchingMap/FirstNodeField.tsx | 4 +- .../BranchingQuestionsModal.tsx | 2 +- src/pages/Questions/ButtonsOptionsAndPict.tsx | 64 +++++----- .../Questions/DataOptions/settingData.tsx | 70 +++++------ .../Questions/DropDown/settingDropDown.tsx | 56 ++++----- src/pages/Questions/Emoji/settingEmoji.tsx | 66 +++++----- .../SettingOptionsAndPict.tsx | 52 ++++---- .../OptionsPicture/settingOpytionsPict.tsx | 74 ++++++------ .../OwnTextField/settingTextField.tsx | 82 ++++++------- .../PageOptions/SettingPageOptions.tsx | 62 +++++----- src/pages/Questions/QuestionsPage.tsx | 2 +- .../Questions/RatingOptions/settingRating.tsx | 64 +++++----- .../Questions/SliderOptions/settingSlider.tsx | 72 +++++------ .../SwitchBranchingPanel/QuestionsList.tsx | 5 - .../Questions/UploadFile/settingUpload.tsx | 78 ++++++------ .../answerOptions/responseSettings.tsx | 86 ++++++------- src/pages/ResultPage/FirstEntry.tsx | 25 ++-- src/pages/ResultPage/cards/ResultCard.tsx | 114 +++++++++--------- src/pages/createQuize/ExpandableQuizBlock.tsx | 2 +- src/pages/createQuize/FirstQuiz.tsx | 4 +- src/pages/createQuize/MyQuizzesFull.tsx | 4 +- src/pages/createQuize/QuizGallery.tsx | 6 +- src/pages/startPage/ModalSizeImage.tsx | 4 +- src/pages/startPage/StartPageSettings.tsx | 2 +- src/pages/startPage/extra.tsx | 15 +-- src/pages/startPage/stepOne.tsx | 6 +- src/stores/quizes/actions.ts | 6 +- src/ui_kit/CreationCard.tsx | 2 + src/ui_kit/Sidebar.tsx | 4 +- 42 files changed, 563 insertions(+), 581 deletions(-) diff --git a/src/model/quizSettings.ts b/src/model/quizSettings.ts index 02b95274..70d9eea8 100644 --- a/src/model/quizSettings.ts +++ b/src/model/quizSettings.ts @@ -13,7 +13,7 @@ export const quizSetupSteps = [ { stepperText: "Настройте авторезультаты", sidebarText: "Результаты", sidebarIcon: ChartPieIcon }, // { stepperText: "Оценка графа карты вопросов", sidebarText: "Карта вопросов", sidebarIcon: QuestionsMapIcon }, { stepperText: "Настройте форму контактов", sidebarText: "Форма контактов", sidebarIcon: ContactBookIcon }, - { stepperText: "Установите квиз", sidebarText: "Установка квиза", sidebarIcon: FlowArrowIcon }, + { stepperText: "Установите quiz", sidebarText: "Установка quiz", sidebarIcon: FlowArrowIcon }, // { stepperText: "Запустите рекламу", sidebarText: "Запуск рекламы", sidebarIcon: MegaphoneIcon }, ] as const; diff --git a/src/pages/ContactFormPage/ContactFormPage.tsx b/src/pages/ContactFormPage/ContactFormPage.tsx index c225fe0e..da42231f 100644 --- a/src/pages/ContactFormPage/ContactFormPage.tsx +++ b/src/pages/ContactFormPage/ContactFormPage.tsx @@ -86,7 +86,7 @@ export default function ContactFormPage() { diff --git a/src/pages/DesignPage/DesignFilling.tsx b/src/pages/DesignPage/DesignFilling.tsx index 6715d3a8..8191325d 100644 --- a/src/pages/DesignPage/DesignFilling.tsx +++ b/src/pages/DesignPage/DesignFilling.tsx @@ -27,7 +27,8 @@ export const DesignFilling = () => { ] return ( - Дизайн + Дизайн + Выберите цветовую схему для вашего опроса - Квиз будет открываться через указанное время + Quiz будет открываться через указанное время - Если квиз уже установлен на + Если quiz уже установлен на сайт, и вы что-то здесь изменили, код на сайте нужно будет поменять. Настройки в этом конструкторе не сохраняются. @@ -76,11 +76,11 @@ export default function AutoOpenInstall () { {/*правая часть*/} - + - + {checked[0] ? diff --git a/src/pages/InstallQuiz/BannerInstall.tsx b/src/pages/InstallQuiz/BannerInstall.tsx index 3e975651..c5887c0a 100644 --- a/src/pages/InstallQuiz/BannerInstall.tsx +++ b/src/pages/InstallQuiz/BannerInstall.tsx @@ -44,7 +44,7 @@ export default function BannerInstall () { - Если квиз уже установлен на сайт, и вы что-то здесь изменили, код на сайте нужно будет поменять. + Если quiz уже установлен на сайт, и вы что-то здесь изменили, код на сайте нужно будет поменять. Настройки в этом конструкторе не сохраняются. @@ -53,8 +53,8 @@ export default function BannerInstall () { Текст-призыв - Заголовок квиза - + Заголовок quiz + Показывать через + Автооткрытие квиза + }}>+ Автооткрытие quiz ) diff --git a/src/pages/InstallQuiz/ButtonSocial.tsx b/src/pages/InstallQuiz/ButtonSocial.tsx index 596efdd8..33f4ad58 100644 --- a/src/pages/InstallQuiz/ButtonSocial.tsx +++ b/src/pages/InstallQuiz/ButtonSocial.tsx @@ -161,7 +161,7 @@ export default function ButtonSocial () { background: theme.palette.background.default, }} > - Добавить квиз в Tiktok + Добавить quiz в Tiktok - 1. Скопируйте ссылку на квиз + 1. Скопируйте ссылку на quiz 2. Зайдите в аккаунт Tiktok - Кликните по кнопке “Изменить профиль”. В поле Веб-сайт вставьте скопированную ссылку на квиз. - Готово! Квиз вставлен в аккаунт Tiktok. + Кликните по кнопке “Изменить профиль”. В поле Веб-сайт вставьте скопированную ссылку на quiz. + Готово! Quiz вставлен в аккаунт Tiktok. - QR-код для перехода в квиз + QR-код для перехода в quiz - Квиз будет открыть прямо в том месте, где вы установите код на сайте + Quiz будет открыть прямо в том месте, где вы установите код на сайте - В мобильной версии будет показана кнопка, открывающая квиз в модальном окне + В мобильной версии будет показана кнопка, открывающая quiz в модальном окне - Если квиз уже установлен на сайт, и вы что-то здесь изменили, + Если quiz уже установлен на сайт, и вы что-то здесь изменили, код на сайте нужно будет поменять. Настройки в этом конструкторе не сохраняются. @@ -116,7 +116,7 @@ export default function InBodyInstall () { color: theme.palette.brightPurple.main, textDecorationColor: theme.palette.brightPurple.main, textAlign: 'left' - }}>+ Автооткрытие квиза + }}>+ Автооткрытие quiz diff --git a/src/pages/InstallQuiz/InstallQuiz.tsx b/src/pages/InstallQuiz/InstallQuiz.tsx index e5ef774d..fc19a850 100644 --- a/src/pages/InstallQuiz/InstallQuiz.tsx +++ b/src/pages/InstallQuiz/InstallQuiz.tsx @@ -93,16 +93,16 @@ export default function InstallQuiz() { > - Ссылка на квиз + Ссылка на quiz - - - - - + {/**/} + {/* */} + {/* */} + {/* */} + {/**/} Стандартная - - На поддомене - + {/**/} + {/* На поддомене*/} + {/**/} @@ -241,10 +241,10 @@ export default function InstallQuiz() { sx={{ display: "flex", alignItems: "center", - justifyContent: "space-between", + justifyContent: "flex-end", }} > - + {/**/} {quiz?.status === "start" ? "Опубликован" : "Не опубликован"} diff --git a/src/pages/InstallQuiz/InstallQzCode.tsx b/src/pages/InstallQuiz/InstallQzCode.tsx index 54b24425..2cff138c 100644 --- a/src/pages/InstallQuiz/InstallQzCode.tsx +++ b/src/pages/InstallQuiz/InstallQzCode.tsx @@ -55,7 +55,7 @@ export default function InstallQzCode() { 2. Код кнопки - Установите код в то место, где должна быть кнопка открытия квиза + Установите код в то место, где должна быть кнопка открытия quiz 3. Проверьте правильность установки - Введите полный адрес страницы, где вы установили квиз и нажмите "проверить" + Введите полный адрес страницы, где вы установили quiz и нажмите "проверить" - Код нужно вставить один раз. Изменения в самом квизе будут отображаться автоматически после сохранения. + Код нужно вставить один раз. Изменения в самом quiz будут отображаться автоматически после сохранения. - Для добавления нескольких квизов на одну страницу, код инициализации достаточно добавить один раз с любого квиза, - а затем вставить кнопки открытия с нужных квизов + Для добавления нескольких quiz на одну страницу, код инициализации достаточно добавить один раз с любого quiz, + а затем вставить кнопки открытия с нужных quiz diff --git a/src/pages/InstallQuiz/InstallQzOnSiteParent.tsx b/src/pages/InstallQuiz/InstallQzOnSiteParent.tsx index b89c1cdc..a0b2a9bc 100644 --- a/src/pages/InstallQuiz/InstallQzOnSiteParent.tsx +++ b/src/pages/InstallQuiz/InstallQzOnSiteParent.tsx @@ -23,7 +23,7 @@ export default function InstallQzOnSiteParent ({outerContainerSx: sx, children}: boxShadow: '0px 100px 309px rgba(210, 208, 225, 0.24), 0px 41.7776px 129.093px rgba(210, 208, 225, 0.172525), 0px 22.3363px 69.0192px rgba(210, 208, 225, 0.143066), 0px 12.5216px 38.6916px rgba(210, 208, 225, 0.12), 0px 6.6501px 20.5488px rgba(210, 208, 225, 0.0969343), 0px 2.76726px 8.55082px rgba(210, 208, 225, 0.0674749)' }}> - Установка квизов на сайте + Установка quiz на сайте Способ установки diff --git a/src/pages/InstallQuiz/OnButtonInstall.tsx b/src/pages/InstallQuiz/OnButtonInstall.tsx index edfbdfad..517349e7 100644 --- a/src/pages/InstallQuiz/OnButtonInstall.tsx +++ b/src/pages/InstallQuiz/OnButtonInstall.tsx @@ -48,7 +48,7 @@ export default function OnButtonInstall () { - Если квиз уже установлен на сайт, и вы что-то здесь изменили, + Если quiz уже установлен на сайт, и вы что-то здесь изменили, код на сайте нужно будет поменять. Настройки в этом конструкторе не сохраняются. @@ -95,7 +95,7 @@ export default function OnButtonInstall () { color: theme.palette.brightPurple.main, textDecorationColor: theme.palette.brightPurple.main, textAlign: 'left' - }}>+ Автооткрытие квиза + }}>+ Автооткрытие quiz diff --git a/src/pages/InstallQuiz/VidjetInstall.tsx b/src/pages/InstallQuiz/VidjetInstall.tsx index 356169f1..8970f68b 100644 --- a/src/pages/InstallQuiz/VidjetInstall.tsx +++ b/src/pages/InstallQuiz/VidjetInstall.tsx @@ -37,7 +37,7 @@ export default function VidjetInstall () { - Если квиз уже установлен на сайт, и вы что-то здесь изменили, код на сайте нужно будет поменять. + Если quiz уже установлен на сайт, и вы что-то здесь изменили, код на сайте нужно будет поменять. Настройки в этом конструкторе не сохраняются. @@ -159,7 +159,7 @@ export default function VidjetInstall () { секунд - Время, через которое квиз автоматически откроется + Время, через которое quiz автоматически откроется : <> diff --git a/src/pages/Questions/BranchingMap/CsComponent.tsx b/src/pages/Questions/BranchingMap/CsComponent.tsx index c2cb3168..99497994 100644 --- a/src/pages/Questions/BranchingMap/CsComponent.tsx +++ b/src/pages/Questions/BranchingMap/CsComponent.tsx @@ -160,7 +160,7 @@ function CsComponent({ } } else { - enqueueSnackbar("Квиз не найден") + enqueueSnackbar("Quiz не найден") } } diff --git a/src/pages/Questions/BranchingMap/FirstNodeField.tsx b/src/pages/Questions/BranchingMap/FirstNodeField.tsx index 499c2ca6..f669536f 100644 --- a/src/pages/Questions/BranchingMap/FirstNodeField.tsx +++ b/src/pages/Questions/BranchingMap/FirstNodeField.tsx @@ -38,7 +38,7 @@ export const FirstNodeField = ({ setOpenedModalQuestions, modalQuestionTargetCon createResult(quiz?.backendId, dragQuestionContentId) } } else { - enqueueSnackbar("Нет информации о взятом опроснике") + enqueueSnackbar("Нет информации о взятом опросе") } } @@ -61,7 +61,7 @@ export const FirstNodeField = ({ setOpenedModalQuestions, modalQuestionTargetCon createResult(quiz?.backendId, modalQuestionTargetContentId) } } else { - enqueueSnackbar("Нет информации о взятом опроснике") + enqueueSnackbar("Нет информации о взятом опросе") } }, [modalQuestionTargetContentId]) diff --git a/src/pages/Questions/BranchingModal/BranchingQuestionsModal.tsx b/src/pages/Questions/BranchingModal/BranchingQuestionsModal.tsx index eaf78b4b..9a0e08c4 100644 --- a/src/pages/Questions/BranchingModal/BranchingQuestionsModal.tsx +++ b/src/pages/Questions/BranchingModal/BranchingQuestionsModal.tsx @@ -106,7 +106,7 @@ export default function BranchingQuestions() { {targetQuestion.title} - + diff --git a/src/pages/Questions/ButtonsOptionsAndPict.tsx b/src/pages/Questions/ButtonsOptionsAndPict.tsx index 949170e7..8ed7a61a 100644 --- a/src/pages/Questions/ButtonsOptionsAndPict.tsx +++ b/src/pages/Questions/ButtonsOptionsAndPict.tsx @@ -114,38 +114,38 @@ export default function ButtonsOptionsAndPict({ /> {isIconMobile ? null : "Настройки"} - setButtonHover("help")} - onMouseLeave={() => setButtonHover("")} - onClick={() => { - SSHC("help"); - }} - sx={{ - minWidth: isIconMobile ? "30px" : "64px", - maxWidth: "102px", - height: "30px", - backgroundColor: - switchState === "help" - ? theme.palette.brightPurple.main - : "transparent", - color: - switchState === "help" ? "#ffffff" : theme.palette.grey3.main, - "&:hover": { - color: switchState === "help" ? theme.palette.grey3.main : null, - }, - }} - > - - {isIconMobile ? null : "Подсказка"} - + {/* setButtonHover("help")}*/} + {/* onMouseLeave={() => setButtonHover("")}*/} + {/* onClick={() => {*/} + {/* SSHC("help");*/} + {/* }}*/} + {/* sx={{*/} + {/* minWidth: isIconMobile ? "30px" : "64px",*/} + {/* maxWidth: "102px",*/} + {/* height: "30px",*/} + {/* backgroundColor:*/} + {/* switchState === "help"*/} + {/* ? theme.palette.brightPurple.main*/} + {/* : "transparent",*/} + {/* color:*/} + {/* switchState === "help" ? "#ffffff" : theme.palette.grey3.main,*/} + {/* "&:hover": {*/} + {/* color: switchState === "help" ? theme.palette.grey3.main : null,*/} + {/* },*/} + {/* }}*/} + {/*>*/} + {/* */} + {/* {isIconMobile ? null : "Подсказка"}*/} + {/**/} <> {/* - - { - updateQuestion(question.id, question => { - question.content.innerNameCheck = target.checked; - question.content.innerName = target.checked ? question.content.innerName : ""; - }); - }} - /> - - - - - - - {question.content.innerNameCheck && ( - setInnerName(target.value || " ")} - /> - )} + {/**/} + {/* {*/} + {/* updateQuestion(question.id, question => {*/} + {/* question.content.innerNameCheck = target.checked;*/} + {/* question.content.innerName = target.checked ? question.content.innerName : "";*/} + {/* });*/} + {/* }}*/} + {/* />*/} + {/* */} + {/* */} + {/* */} + {/* */} + {/* */} + {/**/} + {/*{question.content.innerNameCheck && (*/} + {/* setInnerName(target.value || " ")}*/} + {/* />*/} + {/*)}*/} ); diff --git a/src/pages/Questions/DropDown/settingDropDown.tsx b/src/pages/Questions/DropDown/settingDropDown.tsx index 0bc10a2f..43958893 100644 --- a/src/pages/Questions/DropDown/settingDropDown.tsx +++ b/src/pages/Questions/DropDown/settingDropDown.tsx @@ -135,27 +135,27 @@ export default function SettingDropDown({ question }: SettingDropDownProps) { }); }} /> - - { - updateQuestion(question.id, question => { - question.content.innerNameCheck = target.checked; - question.content.innerName = target.checked ? question.content.innerName : ""; - }); - }} - /> - - - - - - + {/**/} + {/* {*/} + {/* updateQuestion(question.id, question => {*/} + {/* question.content.innerNameCheck = target.checked;*/} + {/* question.content.innerName = target.checked ? question.content.innerName : "";*/} + {/* });*/} + {/* }}*/} + {/* />*/} + {/* */} + {/* */} + {/* */} + {/* */} + {/* */} + {/**/} debounceAnswer(target.value)} /> - {question.content.innerNameCheck && ( - debounced(target.value || " ")} - /> - )} + {/*{question.content.innerNameCheck && (*/} + {/* debounced(target.value || " ")}*/} + {/* />*/} + {/*)}*/} diff --git a/src/pages/Questions/Emoji/settingEmoji.tsx b/src/pages/Questions/Emoji/settingEmoji.tsx index 563f9089..90417667 100644 --- a/src/pages/Questions/Emoji/settingEmoji.tsx +++ b/src/pages/Questions/Emoji/settingEmoji.tsx @@ -92,39 +92,39 @@ export default function SettingEmoji({ question }: SettingEmojiProps) { question.content.required = !target.checked; })} /> - - updateQuestion(question.id, question => { - question.content.innerNameCheck = target.checked; - question.content.innerName = target.checked ? question.content.innerName : ""; - })} - /> - - - - - - - {question.content.innerNameCheck && ( - setInnerName(target.value)} - /> - )} + {/**/} + {/* updateQuestion(question.id, question => {*/} + {/* question.content.innerNameCheck = target.checked;*/} + {/* question.content.innerName = target.checked ? question.content.innerName : "";*/} + {/* })}*/} + {/* />*/} + {/* */} + {/* */} + {/* */} + {/* */} + {/* */} + {/**/} + {/*{question.content.innerNameCheck && (*/} + {/* setInnerName(target.value)}*/} + {/* />*/} + {/*)}*/} ); diff --git a/src/pages/Questions/OptionsAndPicture/SettingOptionsAndPict.tsx b/src/pages/Questions/OptionsAndPicture/SettingOptionsAndPict.tsx index 76c4993d..4bb6effc 100644 --- a/src/pages/Questions/OptionsAndPicture/SettingOptionsAndPict.tsx +++ b/src/pages/Questions/OptionsAndPicture/SettingOptionsAndPict.tsx @@ -118,32 +118,32 @@ export default function SettingOptionsAndPict({ question }: SettingOptionsAndPic question.content.required = !target.checked; })} /> - - updateQuestion(question.id, question => { - question.content.innerNameCheck = target.checked; - question.content.innerName = ""; - })} - /> - - - - - - - {question.content.innerNameCheck && ( - setDescription(target.value)} - /> - )} + {/**/} + {/* updateQuestion(question.id, question => {*/} + {/* question.content.innerNameCheck = target.checked;*/} + {/* question.content.innerName = "";*/} + {/* })}*/} + {/* />*/} + {/* */} + {/* */} + {/* */} + {/* */} + {/* */} + {/**/} + {/*{question.content.innerNameCheck && (*/} + {/* setDescription(target.value)}*/} + {/* />*/} + {/*)}*/} {isWrappColumn && ( <> - - updateQuestion(question.id, question => { - if (question.type !== "images") return; + {/**/} + {/* updateQuestion(question.id, question => {*/} + {/* if (question.type !== "images") return;*/} - question.content.innerNameCheck = target.checked; - question.content.innerName = ""; - }) - } - /> - - - - - - - {question.content.innerNameCheck && ( - debounced(target.value)} - /> - )} + {/* question.content.innerNameCheck = target.checked;*/} + {/* question.content.innerName = "";*/} + {/* })*/} + {/* }*/} + {/* />*/} + {/* */} + {/* */} + {/* */} + {/* */} + {/* */} + {/**/} + {/*{question.content.innerNameCheck && (*/} + {/* debounced(target.value)}*/} + {/* />*/} + {/*)}*/} diff --git a/src/pages/Questions/OwnTextField/settingTextField.tsx b/src/pages/Questions/OwnTextField/settingTextField.tsx index 5611dd86..6beff5ec 100644 --- a/src/pages/Questions/OwnTextField/settingTextField.tsx +++ b/src/pages/Questions/OwnTextField/settingTextField.tsx @@ -176,47 +176,47 @@ export default function SettingTextField({ }); }} /> - - { - updateQuestion(question.id, question => { - question.content.innerNameCheck = target.checked; - question.content.innerName = target.checked - ? question.content.innerName - : ""; - }); - }} - /> - - - - - - - {question.content.innerNameCheck && ( - debounced(target.value)} - /> - )} + {/**/} + {/* {*/} + {/* updateQuestion(question.id, question => {*/} + {/* question.content.innerNameCheck = target.checked;*/} + {/* question.content.innerName = target.checked*/} + {/* ? question.content.innerName*/} + {/* : "";*/} + {/* });*/} + {/* }}*/} + {/* />*/} + {/* */} + {/* */} + {/* */} + {/* */} + {/* */} + {/**/} + {/*{question.content.innerNameCheck && (*/} + {/* debounced(target.value)}*/} + {/* />*/} + {/*)}*/} ); diff --git a/src/pages/Questions/PageOptions/SettingPageOptions.tsx b/src/pages/Questions/PageOptions/SettingPageOptions.tsx index 13fb7774..22582583 100644 --- a/src/pages/Questions/PageOptions/SettingPageOptions.tsx +++ b/src/pages/Questions/PageOptions/SettingPageOptions.tsx @@ -51,37 +51,37 @@ export default function SettingPageOptions({ > Настройки вопроса - - - updateQuestion(question.id, question => { - question.content.innerNameCheck = target.checked; - question.content.innerName = ""; - }) - } - /> - - - - - - - {question.content.innerNameCheck && ( - setInnerName(target.value)} - /> - )} + {/**/} + {/* */} + {/* updateQuestion(question.id, question => {*/} + {/* question.content.innerNameCheck = target.checked;*/} + {/* question.content.innerName = "";*/} + {/* })*/} + {/* }*/} + {/* />*/} + {/* */} + {/* */} + {/* */} + {/* */} + {/* */} + {/**/} + {/*{question.content.innerNameCheck && (*/} + {/* setInnerName(target.value)}*/} + {/* />*/} + {/*)}*/} ); } diff --git a/src/pages/Questions/QuestionsPage.tsx b/src/pages/Questions/QuestionsPage.tsx index e5ae8a7c..cf346a23 100755 --- a/src/pages/Questions/QuestionsPage.tsx +++ b/src/pages/Questions/QuestionsPage.tsx @@ -44,7 +44,7 @@ export default function QuestionsPage({ openBranchingPage, setOpenBranchingPage margin: "60px 0 40px 0", }} > - {quiz.name ? quiz.name : "Заголовок квиза"} + {quiz.name ? quiz.name : "Заголовок quiz"} + >Quiz нет + {value === "email" && } + ))} diff --git a/src/ui_kit/StartPagePreview/YoutubeEmbedIframe.tsx b/src/ui_kit/StartPagePreview/YoutubeEmbedIframe.tsx index 677690e5..d4dd3f47 100644 --- a/src/ui_kit/StartPagePreview/YoutubeEmbedIframe.tsx +++ b/src/ui_kit/StartPagePreview/YoutubeEmbedIframe.tsx @@ -13,7 +13,8 @@ export default function YoutubeEmbedIframe({ videoUrl, containerSX }: Props) { if (!videoId) return null; const embedUrl = `https://www.youtube.com/embed/${videoId}?controls=0&autoplay=1&modestbranding=0&showinfo=0&disablekb=1&mute=1&loop=1`; - + // https://www.youtube.com/shorts/9VgqBPd6RPA + // https://www.youtube.com/watch?v=I2N8hTHhvGY return ( Date: Sun, 31 Dec 2023 02:27:57 +0300 Subject: [PATCH 12/13] =?UTF-8?q?=D0=BF=D1=80=D0=B8=20=D1=82=D0=B8=D0=BF?= =?UTF-8?q?=D0=B5=20=D1=80=D0=B5=D0=B7=D1=83=D0=BB=D1=8C=D1=82=D0=B0=D1=82?= =?UTF-8?q?=D0=B0=20=D0=BF=D0=BE=D1=87=D1=82=D0=B0=20-=20=D1=81=D1=82?= =?UTF-8?q?=D1=80=20=D1=80=D0=B5=D0=B7=D1=83=D0=BB=D1=82=D0=B0=20=D0=B2?= =?UTF-8?q?=D1=81=D1=91=20=D1=80=D0=B0=D0=B2=D0=BD=D0=BE=20=D0=B2=D1=8B?= =?UTF-8?q?=D0=B2=D0=BE=D0=B4=D0=B8=D1=82=D1=81=D1=8F=20=D0=BF=D0=BE=D1=81?= =?UTF-8?q?=D0=BB=D0=B5=20=D0=A4=D0=9A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/ViewPublicationPage/ContactForm.tsx | 2 +- src/pages/ViewPublicationPage/Footer.tsx | 2 +- src/pages/ViewPublicationPage/Question.tsx | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/pages/ViewPublicationPage/ContactForm.tsx b/src/pages/ViewPublicationPage/ContactForm.tsx index ad83f238..abd4cc77 100644 --- a/src/pages/ViewPublicationPage/ContactForm.tsx +++ b/src/pages/ViewPublicationPage/ContactForm.tsx @@ -137,7 +137,7 @@ export const ContactForm = ({ + + + Заголовок страницы мессенджеров + + Текст на кнопке + + + + + setSelectMessenger("contact")} + > + Запрашивать контакт + + setSelectMessenger("bot")} + > + Чат-бот + + + {selectMessenger === "contact" ? ( <> - - Настройки мессенджеров - + + + + + - - Заголовок страницы мессенджеров - - Текст на кнопке - - - - - setSelectMessenger("contact")}> - Запрашивать контакт - - setSelectMessenger("bot")}> - Чат-бот - + + + + - {selectMessenger === 'contact' ? - <> - - - - - - - - - - - - - - - - - - - : - <> - } - + + + + - ) -} \ No newline at end of file + ) : ( + <> + )} + + + ); +} diff --git a/src/pages/ContactFormPage/NewField/NewFieldParent.tsx b/src/pages/ContactFormPage/NewField/NewFieldParent.tsx index 178bf7b4..d3a44318 100644 --- a/src/pages/ContactFormPage/NewField/NewFieldParent.tsx +++ b/src/pages/ContactFormPage/NewField/NewFieldParent.tsx @@ -1,5 +1,11 @@ import Box from "@mui/material/Box"; -import { FormControl, SxProps, TextField, Theme, Typography } from "@mui/material"; +import { + FormControl, + SxProps, + TextField, + Theme, + Typography, +} from "@mui/material"; import CustomTextField from "@ui_kit/CustomTextField"; import CustomCheckbox from "@ui_kit/CustomCheckbox"; import Button from "@mui/material/Button"; @@ -9,93 +15,112 @@ import { updateQuiz } from "@root/quizes/actions"; import { FormContactFieldName } from "@model/quizSettings"; interface Props { - outerContainerSx?: SxProps; - children?: React.ReactNode; - defaultValue: FormContactFieldName; - placeholderHelp: string; - placeholderField: string; - closeDrawer: () => void; + outerContainerSx?: SxProps; + children?: React.ReactNode; + defaultValue: FormContactFieldName; + placeholderHelp: string; + placeholderField: string; + closeDrawer: () => void; } -export default function NewFieldParent({ closeDrawer, defaultValue, placeholderHelp, placeholderField, outerContainerSx: sx, children }: Props) { - const quiz = useCurrentQuiz(); +export default function NewFieldParent({ + closeDrawer, + defaultValue, + placeholderHelp, + placeholderField, + outerContainerSx: sx, + children, +}: Props) { + const quiz = useCurrentQuiz(); - if (!quiz) return null; + if (!quiz) return null; - return ( - - - Подсказка - { - updateQuiz(quiz.id, (quiz) => { - quiz.config.formContact.fields[defaultValue].text = target.value; - }); - }} - value={quiz.config.formContact.fields[defaultValue].text} - - placeholder={placeholderHelp} text={''} /> - - - Подсказка внутри поля - { - updateQuiz(quiz.id, (quiz) => { - quiz.config.formContact.fields[defaultValue].innerText = target.value; - }); - }} - value={quiz.config.formContact.fields[defaultValue].innerText} - - placeholder={placeholderField} text={''} /> - - - - Ключ - { - updateQuiz(quiz.id, (quiz) => { - quiz.config.formContact.fields[defaultValue].key = target.value; - }); - }} - placeholder="text" - sx={{ - "& .css-1d3z3hw-MuiOutlinedInput-notchedOutline": { - border: 'none' - }, - "& .MuiInputBase-root": { - height: "48px", - borderRadius: "10px", - backgroundColor: '#EEE4FC', - }, - }} - /> - { - updateQuiz(quiz.id, (quiz) => { - quiz.config.formContact.fields[defaultValue].required = target.checked; - }); - }} - - label={"Обязательно к заполнению"} /> - - {/* + return ( + + + Подсказка + { + updateQuiz(quiz.id, (quiz) => { + quiz.config.formContact.fields[defaultValue].text = target.value; + }); + }} + value={quiz.config.formContact.fields[defaultValue].text} + placeholder={placeholderHelp} + text={""} + /> + + + Подсказка внутри поля + { + updateQuiz(quiz.id, (quiz) => { + quiz.config.formContact.fields[defaultValue].innerText = + target.value; + }); + }} + value={quiz.config.formContact.fields[defaultValue].innerText} + placeholder={placeholderField} + text={""} + /> + + + Ключ + { + updateQuiz(quiz.id, (quiz) => { + quiz.config.formContact.fields[defaultValue].key = target.value; + }); + }} + placeholder="text" + sx={{ + "& .css-1d3z3hw-MuiOutlinedInput-notchedOutline": { + border: "none", + }, + "& .MuiInputBase-root": { + height: "48px", + borderRadius: "10px", + backgroundColor: "#EEE4FC", + }, + }} + /> + { + updateQuiz(quiz.id, (quiz) => { + quiz.config.formContact.fields[defaultValue].required = + target.checked; + }); + }} + label={"Обязательно к заполнению"} + /> + + {/* Запрашивать на */} - {children} - - - ); + {children} + + + ); } diff --git a/src/pages/ContactFormPage/NewField/SwitchNewField.tsx b/src/pages/ContactFormPage/NewField/SwitchNewField.tsx index 30c62c32..0188a360 100644 --- a/src/pages/ContactFormPage/NewField/SwitchNewField.tsx +++ b/src/pages/ContactFormPage/NewField/SwitchNewField.tsx @@ -1,33 +1,51 @@ -import * as React from 'react'; +import * as React from "react"; import NewFieldParent from "./NewFieldParent"; import { FormControlLabel } from "@mui/material"; import SelectMask from "../SelectMask"; import CustomizedSwitch from "@ui_kit/CustomSwitch"; - - interface Props { - switchState: string, - closeDrawer: () => void; + switchState: string; + closeDrawer: () => void; } +export default function SwitchNewField({ + switchState = "name", + closeDrawer, +}: Props) { + const [SwitchMask, setSwitchMask] = React.useState(false); + const SwitchMaskHC = (bool: boolean) => { + setSwitchMask(bool); + }; -export default function SwitchNewField({ switchState = 'name', closeDrawer }: Props) { - const [SwitchMask, setSwitchMask] = React.useState(false); - const SwitchMaskHC = (bool: boolean) => { - setSwitchMask(bool); - }; - - switch (switchState) { - case 'name': - return (); - case 'email': - return (); - case 'phone': - - return ( - - {/* + ); + case "email": + return ( + + ); + case "phone": + return ( + + {/* } label="Маска для телефона" @@ -42,18 +60,28 @@ export default function SwitchNewField({ switchState = 'name', closeDrawer }: Pr /> */} - {SwitchMask ? - - : - <> - } - - ); - case 'text': - return (); - case 'address': - return (); - default: - return (<>); - } + {SwitchMask ? : <>} + + ); + case "text": + return ( + + ); + case "address": + return ( + + ); + default: + return <>; + } } diff --git a/src/pages/ContactFormPage/NewField/WindowNewField.tsx b/src/pages/ContactFormPage/NewField/WindowNewField.tsx index 24fd64d7..7ccdcdf6 100644 --- a/src/pages/ContactFormPage/NewField/WindowNewField.tsx +++ b/src/pages/ContactFormPage/NewField/WindowNewField.tsx @@ -3,85 +3,155 @@ import EmailIcon from "@icons/ContactFormIcon/EmailIcon"; import NameIcon from "@icons/ContactFormIcon/NameIcon"; import PhoneIcon from "@icons/ContactFormIcon/PhoneIcon"; import TextIcon from "@icons/ContactFormIcon/TextIcon"; -import { FieldSettingsDrawerState, FormContactFieldName } from "@model/quizSettings"; -import CloseIcon from '@mui/icons-material/Close'; +import { + FieldSettingsDrawerState, + FormContactFieldName, +} from "@model/quizSettings"; +import CloseIcon from "@mui/icons-material/Close"; import { Typography, useTheme } from "@mui/material"; -import Box from '@mui/material/Box'; -import Button from '@mui/material/Button'; -import { useCurrentQuiz } from '@root/quizes/hooks'; +import Box from "@mui/material/Box"; +import Button from "@mui/material/Button"; +import { useCurrentQuiz } from "@root/quizes/hooks"; import MiniButtonSetting from "@ui_kit/MiniButtonSetting"; -import { useEffect, useState } from 'react'; +import { useEffect, useState } from "react"; import SwitchNewField from "./SwitchNewField"; - interface Props { - drawerState: FieldSettingsDrawerState; - closeDrawer: () => void; + drawerState: FieldSettingsDrawerState; + closeDrawer: () => void; } export default function WindowNewField({ drawerState, closeDrawer }: Props) { - const quiz = useCurrentQuiz(); - const theme = useTheme(); - const [switchState, setSwitchState] = useState(""); + const quiz = useCurrentQuiz(); + const theme = useTheme(); + const [switchState, setSwitchState] = useState(""); - useEffect(() => { - if (!quiz) return; + useEffect(() => { + if (!quiz) return; - if (drawerState.isEdit) { - return setSwitchState(drawerState.field); - } + if (drawerState.isEdit) { + return setSwitchState(drawerState.field); + } - for (let val in quiz.config.formContact.fields) { - if (!quiz.config.formContact.fields[val as FormContactFieldName].used) { - setSwitchState(val); - return; - } - } - }, []); + for (let val in quiz.config.formContact.fields) { + if (!quiz.config.formContact.fields[val as FormContactFieldName].used) { + setSwitchState(val); + return; + } + } + }, []); - if (!quiz) return null; + if (!quiz) return null; - const SSHC = (data: string) => { - setSwitchState(data); - }; + const SSHC = (data: string) => { + setSwitchState(data); + }; - const buttonSetting: { icon: JSX.Element; title: string; value: FormContactFieldName; }[] = [ - { icon: , title: 'Имя', value: 'name' }, - { icon: , title: 'Email', value: 'email' }, - { icon: , title: 'Телефон', value: 'phone' }, - { icon: , title: 'Текст', value: 'text' }, - { icon: , title: 'Адрес', value: 'address' }, - ]; + const buttonSetting: { + icon: JSX.Element; + title: string; + value: FormContactFieldName; + }[] = [ + { + icon: ( + + ), + title: "Имя", + value: "name", + }, + { + icon: ( + + ), + title: "Email", + value: "email", + }, + { + icon: ( + + ), + title: "Телефон", + value: "phone", + }, + { + icon: ( + + ), + title: "Текст", + value: "text", + }, + { + icon: ( + + ), + title: "Адрес", + value: "address", + }, + ]; - return ( - <> - - Новое поле - - - - {buttonSetting.flatMap((e, i) => ( - drawerState.field === e.value || drawerState.field === "all" - ? { SSHC(e.value); }} - sx={{ - backgroundColor: switchState === e.value ? theme.palette.brightPurple.main : 'transparent', - color: switchState === e.value && drawerState.field === "all" ? '#ffffff' : theme.palette.grey3.main, - }} - > - {e.icon} - {e.title} - - : [] - ))} - - - - ); + return ( + <> + + Новое поле + + + + {buttonSetting.flatMap((e, i) => + drawerState.field === e.value || drawerState.field === "all" ? ( + { + SSHC(e.value); + }} + sx={{ + backgroundColor: + switchState === e.value + ? theme.palette.brightPurple.main + : "transparent", + color: + switchState === e.value && drawerState.field === "all" + ? "#ffffff" + : theme.palette.grey3.main, + }} + > + {e.icon} + {e.title} + + ) : ( + [] + ), + )} + + + + ); } diff --git a/src/pages/ContactFormPage/SelectMask.tsx b/src/pages/ContactFormPage/SelectMask.tsx index 5a76893a..0c61652a 100644 --- a/src/pages/ContactFormPage/SelectMask.tsx +++ b/src/pages/ContactFormPage/SelectMask.tsx @@ -1,84 +1,111 @@ -import {Box, Link, Typography, useTheme} from "@mui/material"; +import { Box, Link, Typography, useTheme } from "@mui/material"; import SelectableButton from "@ui_kit/SelectableButton"; import CustomTextField from "@ui_kit/CustomTextField"; import * as React from "react"; -import {useState} from "react"; +import { useState } from "react"; -type SelectMask = 'country'| 'mymask'; -export default function SelectMask () { +type SelectMask = "country" | "mymask"; +export default function SelectMask() { + const [State, setState] = React.useState(false); + const StateHC = (bool: boolean) => { + setState(bool); + }; - const [State, setState] = React.useState(false); - const StateHC = (bool:boolean) => { - setState(bool) - } - - const theme = useTheme() - const [selectMask, setSelectMask] = useState("country"); - return( + const theme = useTheme(); + const [selectMask, setSelectMask] = useState("country"); + return ( + <> + + setSelectMask("country")} + > + Выбор страны + + setSelectMask("mymask")} + > + Своя маска + + + {selectMask === "country" ? ( <> - - setSelectMask("country")}> - Выбор страны - - setSelectMask("mymask")}> - Своя маска - + + Посетителю нужно будет выбрать страну и ввести номер телефона. + Страна определяется автоматически в зависимости от настроек браузера + + { + StateHC(!State); + }} + > + Расширенные настройки + + {State ? ( + + + Страна по умолчанию + + + Если ничего не выбрано, страна будет выбрана автоматически + + + + Выделенные страны + + + Выбранные страны будут показываться вверху списка + + + + Показываемые страны + + + Будут показываться только выбранные страны + + + + Игнорируемые страны + + + Выбранные страны будут не будут показываться в списке + + - {selectMask === 'country' ? - <> - - Посетителю нужно будет выбрать страну - и ввести номер телефона. Страна определяется автоматически в зависимости от настроек браузера - - { - StateHC(!State) - }} - > - Расширенные настройки - - {State ? - - - Страна по умолчанию - - Если ничего не выбрано, страна - будет выбрана автоматически - - - Выделенные страны - - Выбранные страны будут - показываться вверху списка - - - Показываемые страны - - Будут показываться только - выбранные страны - - - Игнорируемые страны - - Выбранные страны будут не будут - показываться в списке - - - : - <> - } - - : - <> - - - } + ) : ( + <> + )} - ) + ) : ( + <> + + + )} + + ); } diff --git a/src/pages/ContactFormPage/Supplement.tsx b/src/pages/ContactFormPage/Supplement.tsx index 693da49f..cb0ff5c3 100644 --- a/src/pages/ContactFormPage/Supplement.tsx +++ b/src/pages/ContactFormPage/Supplement.tsx @@ -1 +1 @@ -export {} \ No newline at end of file +export {}; diff --git a/src/pages/ContactFormPage/settingForm.tsx b/src/pages/ContactFormPage/settingForm.tsx index c3812170..69eaef39 100644 --- a/src/pages/ContactFormPage/settingForm.tsx +++ b/src/pages/ContactFormPage/settingForm.tsx @@ -1,17 +1,17 @@ -import {Box, Typography} from "@mui/material"; +import { Box, Typography } from "@mui/material"; import CustomCheckbox from "@ui_kit/CustomCheckbox"; export default function SettingForm() { - return ( - - - Тип формы - - - - Настройки вопросов - - - - ); -}; \ No newline at end of file + return ( + + + Тип формы + + + + Настройки вопросов + + + + ); +} diff --git a/src/pages/ContactFormPage/switchContactForm.tsx b/src/pages/ContactFormPage/switchContactForm.tsx index ac7074bf..d8e3672d 100644 --- a/src/pages/ContactFormPage/switchContactForm.tsx +++ b/src/pages/ContactFormPage/switchContactForm.tsx @@ -1,26 +1,23 @@ -import * as React from 'react'; +import * as React from "react"; import SettingForm from "./settingForm"; import BranchingForm from "./BranchingForm"; - - interface Props { - switchState: string, + switchState: string; } -export default function SwitchContactForm({switchState = 'setting' }: Props) { - - switch (switchState) { - case 'setting': - return (); - break; - case 'branching': - return (); - break; - case 'supplement': - return (<>); - break; - default: - return (<>) - } -} \ No newline at end of file +export default function SwitchContactForm({ switchState = "setting" }: Props) { + switch (switchState) { + case "setting": + return ; + break; + case "branching": + return ; + break; + case "supplement": + return <>; + break; + default: + return <>; + } +} diff --git a/src/pages/DesignPage/ColorRingIcon.tsx b/src/pages/DesignPage/ColorRingIcon.tsx index 2aa926f4..aa4e944a 100644 --- a/src/pages/DesignPage/ColorRingIcon.tsx +++ b/src/pages/DesignPage/ColorRingIcon.tsx @@ -1,23 +1,36 @@ -import {Box} from "@mui/material"; +import { Box } from "@mui/material"; -interface Color{ - color?: string +interface Color { + color?: string; +} +export default function ColorRingIcon({ color = "#333647" }: Color) { + return ( + + + + + + ); } -export default function ColorRingIcon({color = "#333647"}: Color) { - - return ( - - - - - - ) -} \ No newline at end of file diff --git a/src/pages/DesignPage/DesignFilling.tsx b/src/pages/DesignPage/DesignFilling.tsx index 8191325d..4f1b300c 100644 --- a/src/pages/DesignPage/DesignFilling.tsx +++ b/src/pages/DesignPage/DesignFilling.tsx @@ -1,119 +1,155 @@ -import {Box, ButtonBase, IconButton, Paper, Typography, useMediaQuery, useTheme} from "@mui/material"; +import { + Box, + ButtonBase, + IconButton, + Paper, + Typography, + useMediaQuery, + useTheme, +} from "@mui/material"; import ColorRingIcon from "./ColorRingIcon"; -import {updateQuiz} from "@root/quizes/actions"; -import {useCurrentQuiz} from "@root/quizes/hooks"; -import {toggleQuizPreview} from "@root/quizPreview"; +import { updateQuiz } from "@root/quizes/actions"; +import { useCurrentQuiz } from "@root/quizes/hooks"; +import { toggleQuizPreview } from "@root/quizPreview"; import VisibilityIcon from "@mui/icons-material/Visibility"; import React from "react"; export const DesignFilling = () => { - const quiz = useCurrentQuiz(); - const theme = useTheme(); - const isMobile = useMediaQuery(theme.breakpoints.down(830)); - const ButtonsThemeLight = [ - ["Стандартный", "StandardTheme", "#7E2AEA", "#FFFFFF"], - ["Черно-белый", "BlackWhiteTheme", "#4E4D51", "#FFFFFF"], - ["Оливковый", "OliveTheme", "#758E4F", "#F9FBF1"], - ["Фиолетовый", "PurpleTheme", "#7E2AEA", "#FBF8FF"], - ["Желтый", "YellowTheme", "#F2B133", "#FFFCF6"], - ["Голубой", "BlueTheme", "#4964ED", "#F5F7FF"], - ["Розовый", "PinkTheme", "#D34085", "#FFF9FC"] - ] - const ButtonsThemeDark = [ - ["Стандартный", "StandardDarkTheme", "#7E2AEA", "#FFFFFF"], - ["Золотой", "GoldDarkTheme", "#E6AA37", "#FFFFFF"], - ["Розовый", "PinkDarkTheme", "#D34085", "#FFFFFF"], - ["Бирюзовый", "BlueDarkTheme", "#07A0C3", "#FFFFFF"], - ] - return ( - - Дизайн - Выберите цветовую схему для вашего опроса - + + Дизайн + + + Выберите цветовую схему для вашего опроса + + + + Со светлым фоном + + {ButtonsThemeLight.map((e, i) => ( + - - Со светлым фоном - - {ButtonsThemeLight.map((e, i) => ( - updateQuiz(quiz.id, (quiz) => { - quiz.config.theme = e[1]})} - > - {e[0]} - - - - - - - ))} - - - - С тёмным фоном - {ButtonsThemeDark.map((e, i) => ( - updateQuiz(quiz.id, (quiz) => { - quiz.config.theme = e[1]})} - > - {e[0]} - - - - - - - ))} - - - - - - - - + justifyContent: "space-between", + border: + quiz.config.theme == e[1] ? "1px solid #7E2AEA" : "none", + }} + key={i} + value={e[1]} + onClick={() => + updateQuiz(quiz.id, (quiz) => { + quiz.config.theme = e[1]; + }) + } + > + {e[0]} + + + + + + + ))} - ); -} \ No newline at end of file + + С тёмным фоном + {ButtonsThemeDark.map((e, i) => ( + + updateQuiz(quiz.id, (quiz) => { + quiz.config.theme = e[1]; + }) + } + > + {e[0]} + + + + + + + ))} + + + + + + + + + ); +}; diff --git a/src/pages/DesignPage/DesignPage.tsx b/src/pages/DesignPage/DesignPage.tsx index e983eade..d47f039d 100644 --- a/src/pages/DesignPage/DesignPage.tsx +++ b/src/pages/DesignPage/DesignPage.tsx @@ -1,5 +1,5 @@ import { quizApi } from "@api/quiz"; -import {Box, IconButton, useMediaQuery, useTheme} from "@mui/material"; +import { Box, IconButton, useMediaQuery, useTheme } from "@mui/material"; import { resetEditConfig, setQuizes, @@ -37,10 +37,10 @@ import { ModalInfoWhyCantCreate } from "../startPage/ModalInfoWhyCantCreate"; import { ConfirmLeaveModal } from "../startPage/ConfirmLeaveModal"; import { checkQuestionHint } from "@utils/checkQuestionHint"; import { Header } from "../startPage/Header"; -import {DesignFilling} from "./DesignFilling"; -import {toggleQuizPreview} from "@root/quizPreview"; +import { DesignFilling } from "./DesignFilling"; +import { toggleQuizPreview } from "@root/quizPreview"; import VisibilityIcon from "@mui/icons-material/Visibility"; -import {createPortal} from "react-dom"; +import { createPortal } from "react-dom"; import QuizPreview from "@ui_kit/QuizPreview/QuizPreview"; export const DesignPage = () => { @@ -52,10 +52,10 @@ export const DesignPage = () => { const getData = async () => { const quizes = await quizApi.getList(); setQuizes(quizes); - if (editQuizId) { - const questions = await questionApi.getList({ quiz_id: editQuizId }); - setQuestions(questions); - } + if (editQuizId) { + const questions = await questionApi.getList({ quiz_id: editQuizId }); + setQuestions(questions); + } }; getData(); }, []); @@ -74,12 +74,11 @@ export const DesignPage = () => { updateModalInfoWhyCantCreate(false); updateSomeWorkBackend(false); }, - [] + [], ); - + useEffect(() => { if (editQuizId === null) navigate("/list"); - }, [navigate, editQuizId]); const followNewPage = () => { @@ -87,7 +86,6 @@ export const DesignPage = () => { setCurrentStep(nextStep); }; - const changePage = (index: number) => { if (currentStep === 2) { setNextStep(index); @@ -99,7 +97,7 @@ export const DesignPage = () => { setCurrentStep(index); }; - console.log(quiz) + console.log(quiz); if (!quiz) return <>; return ( <> @@ -110,8 +108,8 @@ export const DesignPage = () => { ) : ( )} - - {createPortal(, document.body)} + + {createPortal(, document.body)} ) => { - setChecked([event.target.checked, checked[1]]); - }; + const handleChange1 = (event: React.ChangeEvent) => { + setChecked([event.target.checked, checked[1]]); + }; - const handleChange2 = (event: React.ChangeEvent) => { - setChecked([checked[0], event.target.checked, ]); - }; + const handleChange2 = (event: React.ChangeEvent) => { + setChecked([checked[0], event.target.checked]); + }; - return ( - - {/*левая часть*/} - - {/*бокс с кнопкой*/} - - - - - - Quiz будет открываться через указанное время - - - - - Если quiz уже установлен на - сайт, и вы что-то здесь изменили, - код на сайте нужно будет поменять. Настройки в этом конструкторе не сохраняются. - + return ( + + {/*левая часть*/} + + {/*бокс с кнопкой*/} + + + {" "} + + + + + + Quiz будет открываться через указанное время + - {/*правая часть*/} - - - - - - - - - - {checked[0] ? - - - Показывать через - - - - секунд - - - - - - - - : - <> - } - - {checked[1] ? - - - - - : - <> - } + + + + Если quiz уже установлен на сайт, и вы что-то здесь изменили, код на + сайте нужно будет поменять. Настройки в этом конструкторе не + сохраняются. + + + {/*правая часть*/} + + + + + + + + + + {checked[0] ? ( + + + + Показывать через + + + + + + секунд + - - ) + + + + + + ) : ( + <> + )} + + {checked[1] ? ( + + + + + ) : ( + <> + )} + + + ); } diff --git a/src/pages/InstallQuiz/BannerInstall.tsx b/src/pages/InstallQuiz/BannerInstall.tsx index c5887c0a..f12a135a 100644 --- a/src/pages/InstallQuiz/BannerInstall.tsx +++ b/src/pages/InstallQuiz/BannerInstall.tsx @@ -1,199 +1,271 @@ import { - Box, - FormControl, - FormControlLabel, - Link, - Radio, - RadioGroup, - TextField, - Typography, - useTheme + Box, + FormControl, + FormControlLabel, + Link, + Radio, + RadioGroup, + TextField, + Typography, + useTheme, } from "@mui/material"; import InstallQzOnSiteParent from "./InstallQzOnSiteParent"; -import React, {useState} from "react"; -import BannerImg from "../../assets/BannerImg.png" +import React, { useState } from "react"; +import BannerImg from "../../assets/BannerImg.png"; import CustomTextField from "@ui_kit/CustomTextField"; import CustomCheckbox from "@ui_kit/CustomCheckbox"; import RadioCheck from "@ui_kit/RadioCheck"; import RadioIcon from "@ui_kit/RadioIcon"; import AccordMy from "@ui_kit/Accordion"; +type isExpanded = "panel1" | "panel2"; +export default function BannerInstall() { + const theme = useTheme(); -type isExpanded = "panel1" | "panel2" -export default function BannerInstall () { - const theme = useTheme(); + const [value, setValue] = React.useState("1"); - const [value, setValue] = React.useState("1"); + const handleChangeRadio = (event: React.ChangeEvent) => { + setValue((event.target as HTMLInputElement).value); + }; - const handleChangeRadio = (event: React.ChangeEvent) => { - setValue((event.target as HTMLInputElement).value); - }; + const [value2, setValue2] = React.useState("1"); - const [value2, setValue2] = React.useState("1"); + const handleChangeRadio2 = (event: React.ChangeEvent) => { + setValue2((event.target as HTMLInputElement).value); + }; - const handleChangeRadio2 = (event: React.ChangeEvent) => { - setValue2((event.target as HTMLInputElement).value); - }; + const [isExpanded, setIsExpanded] = useState("panel1"); - const [isExpanded, setIsExpanded] = useState("panel1"); - - return ( - - {/*левая часть*/} - - - - - Если quiz уже установлен на сайт, и вы что-то здесь изменили, код на сайте нужно будет поменять. - Настройки в этом конструкторе не сохраняются. - + return ( + + {/*левая часть*/} + + + + Если quiz уже установлен на сайт, и вы что-то здесь изменили, код на + сайте нужно будет поменять. Настройки в этом конструкторе не + сохраняются. + + + {/*правая часть*/} + + + + Текст-призыв + + + + Заголовок quiz + + + + + Показывать через + + + + + + секунд + + + + + Цвет кнопки + + + {" "} - {/*правая часть*/} - - - Текст-призыв - - Заголовок quiz - - - Показывать через - - - - секунд - - - Цвет кнопки - - Цвет текста кнопки - - - - - setIsExpanded("panel1")} sx={{display: "flex", flexDirection: 'column',}}> - Расположение - - - - - } icon={}/>} - label="Слева сверху" - /> - } icon={}/>} - label="Справа сверху" - /> - - - } icon={}/>} - label="Слева снизу" - /> - } icon={}/>} - label="Справа снизу" - /> - - - - - - Параметры - - - - - - - setIsExpanded("panel2")} sx={{display: "flex", flexDirection: 'column',}}> - Расположение - - - - } icon={}/>} - label="Сверху страницы" - /> - } icon={}/>} - label="Снизу страницы" - /> - - - - Параметры - - - - - - + Автооткрытие quiz + + Цвет текста кнопки + + + {" "} - - ) -} \ No newline at end of file + + + + setIsExpanded("panel1")} + sx={{ display: "flex", flexDirection: "column" }} + > + + Расположение + + + + + } icon={} /> + } + label="Слева сверху" + /> + } icon={} /> + } + label="Справа сверху" + /> + + + } icon={} /> + } + label="Слева снизу" + /> + } icon={} /> + } + label="Справа снизу" + /> + + + + + Параметры + + + + + + + + setIsExpanded("panel2")} + sx={{ display: "flex", flexDirection: "column" }} + > + + Расположение + + + + + } icon={} /> + } + label="Сверху страницы" + /> + } icon={} /> + } + label="Снизу страницы" + /> + + + + + Параметры + + + + + + + + + Автооткрытие quiz + + + + ); +} diff --git a/src/pages/InstallQuiz/ButtonSocial.tsx b/src/pages/InstallQuiz/ButtonSocial.tsx index 33f4ad58..540bbcb3 100644 --- a/src/pages/InstallQuiz/ButtonSocial.tsx +++ b/src/pages/InstallQuiz/ButtonSocial.tsx @@ -1,13 +1,15 @@ import { - Box, - Button, FormControl, - IconButton, - InputAdornment, Link, - Modal, - OutlinedInput, - TextField, - Typography, - useTheme + Box, + Button, + FormControl, + IconButton, + InputAdornment, + Link, + Modal, + OutlinedInput, + TextField, + Typography, + useTheme, } from "@mui/material"; import BrowserIcon from "../../assets/icons/BrowserIcon"; import TiktokIcon from "../../assets/icons/tiktokIcon"; @@ -18,286 +20,345 @@ import CustomTextField from "@ui_kit/CustomTextField"; import UploadBox from "@ui_kit/UploadBox"; import UploadIcon from "../../assets/icons/UploadIcon"; import CopyIcon from "../../assets/icons/CopyIcon"; -import Qr from "../../assets/Qr.png" +import Qr from "../../assets/Qr.png"; +export default function ButtonSocial() { + const theme = useTheme(); -export default function ButtonSocial () { - const theme = useTheme(); + const [openGraph, setOpenGraph] = React.useState(false); + const handleOpenGraph = () => setOpenGraph(true); + const handleCloseGraph = () => setOpenGraph(false); - const [openGraph, setOpenGraph] = React.useState(false); - const handleOpenGraph = () => setOpenGraph(true); - const handleCloseGraph = () => setOpenGraph(false); + const [openTiktok, setOpenTiktok] = React.useState(false); + const handleOpenTiktok = () => setOpenTiktok(true); + const handleCloseTiktok = () => setOpenTiktok(false); - const [openTiktok, setOpenTiktok] = React.useState(false); - const handleOpenTiktok = () => setOpenTiktok(true); - const handleCloseTiktok = () => setOpenTiktok(false); + const [openQr, setOpenQr] = React.useState(false); + const handleOpenQr = () => setOpenQr(true); + const handleCloseQr = () => setOpenQr(false); - const [openQr, setOpenQr] = React.useState(false); - const handleOpenQr = () => setOpenQr(true); - const handleCloseQr = () => setOpenQr(false); + return ( + <> + + + + + + + + + + + + + + + {/*модалка Graph*/} + + - - - - - + boxShadow: 24, + p: 0, + }} + > + + + Open Graph + + + + + + Заголовок + + - {/*модалка Graph*/} - - - - Open Graph - - - - - Заголовок - - - - - - - Описание - - - - - - Изображение - - } text="5 MB максимум" /> - - - - - - - - - - {/*модалка тиктока*/} - + Описание + + + + - + Изображение + + } + text="5 MB максимум" + /> + + + + + + + + - boxShadow: 24, - p: 0,}}> - - Добавить quiz в Tiktok - - - - 1. Скопируйте ссылку на quiz + {/*модалка тиктока*/} + + - - - - - - } - label="Password" - /> - - - - - 2. Зайдите в аккаунт Tiktok - - Кликните по кнопке “Изменить профиль”. В поле Веб-сайт вставьте скопированную ссылку на quiz. - Готово! Quiz вставлен в аккаунт Tiktok. - - - Если всё ещё не понятно, более подробная инструкция тут - - - - - - - - - - - - {/*модалка QR*/} - + + + Добавить quiz в Tiktok + + + + - 1. Скопируйте ссылку на quiz - boxShadow: 24, - p: 0,}}> - - QR-код для перехода в quiz - - - - - Можно показывать в презентации на вебинарах или распечатать для офлайн мероприятий - - - + + + + + + + } + label="Password" + /> + + - - - - - - - + + 2. Зайдите в аккаунт Tiktok + + Кликните по кнопке “Изменить профиль”. В поле Веб-сайт вставьте + скопированную ссылку на quiz. Готово! Quiz вставлен в аккаунт + Tiktok. + + + Если всё ещё не понятно, более подробная инструкция тут + + - - ) -} \ No newline at end of file + + + + + + + + + {/*модалка QR*/} + + + + + QR-код для перехода в quiz + + + + + + Можно показывать в презентации на вебинарах или распечатать для + офлайн мероприятий + + + + + + + + + + + + + ); +} diff --git a/src/pages/InstallQuiz/InBodyInstall.tsx b/src/pages/InstallQuiz/InBodyInstall.tsx index 58811836..d62505ac 100644 --- a/src/pages/InstallQuiz/InBodyInstall.tsx +++ b/src/pages/InstallQuiz/InBodyInstall.tsx @@ -1,125 +1,174 @@ -import {Box, Button, Link, Typography, useTheme} from "@mui/material"; +import { Box, Button, Link, Typography, useTheme } from "@mui/material"; import InstallQzOnSiteParent from "./InstallQzOnSiteParent"; import Dots from "../../assets/dots.png"; import React from "react"; import CustomTextField from "@ui_kit/CustomTextField"; import CustomCheckbox from "@ui_kit/CustomCheckbox"; - -export default function InBodyInstall () { - const theme = useTheme(); - return ( - - {/*левая часть*/} - - {/*бокс с кнопкой*/} - - - - - - - Quiz будет открыть прямо в том месте, где вы установите код на сайте - - - - В мобильной версии будет показана кнопка, открывающая quiz в модальном окне - - - Если quiz уже установлен на сайт, и вы что-то здесь изменили, - код на сайте нужно будет поменять. Настройки в этом конструкторе не сохраняются. - +export default function InBodyInstall() { + const theme = useTheme(); + return ( + + {/*левая часть*/} + + {/*бокс с кнопкой*/} + + + {" "} + + + + + + Quiz будет открыть прямо в том месте, где вы установите код на + сайте + - {/*правая часть*/} - - 1. Задайте размеры (опционально) - - - Ширина (px) - - Радиус (px) - - - - Высота (px) - - Отступ (px) - - - - - - 2. Настройте кнопку для мобильной версии - - - Цвет кнопки - - Цвет текста кнопки - - - - - - - - - Текст кнопки - - - + Автооткрытие quiz - - - + + В мобильной версии будет показана кнопка, открывающая quiz в + модальном окне + + + + + Если quiz уже установлен на сайт, и вы что-то здесь изменили, код на + сайте нужно будет поменять. Настройки в этом конструкторе не + сохраняются. + + - ) -} \ No newline at end of file + {/*правая часть*/} + + 1. Задайте размеры (опционально) + + + + Ширина (px) + + + + Радиус (px) + + + + + + Высота (px) + + + + Отступ (px) + + + + + + 2. Настройте кнопку для мобильной версии + + + Цвет кнопки + + + {" "} + + + Цвет текста кнопки + + + {" "} + + + + + + + + + Текст кнопки + + + + + Автооткрытие quiz + + + + + ); +} diff --git a/src/pages/InstallQuiz/InstallQuiz.tsx b/src/pages/InstallQuiz/InstallQuiz.tsx index fc19a850..34614c5d 100644 --- a/src/pages/InstallQuiz/InstallQuiz.tsx +++ b/src/pages/InstallQuiz/InstallQuiz.tsx @@ -47,7 +47,7 @@ import { useCurrentQuiz } from "@root/quizes/hooks"; type BackgroundType = "text" | "video"; export default function InstallQuiz() { - const quiz = useCurrentQuiz() + const quiz = useCurrentQuiz(); const [display, setDisplay] = React.useState("1"); const handleChange = (event: SelectChangeEvent) => { @@ -66,14 +66,13 @@ export default function InstallQuiz() { const theme = useTheme(); - - const CopyLink = () => { - let one = document.getElementById("inputLinkone").value; - let text = document.getElementById("inputLink").value; - // text.select(); - navigator.clipboard.writeText(one+text) - // document.execCommand("copy"); - } + const CopyLink = () => { + let one = document.getElementById("inputLinkone").value; + let text = document.getElementById("inputLink").value; + // text.select(); + navigator.clipboard.writeText(one + text); + // document.execCommand("copy"); + }; return ( <> @@ -92,7 +91,10 @@ export default function InstallQuiz() { }} > - + Ссылка на quiz {/* - - - - + + + {/**/} - {quiz?.status === "start" ? "Опубликован" : "Не опубликован"} + + {quiz?.status === "start" ? "Опубликован" : "Не опубликован"} + - ) + ); } - - - // export default function InstallQuiz() { // const [display, setDisplay] = React.useState("1"); @@ -840,4 +844,4 @@ const buttonInstall: { icon: string; title: string; text: string }[] = [ title: "Виджет", text: "Сбоку страницы как консультант", }, -]; \ No newline at end of file +]; diff --git a/src/pages/InstallQuiz/InstallQzCode.tsx b/src/pages/InstallQuiz/InstallQzCode.tsx index 2cff138c..69af42e2 100644 --- a/src/pages/InstallQuiz/InstallQzCode.tsx +++ b/src/pages/InstallQuiz/InstallQzCode.tsx @@ -1,129 +1,165 @@ import InstallQzOnSiteParent from "./InstallQzOnSiteParent"; import { - Box, Button, - FormControl, - IconButton, - InputAdornment, Link, - OutlinedInput, - TextField, - Typography, - useTheme + Box, + Button, + FormControl, + IconButton, + InputAdornment, + Link, + OutlinedInput, + TextField, + Typography, + useTheme, } from "@mui/material"; import CopyIcon from "@icons/CopyIcon"; import React from "react"; import InfoIcon from "@icons/InfoIcon"; - export default function InstallQzCode() { - const theme = useTheme(); - return( - - - - 1. Код инициализации - Вставьте блок head в начале страницы - + + + 1. Код инициализации + + Вставьте блок head в начале страницы + + - - - - - }} + sx={{ + "& .MuiInputBase-root": { + maxWidth: "520px", + width: "100%", + backgroundColor: theme.palette.background.default, + fontSize: "18px", + alignItems: "flex-start", + }, + }} + InputProps={{ + endAdornment: ( + + + - - - 2. Код кнопки - Установите код в то место, где должна быть кнопка открытия quiz - + 2. Код кнопки + + Установите код в то место, где должна быть кнопка открытия quiz + + - - - - - }} + sx={{ + "& .MuiInputBase-root": { + backgroundColor: theme.palette.background.default, + fontSize: "18px", + alignItems: "flex-start", + }, + }} + InputProps={{ + endAdornment: ( + + + - - - - { - // }} - > - Инструкция к платформам - - - - - + + + ), + }} + /> + + + + { + // }} + > + Инструкция к платформам + + + + + + + - - 3. Проверьте правильность установки - Введите полный адрес страницы, где вы установили quiz и нажмите "проверить" - - - - Код нужно вставить один раз. Изменения в самом quiz будут отображаться автоматически после сохранения. - - - Для добавления нескольких quiz на одну страницу, код инициализации достаточно добавить один раз с любого quiz, - а затем вставить кнопки открытия с нужных quiz - - - - ) -} \ No newline at end of file + + 3. Проверьте правильность установки + + Введите полный адрес страницы, где вы установили quiz и нажмите + "проверить" + + + + + Код нужно вставить один раз. Изменения в самом quiz будут отображаться + автоматически после сохранения. + + + Для добавления нескольких quiz на одну страницу, код инициализации + достаточно добавить один раз с любого quiz, а затем вставить кнопки + открытия с нужных quiz + + + + ); +} diff --git a/src/pages/InstallQuiz/InstallQzOnSiteParent.tsx b/src/pages/InstallQuiz/InstallQzOnSiteParent.tsx index a0b2a9bc..c0e0df15 100644 --- a/src/pages/InstallQuiz/InstallQzOnSiteParent.tsx +++ b/src/pages/InstallQuiz/InstallQzOnSiteParent.tsx @@ -1,55 +1,69 @@ -import {Box, Button, SxProps, Theme, Typography, useTheme} from "@mui/material"; +import { + Box, + Button, + SxProps, + Theme, + Typography, + useTheme, +} from "@mui/material"; import OneIconBorder from "../../assets/icons/OneIconBorder"; import React from "react"; import NumberTwo from "@icons/NumberTwo"; import NumberThree from "@icons/NumberThree"; interface Props { - outerContainerSx?: SxProps; - children?: React.ReactNode; + outerContainerSx?: SxProps; + children?: React.ReactNode; } -export default function InstallQzOnSiteParent ({outerContainerSx: sx, children}: Props) { - const theme = useTheme(); - return ( - <> - - - Установка quiz на сайте - - Способ установки - - Настройка кнопки - - Вставить код на сайт - +export default function InstallQzOnSiteParent({ + outerContainerSx: sx, + children, +}: Props) { + const theme = useTheme(); + return ( + <> + + + + Установка quiz на сайте + + + + Способ установки + + + Настройка кнопки + + + Вставить код на сайт + + - - - {children} - - - - - - - - - - ) -} \ No newline at end of file + + {children} + + + + + + + ); +} diff --git a/src/pages/InstallQuiz/OnButtonInstall.tsx b/src/pages/InstallQuiz/OnButtonInstall.tsx index 517349e7..25f2ee72 100644 --- a/src/pages/InstallQuiz/OnButtonInstall.tsx +++ b/src/pages/InstallQuiz/OnButtonInstall.tsx @@ -1,103 +1,165 @@ -import {Box, Button, Link, Typography, useTheme} from "@mui/material"; -import React, {useState} from "react"; +import { Box, Button, Link, Typography, useTheme } from "@mui/material"; +import React, { useState } from "react"; import CustomCheckbox from "@ui_kit/CustomCheckbox"; import CustomTextField from "@ui_kit/CustomTextField"; -import Dots from '../../assets/dots.png' +import Dots from "../../assets/dots.png"; import InstallQzOnSiteParent from "./InstallQzOnSiteParent"; import AccordMy from "@ui_kit/Accordion"; -type isExpanded = "panel1" | "panel2" +type isExpanded = "panel1" | "panel2"; -export default function OnButtonInstall () { - const theme = useTheme(); +export default function OnButtonInstall() { + const theme = useTheme(); - const [isExpanded, setIsExpanded] = useState("panel1"); - return ( - <> - - {/*левая часть*/} - - {/*бокс с кнопкой*/} - - - - - - - Если quiz уже установлен на сайт, и вы что-то здесь изменили, - код на сайте нужно будет поменять. Настройки в этом конструкторе не сохраняются. - - - {/*правая часть*/} - - setIsExpanded("panel1")} sx={{display: "flex", flexDirection: 'column',}}> - - Цвет кнопки - - Цвет текста кнопки - - - - - - - - Текст кнопки - - - setIsExpanded("panel2")} sx={{display: "flex", flexDirection: 'column', width: "100%"}}> - Ссылка для вашей кнопки - - Или событие - - + const [isExpanded, setIsExpanded] = useState("panel1"); + return ( + <> + + {/*левая часть*/} + + {/*бокс с кнопкой*/} + + + {" "} + + + + + + + + Если quiz уже установлен на сайт, и вы что-то здесь изменили, код на + сайте нужно будет поменять. Настройки в этом конструкторе не + сохраняются. + + + {/*правая часть*/} + + setIsExpanded("panel1")} + sx={{ display: "flex", flexDirection: "column" }} + > + + + Цвет кнопки + + + {" "} + + + Цвет текста кнопки + + + {" "} + + + + + + + + + Текст кнопки + + + + setIsExpanded("panel2")} + sx={{ display: "flex", flexDirection: "column", width: "100%" }} + > + + Ссылка для вашей кнопки + + + + Или событие + + + - + Автооткрытие quiz - - - - ) + + + Автооткрытие quiz + + + + + ); } diff --git a/src/pages/InstallQuiz/VidjetInstall.tsx b/src/pages/InstallQuiz/VidjetInstall.tsx index 8970f68b..07caf8f1 100644 --- a/src/pages/InstallQuiz/VidjetInstall.tsx +++ b/src/pages/InstallQuiz/VidjetInstall.tsx @@ -1,206 +1,221 @@ import { - Box, - Button, - FormControl, - FormControlLabel, - Radio, - RadioGroup, - TextField, - Typography, - useTheme + Box, + Button, + FormControl, + FormControlLabel, + Radio, + RadioGroup, + TextField, + Typography, + useTheme, } from "@mui/material"; -import React, {useState} from "react"; +import React, { useState } from "react"; import InstallQzOnSiteParent from "./InstallQzOnSiteParent"; import CustomCheckbox from "@ui_kit/CustomCheckbox"; -import VidjetImg from "../../assets/VidjetImg.png" +import VidjetImg from "../../assets/VidjetImg.png"; import LDownButton from "@icons/InstallQuizIcon/LDownButton"; import RDownButton from "@icons/InstallQuizIcon/RDownButton"; import RadioCheck from "@ui_kit/RadioCheck"; import RadioIcon from "@ui_kit/RadioIcon"; +export default function VidjetInstall() { + const [value, setValue] = React.useState("1"); + const handleChangeRadio = (event: React.ChangeEvent) => { + setValue((event.target as HTMLInputElement).value); + }; + const [position, setPosition] = useState<"left" | "right">("left"); -export default function VidjetInstall () { - const [value, setValue] = React.useState("1"); + const theme = useTheme(); + return ( + + {/*левая часть*/} + + + + Если quiz уже установлен на сайт, и вы что-то здесь изменили, код на + сайте нужно будет поменять. Настройки в этом конструкторе не + сохраняются. + + + {/*правая часть*/} + + + Расположение + + + setPosition("left")} + isActive={position === "left"} + Icon={LDownButton} + /> + setPosition("right")} + isActive={position === "right"} + Icon={RDownButton} + /> + - const handleChangeRadio = (event: React.ChangeEvent) => { - setValue((event.target as HTMLInputElement).value); - }; - - const [position, setPosition] = useState<"left" | "right">("left"); - - const theme = useTheme(); - return ( - - {/*левая часть*/} - - - - Если quiz уже установлен на сайт, и вы что-то здесь изменили, код на сайте нужно будет поменять. - Настройки в этом конструкторе не сохраняются. - + + + Показывать виджет + + + + + + секунд + + + + Автооткрытие виджета при входе на сайт + + + + } icon={} /> + } + label="Да" + /> + } icon={} /> + } + label="Нет" + /> + + + {value === "1" ? ( + + + + Показывать через + + + + + + секунд + - {/*правая часть*/} - - - Расположение - - - setPosition("left")} - isActive={position === "left"} - Icon={LDownButton} - /> - setPosition("right")} - isActive={position === "right"} - Icon={RDownButton} - /> - + + Время, через которое quiz автоматически откроется + + + ) : ( + <> + )} - - - Показывать виджет - - - - секунд - - Автооткрытие виджета при входе на сайт - - - } - icon={} - /> - } - label="Да" - /> - } - icon={} - /> - } - label="Нет" - /> - - - {value === "1" ? - - - Показывать через - - - - секунд - - Время, через которое quiz автоматически откроется - - : - <> - } - - - - - - - ) + + + + + ); } interface Props { - Icon: React.ElementType; - isActive?: boolean; - onClick: () => void; + Icon: React.ElementType; + isActive?: boolean; + onClick: () => void; } function SelectButtonPosition({ Icon, isActive = false, onClick }: Props) { - const theme = useTheme(); - return ( - */} + {/* */} + {/* */} + {/* */} + {/* */} + {/* */} + {/* */} + {/* */} + {/* */} + {/* */} + {/* */} + {/* */} + {/**/} + + - {/**/} - {/* */} - {/* */} - {/* Как используют квиз*/} - {/* В крупном и малом бизнесе*/} - {/* */} - {/* */} - {/* */} - {/* */} - {/* */} - {/* */} - {/* */} - {/* */} - {/* */} - {/* */} - {/* */} - {/* */} - {/* */} - {/* */} - {/**/} - + Что еще можно делать с Опросником + + + Изящное решение исследовательских и бизнес-задач + + + {/**/} + {/* */} + {/* */} + {/* Исследования*/} + {/* */} + {/* */} + {/* */} + {/* Сегментация*/} + {/* */} + {/* */} + {/* */} + {/* Тестирование*/} + {/* */} + {/* */} + {/* */} + {/* E-commerce*/} + {/* */} + {/**/} + + + - - - Что еще можно делать - с Опросником - - - Изящное решение исследовательских и бизнес-задач - - - {/**/} - {/* */} - {/* */} - {/* Исследования*/} - {/* */} - {/* */} - {/* */} - {/* Сегментация*/} - {/* */} - {/* */} - {/* */} - {/* Тестирование*/} - {/* */} - {/* */} - {/* */} - {/* E-commerce*/} - {/* */} - {/**/} - - - - Исследуйте аудиторию и проверяйте гипотезы - - - - Опросник помогает проверять гипотезы - и принимать грамотные решения основанные - на данных. Создавайте опросы, собирайте обратную связь и анализируйте ответы - в удобной аналитике в личном кабинете. - - - - - - - + Исследуйте аудиторию и проверяйте гипотезы + + + + Опросник помогает проверять гипотезы и принимать грамотные + решения основанные на данных. Создавайте опросы, собирайте + обратную связь и анализируйте ответы в удобной аналитике в + личном кабинете. + - - ) -} \ No newline at end of file + + + + + + + + ); +} diff --git a/src/pages/Landing/Landing.tsx b/src/pages/Landing/Landing.tsx index e0109134..1e65ef9c 100644 --- a/src/pages/Landing/Landing.tsx +++ b/src/pages/Landing/Landing.tsx @@ -1,43 +1,40 @@ -import React from 'react'; -import {CssBaseline, useMediaQuery, useTheme} from "@mui/material"; -import Header from './HeaderLanding'; -import Footer from './FooterLanding'; -import Hero from './Hero'; -import Questions from './Questions'; -import Counter from './Counter'; -import Blog from './Blog'; -import HowItWorks from './HowItWorks'; -import BusinessPluses from './BusinessPluses'; -import HowToUse from './HowToUse'; +import React from "react"; +import { CssBaseline, useMediaQuery, useTheme } from "@mui/material"; +import Header from "./HeaderLanding"; +import Footer from "./FooterLanding"; +import Hero from "./Hero"; +import Questions from "./Questions"; +import Counter from "./Counter"; +import Blog from "./Blog"; +import HowItWorks from "./HowItWorks"; +import BusinessPluses from "./BusinessPluses"; +import HowToUse from "./HowToUse"; -import StartWithTemplates from './StartWithTemplates'; -import WhatTheFeatures from './WhatTheFeatures'; +import StartWithTemplates from "./StartWithTemplates"; +import WhatTheFeatures from "./WhatTheFeatures"; import FullScreenDialog from "./headerMobileLanding"; import Collaboration from "./Collaboration"; export default function Landing() { - const theme = useTheme(); - const isTablet = useMediaQuery(theme.breakpoints.down(1000)); + const theme = useTheme(); + const isTablet = useMediaQuery(theme.breakpoints.down(1000)); - return ( - <> - -
- - - {/* */} - - - - {/**/} - {/**/} - - {/**/} - {/**/} -