diff --git a/.eslintrc.json b/.eslintrc.json index e235b09..2ffea69 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -38,7 +38,8 @@ "react-hooks/exhaustive-deps": "warn", "@typescript-eslint/no-unused-expressions": "off", "jest/no-mocks-import": "off", - "jest/no-conditional-expect": "off" + "jest/no-conditional-expect": "off", + "no-continue": "off" }, "overrides": [ { diff --git a/jest.config.js b/jest.config.js index d9947d9..577b66f 100644 --- a/jest.config.js +++ b/jest.config.js @@ -9,19 +9,37 @@ module.exports = { 'node_modules/(react-dnd|dnd-core|@react-dnd|react-dnd-html5-backend)/.+\\.(j|t)sx?$': 'ts-jest', }, - transformIgnorePatterns: ['/node_modules/(?!react-dnd|dnd-core|@react-dnd)'], + transformIgnorePatterns: ['/node_modules/(?!react-dnd|dnd-core|@react-dnd|antlr4)'], moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx', 'json', 'node'], moduleNameMapper: { '\\.svg': '/src/__mocks__/svg.ts', '^src(.*)$': '/src$1', d3: '/node_modules/d3/dist/d3.min.js', '\\.(css|less|sass|scss)$': 'identity-obj-proxy', + antlr4: '/node_modules/antlr4/dist/antlr4.web.js', }, resetMocks: false, setupFiles: ['jest-localstorage-mock'], - setupFilesAfterEnv: ['jest-extended/all'], - collectCoverageFrom: ['src/**/*.{ts,tsx}', '!src/**/*.stories.{ts,tsx}'], - testTimeout: 60000, + setupFilesAfterEnv: [ + 'jest-extended/all', + '/src/__mocks__/setupCreateObjectUrlMock.ts', + '/src/__mocks__/setUpDateMock.ts', + '/src/__mocks__/setupGetComputedTextLengthMock.ts', + '/src/__mocks__/setupRangeMock.ts', + '/src/__mocks__/setupResizeObserverMock.ts', + '/src/__mocks__/setupResponsiveContainerMock.ts', + '/src/__mocks__/setupScrollIntoViewMock.ts', + '/src/__mocks__/setUpTextDecoderMock.ts', + '/src/__mocks__/setupUniqueIdMock.ts', + '/src/__mocks__/setupWindowMatchMediaMock.ts', + ], + collectCoverageFrom: [ + 'src/**/*.{ts,tsx}', + '!src/**/*.stories.{ts,tsx}', + // generated files from antlr + '!src/modules/study-management/user-management/task-management/survey/survey-editor/antlr/*.ts', + ], + testTimeout: 120000, reporters: [ 'default', ['jest-junit', { outputDirectory: 'test-reports', outputName: 'report.xml' }], diff --git a/package.json b/package.json index 82e4602..b2c59a6 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "name": "open-source-portal-frontend", "license": "UNLICENSED", "private": true, - "version": "0.9.65-hotfix1", + "version": "1.0.0", "scripts": { "dev:base": "webpack serve --mode development", "dev": "cross-env MOCK_API=always yarn dev:base", @@ -16,11 +16,11 @@ "postinstall": "husky install", "storybook": "start-storybook -p 6006", "storybook:build": "build-storybook", - "test": "jest", - "test:update": "jest -u", - "test:watch": "jest --watch", - "test:coverage": "jest --coverage", - "test:negative": "jest -t='\\[NEGATIVE\\]'" + "test": "cross-env TZ=UTC jest", + "test:update": "yarn test -u", + "test:watch": "yarn test --watch", + "test:coverage": "yarn test --coverage", + "test:negative": "yarn test -t='\\[NEGATIVE\\]'" }, "packageManager": "yarn@3.2.1", "engines": { @@ -31,8 +31,11 @@ "@floating-ui/react-dom": "^1.0.0", "@floating-ui/react-dom-interactions": "^0.9.3", "@reduxjs/toolkit": "^1.8.1", + "@transcend-io/conflux": "^4.0.3", "@types/d3": "^7.4.0", "@types/react-dnd-html5-backend": "^3.0.2", + "@types/textarea-caret": "^3.0.1", + "antlr4": "^4.12.0", "codemirror": "^5.65.8", "connected-react-router": "^6.9.2", "css-spring": "^4.1.0", @@ -44,9 +47,11 @@ "lodash": "^4.17.21", "luxon": "^2.4.0", "password-validator": "^5.3.0", + "pdfjs-dist": "^3.4.120", "qs": "^6.10.5", "react": "^18.1.0", "react-dnd": "^16.0.1", + "react-dnd-html5-backend": "^16.0.1", "react-dnd-touch-backend": "^16.0.1", "react-dom": "^18.1.0", "react-redux": "^8.0.2", @@ -57,7 +62,11 @@ "react-virtual": "^2.10.4", "resize-observer-polyfill": "^1.5.1", "smoothscroll-polyfill": "^0.4.4", - "styled-components": "^5.3.5" + "streamsaver": "^2.0.6", + "styled-components": "^5.3.5", + "textarea-caret": "^3.1.0", + "uuid": "^9.0.0", + "web-streams-polyfill": "^3.2.1" }, "resolutions": { "loader-utils": "^2.0.4", @@ -67,7 +76,9 @@ "trim": "^0.0.3", "decode-uri-component": "^0.2.1", "json5": "^2.2.2", - "luxon": "^2.5.2" + "luxon": "^2.5.2", + "http-cache-semantics": "4.1.1", + "webpack": "^5.76.0" }, "devDependencies": { "@babel/core": "^7.18.0", @@ -100,7 +111,9 @@ "@types/react-router-dom": "^5.3.3", "@types/react-test-renderer": "^18.0.0", "@types/react-transition-group": "^4.4.5", + "@types/streamsaver": "^2.0.1", "@types/styled-components": "^5.1.25", + "@types/uuid": "^9.0.1", "@types/webpack-env": "^1.17.0", "@typescript-eslint/eslint-plugin": "^5.26.0", "@typescript-eslint/parser": "^5.26.0", @@ -135,6 +148,7 @@ "jsdom": "^20.0.1", "lint-staged": "^12.4.1", "mini-css-extract-plugin": "^2.6.1", + "node-polyfill-webpack-plugin": "^2.0.1", "prettier": "^2.6.2", "react-refresh": "^0.13.0", "react-test-renderer": "^18.2.0", @@ -143,7 +157,7 @@ "ts-loader": "^9.3.0", "typescript": "^4.6.4", "typescript-plugin-styled-components": "^2.0.0", - "webpack": "^5.72.1", + "webpack": "^5.76.0", "webpack-bundle-analyzer": "^4.5.0", "webpack-cli": "^4.9.2", "webpack-dev-server": "^4.9.0" diff --git a/src/App.tsx b/src/App.tsx index 013c739..f20201e 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -2,10 +2,11 @@ import React from 'react'; import { Provider } from 'react-redux'; import { Route, Switch } from 'react-router-dom'; import { ConnectedRouter } from 'connected-react-router'; -import { ThemeProvider } from 'styled-components'; import { DndProvider } from 'react-dnd'; import { TouchBackend } from 'react-dnd-touch-backend'; +import { ThemeProvider } from 'styled-components'; + import { store } from 'src/modules/store/store'; import { history, Path } from 'src/modules/navigation/store'; import PrivateRoute from 'src/modules/navigation/private-route/PrivateRoute'; @@ -24,39 +25,42 @@ import ForgotPassword from 'src/modules/auth/forgot-password/ForgotPassword'; import ForgotPasswordCheckMailbox from 'src/modules/auth/forgot-password/ForgotPasswordCheckMailbox'; import ResetPassword from 'src/modules/auth/forgot-password/ResetPassword'; import PasswordChanged from 'src/modules/auth/forgot-password/PasswordChanged'; +import { ModalProvider } from 'src/common/components/Modal'; const App = () => ( - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + ); diff --git a/src/__mocks__/setUpDateMock.ts b/src/__mocks__/setUpDateMock.ts new file mode 100644 index 0000000..9299726 --- /dev/null +++ b/src/__mocks__/setUpDateMock.ts @@ -0,0 +1,13 @@ +let isEnabled = true; + +const originalDateNow = Date.now; + +Date.now = jest.fn(() => (isEnabled ? 1680842869025 : originalDateNow())); + +export function enableDateNowMock() { + isEnabled = true; +} + +export function disableDateNowMock() { + isEnabled = false; +} diff --git a/src/__mocks__/setUpTextDecoderMock.ts b/src/__mocks__/setUpTextDecoderMock.ts new file mode 100644 index 0000000..c2c8440 --- /dev/null +++ b/src/__mocks__/setUpTextDecoderMock.ts @@ -0,0 +1,4 @@ +import { TextEncoder, TextDecoder } from 'util'; + +global.TextEncoder = TextEncoder; +global.TextDecoder = TextDecoder as typeof global.TextDecoder; diff --git a/src/__mocks__/setupCreateObjectUrlMock.ts b/src/__mocks__/setupCreateObjectUrlMock.ts new file mode 100644 index 0000000..04dcc06 --- /dev/null +++ b/src/__mocks__/setupCreateObjectUrlMock.ts @@ -0,0 +1 @@ +global.URL.createObjectURL = jest.fn(() => 'blob:'); diff --git a/src/__mocks__/setupGetComputedTextLengthMock.ts b/src/__mocks__/setupGetComputedTextLengthMock.ts new file mode 100644 index 0000000..4c19457 --- /dev/null +++ b/src/__mocks__/setupGetComputedTextLengthMock.ts @@ -0,0 +1,3 @@ +beforeAll(() => { + (SVGElement.prototype as SVGTextContentElement).getComputedTextLength = () => 0; +}); diff --git a/src/__mocks__/setupScrollIntoViewMock.ts b/src/__mocks__/setupScrollIntoViewMock.ts new file mode 100644 index 0000000..a23f6d2 --- /dev/null +++ b/src/__mocks__/setupScrollIntoViewMock.ts @@ -0,0 +1,3 @@ +beforeAll(() => { + window.HTMLElement.prototype.scrollIntoView = jest.fn(); +}); diff --git a/src/assets/activity-task/6-mwt.svg b/src/assets/activity-task/6-mwt.svg new file mode 100644 index 0000000..e054fe7 --- /dev/null +++ b/src/assets/activity-task/6-mwt.svg @@ -0,0 +1,23 @@ + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/assets/activity-task/gait-balance.svg b/src/assets/activity-task/gait-balance.svg new file mode 100644 index 0000000..b45dc86 --- /dev/null +++ b/src/assets/activity-task/gait-balance.svg @@ -0,0 +1,41 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/assets/activity-task/guided-breathing.svg b/src/assets/activity-task/guided-breathing.svg new file mode 100644 index 0000000..8a16a37 --- /dev/null +++ b/src/assets/activity-task/guided-breathing.svg @@ -0,0 +1,20 @@ + + + + + + + + + + + + + + + + + + + + diff --git a/src/assets/activity-task/mobile-spiro.svg b/src/assets/activity-task/mobile-spiro.svg new file mode 100644 index 0000000..205b887 --- /dev/null +++ b/src/assets/activity-task/mobile-spiro.svg @@ -0,0 +1,36 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/assets/activity-task/preview/color_challenge_dots.svg b/src/assets/activity-task/preview/color_challenge_dots.svg new file mode 100644 index 0000000..23ae2aa --- /dev/null +++ b/src/assets/activity-task/preview/color_challenge_dots.svg @@ -0,0 +1,6 @@ + + + + + + diff --git a/src/assets/activity-task/preview/color_challenge_start.svg b/src/assets/activity-task/preview/color_challenge_start.svg new file mode 100644 index 0000000..192f460 --- /dev/null +++ b/src/assets/activity-task/preview/color_challenge_start.svg @@ -0,0 +1,19 @@ + + + + + + + + + + + + + + + + + + + diff --git a/src/assets/activity-task/preview/done.svg b/src/assets/activity-task/preview/done.svg new file mode 100644 index 0000000..f8071a4 --- /dev/null +++ b/src/assets/activity-task/preview/done.svg @@ -0,0 +1,11 @@ + + + + + + + + + + + diff --git a/src/assets/activity-task/preview/gait_balance_timer.svg b/src/assets/activity-task/preview/gait_balance_timer.svg new file mode 100644 index 0000000..f604d1a --- /dev/null +++ b/src/assets/activity-task/preview/gait_balance_timer.svg @@ -0,0 +1,5 @@ + + + + + diff --git a/src/assets/activity-task/preview/gait_balance_walk.svg b/src/assets/activity-task/preview/gait_balance_walk.svg new file mode 100644 index 0000000..a33e4b8 --- /dev/null +++ b/src/assets/activity-task/preview/gait_balance_walk.svg @@ -0,0 +1,41 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/assets/activity-task/preview/gait_balance_walk_back.svg b/src/assets/activity-task/preview/gait_balance_walk_back.svg new file mode 100644 index 0000000..488d017 --- /dev/null +++ b/src/assets/activity-task/preview/gait_balance_walk_back.svg @@ -0,0 +1,41 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/assets/activity-task/preview/guided_breathing_exhale.svg b/src/assets/activity-task/preview/guided_breathing_exhale.svg new file mode 100644 index 0000000..bebb3eb --- /dev/null +++ b/src/assets/activity-task/preview/guided_breathing_exhale.svg @@ -0,0 +1,14 @@ + + + + + + + + + + + + + + diff --git a/src/assets/activity-task/preview/guided_breathing_start.svg b/src/assets/activity-task/preview/guided_breathing_start.svg new file mode 100644 index 0000000..ad890b2 --- /dev/null +++ b/src/assets/activity-task/preview/guided_breathing_start.svg @@ -0,0 +1,20 @@ + + + + + + + + + + + + + + + + + + + + diff --git a/src/assets/activity-task/preview/range_of_motion_left.svg b/src/assets/activity-task/preview/range_of_motion_left.svg new file mode 100644 index 0000000..a2d6cbc --- /dev/null +++ b/src/assets/activity-task/preview/range_of_motion_left.svg @@ -0,0 +1,21 @@ + + + + + + + + + + + + + + + + + + + + + diff --git a/src/assets/activity-task/preview/range_of_motion_right.svg b/src/assets/activity-task/preview/range_of_motion_right.svg new file mode 100644 index 0000000..8c9ea67 --- /dev/null +++ b/src/assets/activity-task/preview/range_of_motion_right.svg @@ -0,0 +1,20 @@ + + + + + + + + + + + + + + + + + + + + diff --git a/src/assets/activity-task/preview/range_of_motion_timer.svg b/src/assets/activity-task/preview/range_of_motion_timer.svg new file mode 100644 index 0000000..f604d1a --- /dev/null +++ b/src/assets/activity-task/preview/range_of_motion_timer.svg @@ -0,0 +1,5 @@ + + + + + diff --git a/src/assets/activity-task/preview/reaction_time_dot.svg b/src/assets/activity-task/preview/reaction_time_dot.svg new file mode 100644 index 0000000..e2d2201 --- /dev/null +++ b/src/assets/activity-task/preview/reaction_time_dot.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/assets/activity-task/preview/reaction_time_start.svg b/src/assets/activity-task/preview/reaction_time_start.svg new file mode 100644 index 0000000..37fe3ef --- /dev/null +++ b/src/assets/activity-task/preview/reaction_time_start.svg @@ -0,0 +1,19 @@ + + + + + + + + + + + + + + + + + + + diff --git a/src/assets/activity-task/preview/sit_to_stand_start.svg b/src/assets/activity-task/preview/sit_to_stand_start.svg new file mode 100644 index 0000000..ea2bf60 --- /dev/null +++ b/src/assets/activity-task/preview/sit_to_stand_start.svg @@ -0,0 +1,23 @@ + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/assets/activity-task/preview/sit_to_stand_timer.svg b/src/assets/activity-task/preview/sit_to_stand_timer.svg new file mode 100644 index 0000000..aaf73e6 --- /dev/null +++ b/src/assets/activity-task/preview/sit_to_stand_timer.svg @@ -0,0 +1,5 @@ + + + + + diff --git a/src/assets/activity-task/preview/speech_recognition_audio.svg b/src/assets/activity-task/preview/speech_recognition_audio.svg new file mode 100644 index 0000000..0c4e477 --- /dev/null +++ b/src/assets/activity-task/preview/speech_recognition_audio.svg @@ -0,0 +1,180 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/assets/activity-task/preview/speech_recognition_audio_empty.svg b/src/assets/activity-task/preview/speech_recognition_audio_empty.svg new file mode 100644 index 0000000..25853f3 --- /dev/null +++ b/src/assets/activity-task/preview/speech_recognition_audio_empty.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/assets/activity-task/preview/speech_recognition_start.svg b/src/assets/activity-task/preview/speech_recognition_start.svg new file mode 100644 index 0000000..0d9454d --- /dev/null +++ b/src/assets/activity-task/preview/speech_recognition_start.svg @@ -0,0 +1,31 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/assets/activity-task/preview/spirometry_audio.svg b/src/assets/activity-task/preview/spirometry_audio.svg new file mode 100644 index 0000000..f8a37a1 --- /dev/null +++ b/src/assets/activity-task/preview/spirometry_audio.svg @@ -0,0 +1,66 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/assets/activity-task/preview/spirometry_start.svg b/src/assets/activity-task/preview/spirometry_start.svg new file mode 100644 index 0000000..daf5e79 --- /dev/null +++ b/src/assets/activity-task/preview/spirometry_start.svg @@ -0,0 +1,36 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/assets/activity-task/preview/step_test_dots.svg b/src/assets/activity-task/preview/step_test_dots.svg new file mode 100644 index 0000000..ade880b --- /dev/null +++ b/src/assets/activity-task/preview/step_test_dots.svg @@ -0,0 +1,6 @@ + + + + + + diff --git a/src/assets/activity-task/preview/step_test_start.svg b/src/assets/activity-task/preview/step_test_start.svg new file mode 100644 index 0000000..9cd35cc --- /dev/null +++ b/src/assets/activity-task/preview/step_test_start.svg @@ -0,0 +1,24 @@ + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/assets/activity-task/preview/sustained_phonation_audio.svg b/src/assets/activity-task/preview/sustained_phonation_audio.svg new file mode 100644 index 0000000..d39ff83 --- /dev/null +++ b/src/assets/activity-task/preview/sustained_phonation_audio.svg @@ -0,0 +1,32 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/assets/activity-task/preview/sustained_phonation_exhale.svg b/src/assets/activity-task/preview/sustained_phonation_exhale.svg new file mode 100644 index 0000000..4c86c92 --- /dev/null +++ b/src/assets/activity-task/preview/sustained_phonation_exhale.svg @@ -0,0 +1,14 @@ + + + + + + + + + + + + + + diff --git a/src/assets/activity-task/preview/sustained_phonation_start.svg b/src/assets/activity-task/preview/sustained_phonation_start.svg new file mode 100644 index 0000000..5e30dab --- /dev/null +++ b/src/assets/activity-task/preview/sustained_phonation_start.svg @@ -0,0 +1,30 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/assets/activity-task/preview/tapping_speed_buttons.svg b/src/assets/activity-task/preview/tapping_speed_buttons.svg new file mode 100644 index 0000000..f99ed6d --- /dev/null +++ b/src/assets/activity-task/preview/tapping_speed_buttons.svg @@ -0,0 +1,4 @@ + + + + diff --git a/src/assets/activity-task/preview/tapping_speed_left.svg b/src/assets/activity-task/preview/tapping_speed_left.svg new file mode 100644 index 0000000..89c8fd8 --- /dev/null +++ b/src/assets/activity-task/preview/tapping_speed_left.svg @@ -0,0 +1,15 @@ + + + + + + + + + + + + + + + diff --git a/src/assets/activity-task/preview/tapping_speed_right.svg b/src/assets/activity-task/preview/tapping_speed_right.svg new file mode 100644 index 0000000..3edaf49 --- /dev/null +++ b/src/assets/activity-task/preview/tapping_speed_right.svg @@ -0,0 +1,15 @@ + + + + + + + + + + + + + + + diff --git a/src/assets/activity-task/preview/walk_test_start.svg b/src/assets/activity-task/preview/walk_test_start.svg new file mode 100644 index 0000000..0b7cc90 --- /dev/null +++ b/src/assets/activity-task/preview/walk_test_start.svg @@ -0,0 +1,22 @@ + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/assets/activity-task/preview/walk_test_timer.svg b/src/assets/activity-task/preview/walk_test_timer.svg new file mode 100644 index 0000000..edb71bf --- /dev/null +++ b/src/assets/activity-task/preview/walk_test_timer.svg @@ -0,0 +1,5 @@ + + + + + diff --git a/src/assets/activity-task/range-motion.svg b/src/assets/activity-task/range-motion.svg new file mode 100644 index 0000000..c4562cf --- /dev/null +++ b/src/assets/activity-task/range-motion.svg @@ -0,0 +1,21 @@ + + + + + + + + + + + + + + + + + + + + + diff --git a/src/assets/activity-task/reaction-time.svg b/src/assets/activity-task/reaction-time.svg new file mode 100644 index 0000000..7101dfb --- /dev/null +++ b/src/assets/activity-task/reaction-time.svg @@ -0,0 +1,19 @@ + + + + + + + + + + + + + + + + + + + diff --git a/src/assets/activity-task/sit-stand.svg b/src/assets/activity-task/sit-stand.svg new file mode 100644 index 0000000..808e26a --- /dev/null +++ b/src/assets/activity-task/sit-stand.svg @@ -0,0 +1,23 @@ + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/assets/activity-task/speech-recognition.svg b/src/assets/activity-task/speech-recognition.svg new file mode 100644 index 0000000..0cc045c --- /dev/null +++ b/src/assets/activity-task/speech-recognition.svg @@ -0,0 +1,31 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/assets/activity-task/step-test.svg b/src/assets/activity-task/step-test.svg new file mode 100644 index 0000000..bc5c209 --- /dev/null +++ b/src/assets/activity-task/step-test.svg @@ -0,0 +1,22 @@ + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/assets/activity-task/sustained-phonation.svg b/src/assets/activity-task/sustained-phonation.svg new file mode 100644 index 0000000..4a9fdcd --- /dev/null +++ b/src/assets/activity-task/sustained-phonation.svg @@ -0,0 +1,30 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/assets/activity-task/tapping-speed.svg b/src/assets/activity-task/tapping-speed.svg new file mode 100644 index 0000000..5f06e61 --- /dev/null +++ b/src/assets/activity-task/tapping-speed.svg @@ -0,0 +1,15 @@ + + + + + + + + + + + + + + + diff --git a/src/assets/activity-task/word-color.svg b/src/assets/activity-task/word-color.svg new file mode 100644 index 0000000..54ddeee --- /dev/null +++ b/src/assets/activity-task/word-color.svg @@ -0,0 +1,19 @@ + + + + + + + + + + + + + + + + + + + diff --git a/src/assets/education/education.svg b/src/assets/education/education.svg new file mode 100644 index 0000000..b03c1b1 --- /dev/null +++ b/src/assets/education/education.svg @@ -0,0 +1,11 @@ + + + + + + + + + + + diff --git a/src/assets/education/pdf.svg b/src/assets/education/pdf.svg new file mode 100644 index 0000000..5b8bf44 --- /dev/null +++ b/src/assets/education/pdf.svg @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/src/assets/education/play.svg b/src/assets/education/play.svg new file mode 100644 index 0000000..8c8b717 --- /dev/null +++ b/src/assets/education/play.svg @@ -0,0 +1,4 @@ + + + + diff --git a/src/assets/education/player-controls.svg b/src/assets/education/player-controls.svg new file mode 100644 index 0000000..706ce90 --- /dev/null +++ b/src/assets/education/player-controls.svg @@ -0,0 +1,30 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/assets/education/scratch.svg b/src/assets/education/scratch.svg new file mode 100644 index 0000000..c9d11f0 --- /dev/null +++ b/src/assets/education/scratch.svg @@ -0,0 +1,11 @@ + + + + + + + + + + + diff --git a/src/assets/education/video.svg b/src/assets/education/video.svg new file mode 100644 index 0000000..5f5d97a --- /dev/null +++ b/src/assets/education/video.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/assets/icons/appbar_back.svg b/src/assets/icons/appbar_back.svg index 696c994..b4aef78 100644 --- a/src/assets/icons/appbar_back.svg +++ b/src/assets/icons/appbar_back.svg @@ -1,3 +1,10 @@ - - + + + + + + + + + diff --git a/src/assets/icons/calendar_small.svg b/src/assets/icons/calendar_small.svg new file mode 100644 index 0000000..f8f2b4f --- /dev/null +++ b/src/assets/icons/calendar_small.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/assets/icons/checkmark_small.svg b/src/assets/icons/checkmark_small.svg new file mode 100644 index 0000000..2e21bbd --- /dev/null +++ b/src/assets/icons/checkmark_small.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/assets/icons/comparison_percentage_decrease.svg b/src/assets/icons/comparison_percentage_decrease.svg new file mode 100644 index 0000000..891975e --- /dev/null +++ b/src/assets/icons/comparison_percentage_decrease.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/assets/icons/comparison_percentage_increase.svg b/src/assets/icons/comparison_percentage_increase.svg new file mode 100644 index 0000000..ab4e792 --- /dev/null +++ b/src/assets/icons/comparison_percentage_increase.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/assets/icons/document.svg b/src/assets/icons/document.svg new file mode 100644 index 0000000..fe6f8a1 --- /dev/null +++ b/src/assets/icons/document.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/assets/icons/download.svg b/src/assets/icons/download.svg new file mode 100644 index 0000000..60d32a1 --- /dev/null +++ b/src/assets/icons/download.svg @@ -0,0 +1,4 @@ + + + + diff --git a/src/assets/icons/download_small.svg b/src/assets/icons/download_small.svg new file mode 100644 index 0000000..317a099 --- /dev/null +++ b/src/assets/icons/download_small.svg @@ -0,0 +1,4 @@ + + + + diff --git a/src/assets/icons/dropdown_arrow_small.svg b/src/assets/icons/dropdown_arrow_small.svg new file mode 100644 index 0000000..7926c9c --- /dev/null +++ b/src/assets/icons/dropdown_arrow_small.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/assets/icons/edit_open_ended.svg b/src/assets/icons/edit_open_ended.svg new file mode 100644 index 0000000..7f0c5e8 --- /dev/null +++ b/src/assets/icons/edit_open_ended.svg @@ -0,0 +1,4 @@ + + + + diff --git a/src/assets/icons/image.svg b/src/assets/icons/image.svg new file mode 100644 index 0000000..9b90743 --- /dev/null +++ b/src/assets/icons/image.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/assets/icons/info.svg b/src/assets/icons/info.svg index 5d7ba0c..c3001ce 100644 --- a/src/assets/icons/info.svg +++ b/src/assets/icons/info.svg @@ -1,3 +1,3 @@ - + diff --git a/src/assets/icons/lock.svg b/src/assets/icons/lock.svg index 3f89dd4..9940802 100644 --- a/src/assets/icons/lock.svg +++ b/src/assets/icons/lock.svg @@ -1,10 +1,3 @@ - - - - - - - - + diff --git a/src/assets/icons/minus_button.svg b/src/assets/icons/minus_button.svg new file mode 100644 index 0000000..cbd0b66 --- /dev/null +++ b/src/assets/icons/minus_button.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/assets/icons/more.svg b/src/assets/icons/more.svg new file mode 100644 index 0000000..0fa9261 --- /dev/null +++ b/src/assets/icons/more.svg @@ -0,0 +1,5 @@ + + + + + diff --git a/src/assets/icons/plus_button.svg b/src/assets/icons/plus_button.svg new file mode 100644 index 0000000..cf713d4 --- /dev/null +++ b/src/assets/icons/plus_button.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/assets/icons/rank.svg b/src/assets/icons/rank.svg new file mode 100644 index 0000000..33f4e92 --- /dev/null +++ b/src/assets/icons/rank.svg @@ -0,0 +1,5 @@ + + + + + diff --git a/src/assets/icons/reorder.svg b/src/assets/icons/reorder.svg new file mode 100644 index 0000000..1f9dc93 --- /dev/null +++ b/src/assets/icons/reorder.svg @@ -0,0 +1,6 @@ + + + + + + diff --git a/src/assets/icons/reorder_selected.svg b/src/assets/icons/reorder_selected.svg new file mode 100644 index 0000000..1f55e1c --- /dev/null +++ b/src/assets/icons/reorder_selected.svg @@ -0,0 +1,6 @@ + + + + + + diff --git a/src/assets/icons/sections.svg b/src/assets/icons/sections.svg new file mode 100644 index 0000000..554efa0 --- /dev/null +++ b/src/assets/icons/sections.svg @@ -0,0 +1,5 @@ + + + + + diff --git a/src/assets/icons/skip_logic.svg b/src/assets/icons/skip_logic.svg new file mode 100644 index 0000000..c34055f --- /dev/null +++ b/src/assets/icons/skip_logic.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/assets/icons/skip_logic_warning.svg b/src/assets/icons/skip_logic_warning.svg new file mode 100644 index 0000000..0caa377 --- /dev/null +++ b/src/assets/icons/skip_logic_warning.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/assets/icons/trial_management.svg b/src/assets/icons/study_management.svg similarity index 100% rename from src/assets/icons/trial_management.svg rename to src/assets/icons/study_management.svg diff --git a/src/assets/icons/subtract.svg b/src/assets/icons/subtract.svg new file mode 100644 index 0000000..c9521b6 --- /dev/null +++ b/src/assets/icons/subtract.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/assets/icons/time.svg b/src/assets/icons/time.svg index d2df072..8652de5 100644 --- a/src/assets/icons/time.svg +++ b/src/assets/icons/time.svg @@ -1,3 +1,3 @@ - + diff --git a/src/assets/icons/time_small.svg b/src/assets/icons/time_small.svg new file mode 100644 index 0000000..caf5d37 --- /dev/null +++ b/src/assets/icons/time_small.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/assets/icons/trash_can.svg b/src/assets/icons/trash_can.svg index 6160cfd..19167fd 100644 --- a/src/assets/icons/trash_can.svg +++ b/src/assets/icons/trash_can.svg @@ -1,5 +1,5 @@ - - - + + + diff --git a/src/assets/icons/trend_down.svg b/src/assets/icons/trend_down.svg new file mode 100644 index 0000000..3a728f1 --- /dev/null +++ b/src/assets/icons/trend_down.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/assets/icons/upload.svg b/src/assets/icons/upload.svg new file mode 100644 index 0000000..60e0866 --- /dev/null +++ b/src/assets/icons/upload.svg @@ -0,0 +1,4 @@ + + + + diff --git a/src/assets/icons/upload_success.svg b/src/assets/icons/upload_success.svg new file mode 100644 index 0000000..01afd3e --- /dev/null +++ b/src/assets/icons/upload_success.svg @@ -0,0 +1,7 @@ + + + + + + + diff --git a/src/assets/icons/warning.svg b/src/assets/icons/warning.svg new file mode 100644 index 0000000..3282aa8 --- /dev/null +++ b/src/assets/icons/warning.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/assets/service/drop_area.svg b/src/assets/service/drop_area.svg new file mode 100644 index 0000000..33c2623 --- /dev/null +++ b/src/assets/service/drop_area.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/assets/service/empty_data.svg b/src/assets/service/empty_data.svg index 4bbbd8b..f6c535c 100644 --- a/src/assets/service/empty_data.svg +++ b/src/assets/service/empty_data.svg @@ -1,7 +1,5 @@ - - diff --git a/src/common/components/BackdropOverlay.test.tsx b/src/common/components/BackdropOverlay.test.tsx index c8d1d1e..20296a0 100644 --- a/src/common/components/BackdropOverlay.test.tsx +++ b/src/common/components/BackdropOverlay.test.tsx @@ -50,7 +50,7 @@ describe('BackdropOverlay', () => { rerender( - +
diff --git a/src/common/components/BackdropOverlay.tsx b/src/common/components/BackdropOverlay.tsx index bca0401..3e61010 100644 --- a/src/common/components/BackdropOverlay.tsx +++ b/src/common/components/BackdropOverlay.tsx @@ -12,7 +12,7 @@ const BackdropContainer = styled.div<{ show?: boolean }>` z-index: ${({ show }) => (show ? 1000 : -1)}; `; -export const BackdropBase = styled.div` +const BackdropBase = styled.div` position: fixed; left: 0; top: 0; @@ -55,7 +55,7 @@ export interface BackdropOverlayProps extends React.PropsWithChildren>, Pick { open?: boolean; - loaderBackdrop?: boolean; + blur?: boolean; } const BACKDROP_ID = 'backdrop-portal'; @@ -64,7 +64,7 @@ const createId = (id?: string): string => (id ? `${BACKDROP_ID}-${id}` : BACKDRO const BackdropOverlay: FC = ({ open, - loaderBackdrop, + blur, children, onEnter, onEntering, @@ -89,7 +89,7 @@ const BackdropOverlay: FC = ({ return ( - + {children} = ({ setShowContent(false); }} > - + diff --git a/src/common/components/Button.test.tsx b/src/common/components/Button.test.tsx index 00b706b..6efa4c9 100644 --- a/src/common/components/Button.test.tsx +++ b/src/common/components/Button.test.tsx @@ -168,7 +168,7 @@ describe('Button', () => { it('[NEGATIVE] should render with wrong `fill` property', async () => { const { baseElement } = render( -