├── .eslintignore ├── configs ├── test-utils │ ├── .npmignore │ ├── .eslintignore │ ├── index.ts │ ├── src │ │ ├── expects │ │ │ └── index.ts │ │ ├── __mocks__ │ │ │ ├── imports │ │ │ │ ├── style.ts │ │ │ │ └── file.ts │ │ │ ├── jwt-decode.ts │ │ │ ├── @monkvision │ │ │ │ ├── posthog.ts │ │ │ │ ├── sentry.ts │ │ │ │ ├── inspection-capture-web.tsx │ │ │ │ ├── camera-web.tsx │ │ │ │ └── analytics.tsx │ │ │ ├── react-router-dom.tsx │ │ │ ├── react-i18next.tsx │ │ │ ├── i18next.ts │ │ │ └── @auth0 │ │ │ │ └── auth0-react.tsx │ │ ├── index.ts │ │ ├── styles.ts │ │ ├── dom.ts │ │ └── async.ts │ ├── .gitignore │ ├── jest.config.js │ ├── tsconfig.json │ └── .eslintrc.js ├── jest-config │ ├── index.js │ ├── react.js │ ├── setupTests.js │ └── base.js ├── svgo-config │ ├── index.js │ └── README.md ├── typescript-config │ └── tsconfig.react.json └── prettier-config │ ├── index.js │ └── README.md ├── documentation ├── static │ ├── .nojekyll │ └── img │ │ ├── monkjs.png │ │ ├── favicon.png │ │ ├── monkjs-social-card.png │ │ └── animated-logo.svg ├── .eslintignore ├── license.md ├── src │ ├── utils │ │ ├── index.ts │ │ └── schemas │ │ │ ├── index.ts │ │ │ ├── cameraConfig.schema.ts │ │ │ └── videoCaptureConfig.schema.ts │ ├── components │ │ ├── Sights │ │ │ ├── TopBar │ │ │ │ └── index.ts │ │ │ ├── LabelTable │ │ │ │ └── index.ts │ │ │ ├── SightCard │ │ │ │ └── index.ts │ │ │ └── index.ts │ │ ├── Shared │ │ │ ├── CopyPopup │ │ │ │ └── index.ts │ │ │ ├── SearchBar │ │ │ │ ├── index.ts │ │ │ │ └── SearchBar.module.css │ │ │ └── index.ts │ │ ├── Icons │ │ │ ├── IconsTopBar │ │ │ │ ├── index.ts │ │ │ │ ├── IconsTopBar.module.css │ │ │ │ └── IconsTopBar.tsx │ │ │ ├── IconCard │ │ │ │ ├── index.ts │ │ │ │ └── IconCard.module.css │ │ │ └── index.ts │ │ ├── ConfigValidator │ │ │ ├── ConfigImport │ │ │ │ └── index.ts │ │ │ ├── ConfigValidateResults │ │ │ │ └── index.ts │ │ │ └── index.ts │ │ ├── Home │ │ │ ├── HomeHeader │ │ │ │ └── index.ts │ │ │ ├── HomeFeatures │ │ │ │ ├── index.ts │ │ │ │ ├── HomeFeatures.module.css │ │ │ │ ├── HomeFeatures.tsx │ │ │ │ └── Feature.tsx │ │ │ └── index.ts │ │ ├── index.ts │ │ └── domOnly.tsx │ └── pages │ │ ├── Icons │ │ └── styles.module.css │ │ ├── Sights │ │ └── styles.module.css │ │ ├── ConfigValidator │ │ └── styles.module.css │ │ └── index.tsx ├── docs │ ├── v3-docs │ │ ├── apis │ │ │ ├── _category_.json │ │ │ ├── javascript │ │ │ │ └── _category_.json │ │ │ └── react-native │ │ │ │ └── _category_.json │ │ ├── guides │ │ │ └── _category_.json │ │ └── _category_.json │ └── packages │ │ ├── _category_.json │ │ ├── types.md │ │ └── common.md ├── babel.config.js ├── svgo.config.js ├── sidebars.js ├── .gitignore └── .eslintrc.js ├── packages ├── posthog │ ├── .eslintignore │ ├── src │ │ └── index.ts │ ├── .gitignore │ ├── tsconfig.json │ ├── tsconfig.build.production.json │ ├── tsconfig.build.development.json │ ├── jest.config.js │ └── .eslintrc.js ├── sentry │ ├── .eslintignore │ ├── src │ │ └── index.ts │ ├── .gitignore │ ├── tsconfig.json │ ├── tsconfig.build.production.json │ ├── tsconfig.build.development.json │ ├── jest.config.js │ └── .eslintrc.js ├── analytics │ ├── .eslintignore │ ├── src │ │ ├── index.ts │ │ ├── adapters │ │ │ └── index.ts │ │ └── react │ │ │ ├── index.ts │ │ │ └── context.ts │ ├── .gitignore │ ├── tsconfig.json │ ├── jest.config.js │ ├── tsconfig.build.production.json │ ├── tsconfig.build.development.json │ └── .eslintrc.js ├── monitoring │ ├── .eslintignore │ ├── src │ │ ├── index.ts │ │ ├── react │ │ │ ├── index.ts │ │ │ ├── context.ts │ │ │ └── hooks.ts │ │ └── adapters │ │ │ └── index.ts │ ├── .gitignore │ ├── tsconfig.json │ ├── jest.config.js │ ├── tsconfig.build.production.json │ ├── tsconfig.build.development.json │ └── .eslintrc.js ├── common │ ├── src │ │ ├── PreventExit │ │ │ └── index.ts │ │ ├── theme │ │ │ ├── default │ │ │ │ └── index.ts │ │ │ ├── index.ts │ │ │ ├── context.ts │ │ │ └── hooks.ts │ │ ├── i18n │ │ │ ├── index.ts │ │ │ └── translations │ │ │ │ └── index.ts │ │ ├── apps │ │ │ ├── index.ts │ │ │ └── analytics.ts │ │ ├── state │ │ │ ├── index.ts │ │ │ ├── actions │ │ │ │ └── index.ts │ │ │ ├── hooks.ts │ │ │ └── context.ts │ │ ├── index.ts │ │ ├── hooks │ │ │ ├── useSearchParams.ts │ │ │ ├── useIsMounted.ts │ │ │ ├── useObjectMemo.ts │ │ │ ├── index.ts │ │ │ └── useSafeTimeout.ts │ │ └── utils │ │ │ ├── promise.utils.ts │ │ │ ├── env.utils.ts │ │ │ ├── index.ts │ │ │ ├── config.utils.ts │ │ │ └── vehicle.utils.ts │ ├── test │ │ ├── __utils__ │ │ │ └── index.ts │ │ ├── hooks │ │ │ ├── useIsMounted.test.ts │ │ │ └── useSearchParams.test.ts │ │ ├── utils │ │ │ ├── promise.utils.test.ts │ │ │ └── browser.utils.test.ts │ │ └── theme │ │ │ └── hooks.test.ts │ ├── .eslintignore │ ├── .gitignore │ ├── tsconfig.json │ ├── jest.config.js │ ├── tsconfig.build.production.json │ ├── tsconfig.build.development.json │ └── .eslintrc.js ├── network │ ├── src │ │ ├── api │ │ │ ├── damage │ │ │ │ ├── index.ts │ │ │ │ └── mappers.ts │ │ │ ├── image │ │ │ │ └── index.ts │ │ │ ├── pdf │ │ │ │ └── index.ts │ │ │ ├── task │ │ │ │ └── index.ts │ │ │ ├── vehicle │ │ │ │ └── index.ts │ │ │ ├── liveConfigs │ │ │ │ ├── index.ts │ │ │ │ └── requests.ts │ │ │ ├── hooks │ │ │ │ └── index.ts │ │ │ ├── pricing │ │ │ │ └── index.ts │ │ │ ├── models │ │ │ │ ├── pdf.ts │ │ │ │ ├── renderedOutput.ts │ │ │ │ ├── index.ts │ │ │ │ ├── part.ts │ │ │ │ ├── wheelAnalysis.ts │ │ │ │ ├── view.ts │ │ │ │ └── damage.ts │ │ │ └── inspection │ │ │ │ └── index.ts │ │ ├── index.ts │ │ └── auth │ │ │ └── index.ts │ ├── .gitignore │ ├── tsconfig.json │ ├── tsconfig.build.production.json │ ├── tsconfig.build.development.json │ ├── .eslintignore │ ├── jest.config.js │ ├── .prettierignore │ └── .eslintrc.js ├── camera-web │ ├── src │ │ ├── utils │ │ │ └── index.ts │ │ ├── hooks │ │ │ └── index.ts │ │ ├── translations │ │ │ ├── en.json │ │ │ ├── fr.json │ │ │ ├── it.json │ │ │ ├── de.json │ │ │ └── nl.json │ │ ├── SimpleCameraHUD │ │ │ └── index.ts │ │ ├── Camera │ │ │ ├── hooks │ │ │ │ ├── utils │ │ │ │ │ └── index.ts │ │ │ │ └── index.ts │ │ │ ├── index.ts │ │ │ └── Camera.styles.ts │ │ ├── index.ts │ │ └── i18n.ts │ ├── .eslintignore │ ├── .gitignore │ ├── test │ │ └── mocks │ │ │ ├── index.ts │ │ │ └── internalMonitoringConfig.mock.ts │ ├── tsconfig.json │ ├── jest.config.js │ ├── tsconfig.build.production.json │ ├── tsconfig.build.development.json │ └── .eslintrc.js ├── sights │ ├── src │ │ ├── lib │ │ │ └── index.ts │ │ ├── build │ │ │ └── index.ts │ │ ├── index.ts │ │ └── validate │ │ │ └── index.ts │ ├── .eslintignore │ ├── tsconfig.json │ ├── .gitignore │ ├── .prettierignore │ ├── tsconfig.build.production.json │ ├── tsconfig.build.development.json │ ├── jest.config.js │ ├── svgo.config.js │ ├── research │ │ ├── schemas │ │ │ └── subschemas │ │ │ │ ├── cameraHeight.schema.json │ │ │ │ ├── category.schema.json │ │ │ │ ├── cameraDistance.schema.json │ │ │ │ ├── wheelName.schema.json │ │ │ │ ├── xyzArray.schema.json │ │ │ │ ├── vehicleType.schema.json │ │ │ │ ├── vehicle.schema.json │ │ │ │ ├── task.schema.json │ │ │ │ └── camera.schema.json │ │ └── data │ │ │ ├── all │ │ │ └── overlays │ │ │ │ ├── all-11w-_e9c.svg │ │ │ │ └── all-sLu0CfOt.svg │ │ │ ├── vwtroc │ │ │ └── overlays │ │ │ │ ├── vwtroc-m1rhrZ88.svg │ │ │ │ ├── vwtroc-oIk8RQ3w.svg │ │ │ │ └── vwtroc-36qmcrgr.svg │ │ │ ├── haccord │ │ │ └── overlays │ │ │ │ └── haccord-pplCo6sV.svg │ │ │ ├── audia7 │ │ │ └── overlays │ │ │ │ └── audia7-vedHBC2n.svg │ │ │ └── jgc21 │ │ │ └── overlays │ │ │ └── jgc21-2bGeRS3I.svg │ ├── test │ │ ├── dataValidation.test.ts │ │ ├── utils.ts │ │ ├── lib │ │ │ └── data.test.ts │ │ └── build │ │ │ └── index.test.ts │ ├── tsconfig.compile.json │ └── .eslintrc.js ├── common-ui-web │ ├── .eslintignore │ ├── src │ │ ├── index.ts │ │ ├── components │ │ │ ├── CaptureSelection │ │ │ │ ├── index.ts │ │ │ │ ├── translations │ │ │ │ │ ├── en.json │ │ │ │ │ ├── nl.json │ │ │ │ │ ├── it.json │ │ │ │ │ ├── de.json │ │ │ │ │ └── fr.json │ │ │ │ └── hooks.ts │ │ │ ├── Login │ │ │ │ ├── index.ts │ │ │ │ ├── Login.styles.ts │ │ │ │ └── translations │ │ │ │ │ ├── en.json │ │ │ │ │ ├── it.json │ │ │ │ │ ├── nl.json │ │ │ │ │ ├── fr.json │ │ │ │ │ └── de.json │ │ │ ├── DynamicSVG │ │ │ │ ├── hooks │ │ │ │ │ ├── utils │ │ │ │ │ │ └── index.ts │ │ │ │ │ ├── index.ts │ │ │ │ │ └── useXMLParser.ts │ │ │ │ └── index.ts │ │ │ ├── ImageDetailedView │ │ │ │ ├── translations │ │ │ │ │ ├── en.json │ │ │ │ │ ├── it.json │ │ │ │ │ ├── de.json │ │ │ │ │ ├── fr.json │ │ │ │ │ └── nl.json │ │ │ │ ├── ImageDetailedViewOverlay │ │ │ │ │ └── index.ts │ │ │ │ └── index.ts │ │ │ ├── Spinner │ │ │ │ └── index.ts │ │ │ ├── AuthGuard │ │ │ │ └── index.ts │ │ │ ├── Slider │ │ │ │ ├── hooks │ │ │ │ │ └── index.ts │ │ │ │ └── index.ts │ │ │ ├── InspectionGallery │ │ │ │ ├── InspectionGalleryTopBar │ │ │ │ │ ├── index.ts │ │ │ │ │ └── InspectionGalleryFilterPill │ │ │ │ │ │ ├── index.ts │ │ │ │ │ │ └── InspectionGalleryFilterPill.styles.ts │ │ │ │ ├── InspectionGalleryItemCard │ │ │ │ │ └── index.ts │ │ │ │ ├── index.ts │ │ │ │ ├── hooks │ │ │ │ │ ├── index.ts │ │ │ │ │ ├── useInspectionGalleryEmptyLabel.ts │ │ │ │ │ ├── useItemListFillers.ts │ │ │ │ │ └── useInspectionGalleryStyles.ts │ │ │ │ ├── translations │ │ │ │ │ ├── en.json │ │ │ │ │ ├── it.json │ │ │ │ │ ├── fr.json │ │ │ │ │ ├── de.json │ │ │ │ │ └── nl.json │ │ │ │ └── i18n.ts │ │ │ ├── SightOverlay │ │ │ │ └── index.ts │ │ │ ├── Checkbox │ │ │ │ └── index.ts │ │ │ ├── CreateInspection │ │ │ │ ├── index.ts │ │ │ │ ├── translations │ │ │ │ │ ├── en.json │ │ │ │ │ ├── fr.json │ │ │ │ │ ├── it.json │ │ │ │ │ ├── nl.json │ │ │ │ │ └── de.json │ │ │ │ └── CreateInspection.styles.ts │ │ │ ├── TextField │ │ │ │ └── index.ts │ │ │ ├── VehicleTypeAsset │ │ │ │ ├── index.ts │ │ │ │ └── VehicleTypeAsset.tsx │ │ │ ├── VehiclePartSelection │ │ │ │ ├── index.ts │ │ │ │ └── VehiclePartSelection.style.ts │ │ │ ├── VehicleTypeSelection │ │ │ │ ├── index.ts │ │ │ │ ├── translations │ │ │ │ │ ├── en.json │ │ │ │ │ ├── it.json │ │ │ │ │ ├── nl.json │ │ │ │ │ ├── fr.json │ │ │ │ │ └── de.json │ │ │ │ ├── VehicleTypeSelectionCard │ │ │ │ │ └── index.ts │ │ │ │ └── i18n.ts │ │ │ ├── BackdropDialog │ │ │ │ └── index.ts │ │ │ ├── LiveConfigAppProvider │ │ │ │ ├── index.ts │ │ │ │ └── LiveConfigAppProvider.styles.ts │ │ │ ├── SwitchButton │ │ │ │ └── index.ts │ │ │ ├── Button │ │ │ │ └── index.ts │ │ │ ├── IconAroundVehicle │ │ │ │ └── index.ts │ │ │ ├── VehicleDynamicWireframe │ │ │ │ ├── index.ts │ │ │ │ └── VehicleDynamicWireframe.style.ts │ │ │ ├── IconVerticalPosition │ │ │ │ ├── index.ts │ │ │ │ └── IconVerticalPosition.types.ts │ │ │ ├── TakePictureButton │ │ │ │ ├── index.ts │ │ │ │ └── TakePictureButton.styles.ts │ │ │ ├── VehicleWalkaroundIndicator │ │ │ │ ├── index.ts │ │ │ │ └── VehicleWalkaroundIndicator.types.ts │ │ │ └── RecordVideoButton │ │ │ │ └── index.ts │ │ └── icons │ │ │ └── index.ts │ ├── .gitignore │ ├── tsconfig.json │ ├── jest.config.js │ ├── tsconfig.build.production.json │ ├── tsconfig.build.development.json │ ├── test │ │ ├── components │ │ │ ├── Button │ │ │ │ └── mocks.tsx │ │ │ └── VehicleTypeAsset │ │ │ │ └── assets.test.ts │ │ └── icons │ │ │ └── assets.test.ts │ └── .eslintrc.js ├── inspection-capture-web │ ├── .eslintignore │ ├── src │ │ ├── DamageDisclosure │ │ │ ├── hooks │ │ │ │ └── index.ts │ │ │ ├── DamageDisclosureHUD │ │ │ │ ├── index.ts │ │ │ │ ├── DamageDisclosureHUDElements │ │ │ │ │ └── index.ts │ │ │ │ └── DamageDisclosureHUD.styles.ts │ │ │ └── index.ts │ │ ├── VideoCapture │ │ │ ├── hooks │ │ │ │ ├── useFrameSelection │ │ │ │ │ └── index.ts │ │ │ │ ├── useFastMovementsDetection │ │ │ │ │ └── index.ts │ │ │ │ └── index.ts │ │ │ ├── VideoCaptureHUD │ │ │ │ ├── index.ts │ │ │ │ ├── VideoCaptureTutorial │ │ │ │ │ └── index.ts │ │ │ │ ├── VideoCaptureRecording │ │ │ │ │ └── index.ts │ │ │ │ └── VideoCaptureHUD.styles.ts │ │ │ ├── VideoCapturePageLayout │ │ │ │ ├── PageLayoutItem │ │ │ │ │ └── index.ts │ │ │ │ ├── index.ts │ │ │ │ └── VideoCapturePageLayout.types.ts │ │ │ ├── index.ts │ │ │ ├── VideoCapturePermissions │ │ │ │ └── index.ts │ │ │ ├── VideoCaptureProcessing │ │ │ │ └── index.ts │ │ │ └── VideoCapture.styles.ts │ │ ├── PhotoCapture │ │ │ ├── PhotoCaptureHUD │ │ │ │ ├── hooks │ │ │ │ │ ├── index.ts │ │ │ │ │ └── usePhotoCaptureHUDStyle.ts │ │ │ │ ├── PhotoCaptureHUDElementsSight │ │ │ │ │ ├── SightGuideline │ │ │ │ │ │ ├── index.ts │ │ │ │ │ │ └── hooks.ts │ │ │ │ │ ├── AddDamageButton │ │ │ │ │ │ └── index.ts │ │ │ │ │ ├── SightSlider │ │ │ │ │ │ ├── index.ts │ │ │ │ │ │ └── hooks.ts │ │ │ │ │ └── index.ts │ │ │ │ ├── PhotoCaptureHUDElements │ │ │ │ │ └── index.ts │ │ │ │ ├── PhotoCaptureHUDSightTutorial │ │ │ │ │ └── index.ts │ │ │ │ ├── index.ts │ │ │ │ ├── PhotoCaptureHUDTutorial │ │ │ │ │ ├── index.ts │ │ │ │ │ └── hooks.ts │ │ │ │ └── PhotoCaptureHUD.styles.ts │ │ │ ├── errors.ts │ │ │ ├── index.ts │ │ │ ├── PhotoCapture.styles.ts │ │ │ └── hooks │ │ │ │ └── index.ts │ │ ├── assets │ │ │ └── index.ts │ │ ├── components │ │ │ ├── HUDButtons │ │ │ │ └── index.ts │ │ │ ├── CancelButton │ │ │ │ └── index.ts │ │ │ ├── ZoomOutShot │ │ │ │ ├── index.ts │ │ │ │ └── hooks.ts │ │ │ ├── Counter │ │ │ │ ├── index.ts │ │ │ │ ├── Counter.styles.ts │ │ │ │ └── Counter.tsx │ │ │ ├── HUDOverlay │ │ │ │ └── index.ts │ │ │ ├── OrientationEnforcer │ │ │ │ └── index.ts │ │ │ ├── SightTutorialButton │ │ │ │ ├── index.ts │ │ │ │ └── SightTutorialButton.styles.ts │ │ │ ├── PartSelection │ │ │ │ └── index.ts │ │ │ ├── CloseUpShot │ │ │ │ └── index.ts │ │ │ └── index.ts │ │ ├── errors.ts │ │ ├── index.ts │ │ └── hooks │ │ │ ├── index.ts │ │ │ ├── useColorBackground.ts │ │ │ ├── usePhotoCaptureImages.ts │ │ │ └── useEnforceOrientation.ts │ ├── .gitignore │ ├── tsconfig.json │ ├── jest.config.js │ ├── tsconfig.build.production.json │ ├── tsconfig.build.development.json │ └── .eslintrc.js └── types │ ├── .gitignore │ ├── src │ ├── theme │ │ ├── index.ts │ │ ├── utils.ts │ │ └── theme.ts │ ├── index.ts │ ├── state │ │ ├── index.ts │ │ ├── partOperation.ts │ │ └── renderedOutput.ts │ └── i18n.ts │ ├── tsconfig.build.development.json │ ├── tsconfig.build.production.json │ ├── .eslintignore │ ├── tsconfig.json │ ├── .eslintrc.js │ └── README.md ├── apps ├── demo-app │ ├── .eslintignore │ ├── src │ │ ├── translations │ │ │ ├── de.json │ │ │ ├── en.json │ │ │ ├── fr.json │ │ │ ├── it.json │ │ │ └── nl.json │ │ ├── pages │ │ │ ├── LoginPage │ │ │ │ ├── LoginPage.module.css │ │ │ │ ├── index.ts │ │ │ │ └── LoginPage.tsx │ │ │ ├── CaptureSelectionPage │ │ │ │ ├── CaptureSelectionPage.module.css │ │ │ │ ├── index.ts │ │ │ │ └── CaptureSelectionPage.tsx │ │ │ ├── CreateInspectionPage │ │ │ │ ├── CreateInspectionPage.module.css │ │ │ │ ├── index.ts │ │ │ │ └── CreateInspectionPage.tsx │ │ │ ├── VehicleTypeSelectionPage │ │ │ │ ├── VehicleTypeSelectionPage.module.css │ │ │ │ └── index.ts │ │ │ ├── PhotoCapturePage │ │ │ │ ├── index.ts │ │ │ │ └── PhotoCapturePage.module.css │ │ │ ├── DamageDisclosurePage │ │ │ │ ├── index.ts │ │ │ │ └── DamageDisclosurePage.module.css │ │ │ ├── index.ts │ │ │ └── pages.ts │ │ ├── react-app-env.d.ts │ │ ├── components │ │ │ ├── index.ts │ │ │ └── AppContainer.tsx │ │ ├── index.css │ │ ├── setupTests.ts │ │ ├── posthog.ts │ │ └── sentry.ts │ ├── public │ │ ├── robots.txt │ │ ├── favicon.ico │ │ ├── logo192.png │ │ ├── logo512.png │ │ ├── manifest.json │ │ └── index.html │ ├── tsconfig.build.json │ ├── tsconfig.json │ ├── jest.config.js │ ├── .eslintrc.js │ └── .gitignore └── demo-app-video │ ├── .eslintignore │ ├── src │ ├── pages │ │ ├── LoginPage │ │ │ ├── LoginPage.module.css │ │ │ ├── index.ts │ │ │ └── LoginPage.tsx │ │ ├── CreateInspectionPage │ │ │ ├── CreateInspectionPage.module.css │ │ │ ├── index.ts │ │ │ └── CreateInspectionPage.tsx │ │ ├── VideoCapturePage │ │ │ ├── index.ts │ │ │ ├── VideoCapturePage.module.css │ │ │ └── inspectionReport.ts │ │ ├── InspectionCompletePage │ │ │ ├── index.ts │ │ │ ├── InspectionCompletePage.module.css │ │ │ └── InspectionCompletePage.tsx │ │ ├── index.ts │ │ └── pages.ts │ ├── react-app-env.d.ts │ ├── components │ │ ├── index.ts │ │ └── AppContainer.tsx │ ├── translations │ │ ├── en.json │ │ ├── fr.json │ │ ├── it.json │ │ ├── nl.json │ │ └── de.json │ ├── setupTests.ts │ ├── index.css │ ├── posthog.ts │ └── sentry.ts │ ├── public │ ├── robots.txt │ ├── favicon.ico │ ├── logo192.png │ ├── logo512.png │ ├── manifest.json │ └── index.html │ ├── tsconfig.build.json │ ├── tsconfig.json │ ├── jest.config.js │ ├── .eslintrc.js │ └── .gitignore ├── .editorconfig ├── .yarnrc.yml ├── lerna.json ├── .gitignore └── .github └── workflows ├── build-demo-app.yml ├── code-quality.yml ├── build-documentation.yml └── build-demo-app-video.yml /.eslintignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | -------------------------------------------------------------------------------- /configs/test-utils/.npmignore: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /documentation/static/.nojekyll: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /packages/posthog/.eslintignore: -------------------------------------------------------------------------------- 1 | lib 2 | -------------------------------------------------------------------------------- /packages/sentry/.eslintignore: -------------------------------------------------------------------------------- 1 | lib 2 | -------------------------------------------------------------------------------- /packages/analytics/.eslintignore: -------------------------------------------------------------------------------- 1 | lib 2 | -------------------------------------------------------------------------------- /packages/monitoring/.eslintignore: -------------------------------------------------------------------------------- 1 | lib 2 | -------------------------------------------------------------------------------- /apps/demo-app/.eslintignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | -------------------------------------------------------------------------------- /apps/demo-app/src/translations/de.json: -------------------------------------------------------------------------------- 1 | {} 2 | -------------------------------------------------------------------------------- /apps/demo-app/src/translations/en.json: -------------------------------------------------------------------------------- 1 | {} 2 | -------------------------------------------------------------------------------- /apps/demo-app/src/translations/fr.json: -------------------------------------------------------------------------------- 1 | {} 2 | -------------------------------------------------------------------------------- /apps/demo-app/src/translations/it.json: -------------------------------------------------------------------------------- 1 | {} 2 | -------------------------------------------------------------------------------- /apps/demo-app/src/translations/nl.json: -------------------------------------------------------------------------------- 1 | {} 2 | -------------------------------------------------------------------------------- /configs/test-utils/.eslintignore: -------------------------------------------------------------------------------- 1 | index.ts 2 | -------------------------------------------------------------------------------- /documentation/.eslintignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | -------------------------------------------------------------------------------- /apps/demo-app-video/.eslintignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | -------------------------------------------------------------------------------- /apps/demo-app/src/pages/LoginPage/LoginPage.module.css: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /configs/test-utils/index.ts: -------------------------------------------------------------------------------- 1 | export * from './src'; 2 | -------------------------------------------------------------------------------- /documentation/license.md: -------------------------------------------------------------------------------- 1 | # Hello 2 | 3 | teset 4 | 5 | -------------------------------------------------------------------------------- /apps/demo-app-video/src/pages/LoginPage/LoginPage.module.css: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /documentation/src/utils/index.ts: -------------------------------------------------------------------------------- 1 | export * from './schemas'; 2 | -------------------------------------------------------------------------------- /packages/posthog/src/index.ts: -------------------------------------------------------------------------------- 1 | export * from './adapter'; 2 | -------------------------------------------------------------------------------- /packages/sentry/src/index.ts: -------------------------------------------------------------------------------- 1 | export * from './adapter'; 2 | -------------------------------------------------------------------------------- /configs/test-utils/src/expects/index.ts: -------------------------------------------------------------------------------- 1 | export * from './props'; 2 | -------------------------------------------------------------------------------- /packages/common/src/PreventExit/index.ts: -------------------------------------------------------------------------------- 1 | export * from './hooks'; 2 | -------------------------------------------------------------------------------- /packages/common/src/theme/default/index.ts: -------------------------------------------------------------------------------- 1 | export * from './palette'; 2 | -------------------------------------------------------------------------------- /packages/network/src/api/damage/index.ts: -------------------------------------------------------------------------------- 1 | export * from './requests'; 2 | -------------------------------------------------------------------------------- /packages/network/src/api/image/index.ts: -------------------------------------------------------------------------------- 1 | export * from './requests'; 2 | -------------------------------------------------------------------------------- /packages/network/src/api/pdf/index.ts: -------------------------------------------------------------------------------- 1 | export * from './requests'; 2 | -------------------------------------------------------------------------------- /packages/network/src/api/task/index.ts: -------------------------------------------------------------------------------- 1 | export * from './requests'; 2 | -------------------------------------------------------------------------------- /packages/network/src/api/vehicle/index.ts: -------------------------------------------------------------------------------- 1 | export * from './requests'; 2 | -------------------------------------------------------------------------------- /apps/demo-app/src/pages/CaptureSelectionPage/CaptureSelectionPage.module.css: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /apps/demo-app/src/pages/CreateInspectionPage/CreateInspectionPage.module.css: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /apps/demo-app/src/pages/LoginPage/index.ts: -------------------------------------------------------------------------------- 1 | export * from './LoginPage'; 2 | -------------------------------------------------------------------------------- /packages/camera-web/src/utils/index.ts: -------------------------------------------------------------------------------- 1 | export * from './errors.utils'; 2 | -------------------------------------------------------------------------------- /packages/common/test/__utils__/index.ts: -------------------------------------------------------------------------------- 1 | export * from './colors.utils'; 2 | -------------------------------------------------------------------------------- /packages/network/src/api/liveConfigs/index.ts: -------------------------------------------------------------------------------- 1 | export * from './requests'; 2 | -------------------------------------------------------------------------------- /packages/sights/src/lib/index.ts: -------------------------------------------------------------------------------- 1 | // @ts-ignore 2 | export * from './data'; 3 | -------------------------------------------------------------------------------- /apps/demo-app-video/src/pages/CreateInspectionPage/CreateInspectionPage.module.css: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /apps/demo-app-video/src/pages/LoginPage/index.ts: -------------------------------------------------------------------------------- 1 | export * from './LoginPage'; 2 | -------------------------------------------------------------------------------- /apps/demo-app/src/react-app-env.d.ts: -------------------------------------------------------------------------------- 1 | /// 2 | -------------------------------------------------------------------------------- /documentation/src/components/Sights/TopBar/index.ts: -------------------------------------------------------------------------------- 1 | export * from './TopBar'; 2 | -------------------------------------------------------------------------------- /packages/camera-web/src/hooks/index.ts: -------------------------------------------------------------------------------- 1 | export * from './useCameraPermission'; 2 | -------------------------------------------------------------------------------- /packages/camera-web/src/translations/en.json: -------------------------------------------------------------------------------- 1 | { 2 | "retry": "Retry" 3 | } 4 | -------------------------------------------------------------------------------- /packages/camera-web/src/translations/fr.json: -------------------------------------------------------------------------------- 1 | { 2 | "retry": "Réessayer" 3 | } 4 | -------------------------------------------------------------------------------- /packages/camera-web/src/translations/it.json: -------------------------------------------------------------------------------- 1 | { 2 | "retry": "Riprova" 3 | } 4 | -------------------------------------------------------------------------------- /packages/network/src/api/hooks/index.ts: -------------------------------------------------------------------------------- 1 | export * from './useInspectionPoll'; 2 | -------------------------------------------------------------------------------- /apps/demo-app-video/src/react-app-env.d.ts: -------------------------------------------------------------------------------- 1 | /// 2 | -------------------------------------------------------------------------------- /apps/demo-app/src/pages/VehicleTypeSelectionPage/VehicleTypeSelectionPage.module.css: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /documentation/src/components/Shared/CopyPopup/index.ts: -------------------------------------------------------------------------------- 1 | export * from './CopyPopup'; 2 | -------------------------------------------------------------------------------- /documentation/src/components/Shared/SearchBar/index.ts: -------------------------------------------------------------------------------- 1 | export * from './SearchBar'; 2 | -------------------------------------------------------------------------------- /packages/network/src/index.ts: -------------------------------------------------------------------------------- 1 | export * from './api'; 2 | export * from './auth'; 3 | -------------------------------------------------------------------------------- /apps/demo-app/src/pages/PhotoCapturePage/index.ts: -------------------------------------------------------------------------------- 1 | export * from './PhotoCapturePage'; 2 | -------------------------------------------------------------------------------- /configs/test-utils/src/__mocks__/imports/style.ts: -------------------------------------------------------------------------------- 1 | export {}; 2 | module.exports = {}; 3 | -------------------------------------------------------------------------------- /documentation/src/components/Icons/IconsTopBar/index.ts: -------------------------------------------------------------------------------- 1 | export * from './IconsTopBar'; 2 | -------------------------------------------------------------------------------- /documentation/src/components/Sights/LabelTable/index.ts: -------------------------------------------------------------------------------- 1 | export * from './LabelTable'; 2 | -------------------------------------------------------------------------------- /packages/analytics/src/index.ts: -------------------------------------------------------------------------------- 1 | export * from './adapters'; 2 | export * from './react'; 3 | -------------------------------------------------------------------------------- /packages/camera-web/src/translations/de.json: -------------------------------------------------------------------------------- 1 | { 2 | "retry": "Erneut versuchen" 3 | } 4 | -------------------------------------------------------------------------------- /packages/camera-web/src/translations/nl.json: -------------------------------------------------------------------------------- 1 | { 2 | "retry": "Opnieuw proberen" 3 | } 4 | -------------------------------------------------------------------------------- /packages/common/.eslintignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | .eslintrc.js 3 | jest.config.js 4 | lib 5 | -------------------------------------------------------------------------------- /packages/monitoring/src/index.ts: -------------------------------------------------------------------------------- 1 | export * from './adapters'; 2 | export * from './react'; 3 | -------------------------------------------------------------------------------- /apps/demo-app-video/src/pages/VideoCapturePage/index.ts: -------------------------------------------------------------------------------- 1 | export * from './VideoCapturePage'; 2 | -------------------------------------------------------------------------------- /apps/demo-app/src/pages/CaptureSelectionPage/index.ts: -------------------------------------------------------------------------------- 1 | export * from './CaptureSelectionPage'; 2 | -------------------------------------------------------------------------------- /apps/demo-app/src/pages/CreateInspectionPage/index.ts: -------------------------------------------------------------------------------- 1 | export * from './CreateInspectionPage'; 2 | -------------------------------------------------------------------------------- /apps/demo-app/src/pages/DamageDisclosurePage/index.ts: -------------------------------------------------------------------------------- 1 | export * from './DamageDisclosurePage'; 2 | -------------------------------------------------------------------------------- /documentation/src/components/Icons/IconCard/index.ts: -------------------------------------------------------------------------------- 1 | export { IconCard } from './IconCard'; 2 | -------------------------------------------------------------------------------- /packages/camera-web/.eslintignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | .eslintrc.js 3 | jest.config.js 4 | lib 5 | -------------------------------------------------------------------------------- /packages/common-ui-web/.eslintignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | .eslintrc.js 3 | jest.config.js 4 | lib 5 | -------------------------------------------------------------------------------- /packages/common-ui-web/src/index.ts: -------------------------------------------------------------------------------- 1 | export * from './components'; 2 | export * from './icons'; 3 | -------------------------------------------------------------------------------- /packages/common/src/i18n/index.ts: -------------------------------------------------------------------------------- 1 | export * from './utils'; 2 | export * from './translations'; 3 | -------------------------------------------------------------------------------- /apps/demo-app-video/src/pages/CreateInspectionPage/index.ts: -------------------------------------------------------------------------------- 1 | export * from './CreateInspectionPage'; 2 | -------------------------------------------------------------------------------- /configs/test-utils/src/__mocks__/imports/file.ts: -------------------------------------------------------------------------------- 1 | export {}; 2 | module.exports = 'test-file-stub'; 3 | -------------------------------------------------------------------------------- /documentation/docs/v3-docs/apis/_category_.json: -------------------------------------------------------------------------------- 1 | { 2 | "label": "APIs", 3 | "position": 2 4 | } 5 | -------------------------------------------------------------------------------- /documentation/src/components/ConfigValidator/ConfigImport/index.ts: -------------------------------------------------------------------------------- 1 | export * from './ConfigImport'; 2 | -------------------------------------------------------------------------------- /documentation/src/components/Home/HomeHeader/index.ts: -------------------------------------------------------------------------------- 1 | export { HomeHeader } from './HomeHeader'; 2 | -------------------------------------------------------------------------------- /documentation/src/components/Sights/SightCard/index.ts: -------------------------------------------------------------------------------- 1 | export { SightCard } from './SightCard'; 2 | -------------------------------------------------------------------------------- /packages/common-ui-web/src/components/CaptureSelection/index.ts: -------------------------------------------------------------------------------- 1 | export * from './CaptureSelection'; 2 | -------------------------------------------------------------------------------- /packages/network/src/api/pricing/index.ts: -------------------------------------------------------------------------------- 1 | export * from './requests'; 2 | export * from './types'; 3 | -------------------------------------------------------------------------------- /apps/demo-app-video/src/pages/InspectionCompletePage/index.ts: -------------------------------------------------------------------------------- 1 | export * from './InspectionCompletePage'; 2 | -------------------------------------------------------------------------------- /apps/demo-app/src/pages/VehicleTypeSelectionPage/index.ts: -------------------------------------------------------------------------------- 1 | export * from './VehicleTypeSelectionPage'; 2 | -------------------------------------------------------------------------------- /configs/test-utils/src/__mocks__/jwt-decode.ts: -------------------------------------------------------------------------------- 1 | export = { 2 | jwtDecode: jest.fn(() => ({})), 3 | }; 4 | -------------------------------------------------------------------------------- /documentation/docs/v3-docs/guides/_category_.json: -------------------------------------------------------------------------------- 1 | { 2 | "label": "Guides", 3 | "position": 1 4 | } 5 | -------------------------------------------------------------------------------- /documentation/src/components/Home/HomeFeatures/index.ts: -------------------------------------------------------------------------------- 1 | export { HomeFeatures } from './HomeFeatures'; 2 | -------------------------------------------------------------------------------- /packages/analytics/src/adapters/index.ts: -------------------------------------------------------------------------------- 1 | export * from './adapter'; 2 | export * from './emptyAdapter'; 3 | -------------------------------------------------------------------------------- /packages/camera-web/src/SimpleCameraHUD/index.ts: -------------------------------------------------------------------------------- 1 | export { SimpleCameraHUD } from './SimpleCameraHUD'; 2 | -------------------------------------------------------------------------------- /packages/common-ui-web/src/components/Login/index.ts: -------------------------------------------------------------------------------- 1 | export { Login, type LoginProps } from './Login'; 2 | -------------------------------------------------------------------------------- /packages/inspection-capture-web/.eslintignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | .eslintrc.js 3 | jest.config.js 4 | lib 5 | -------------------------------------------------------------------------------- /apps/demo-app/public/robots.txt: -------------------------------------------------------------------------------- 1 | # https://www.robotstxt.org/robotstxt.html 2 | User-agent: * 3 | Disallow: 4 | -------------------------------------------------------------------------------- /documentation/src/components/Home/index.ts: -------------------------------------------------------------------------------- 1 | export * from './HomeFeatures'; 2 | export * from './HomeHeader'; 3 | -------------------------------------------------------------------------------- /documentation/src/components/Icons/index.ts: -------------------------------------------------------------------------------- 1 | export * from './IconCard'; 2 | export * from './IconsTopBar'; 3 | -------------------------------------------------------------------------------- /documentation/src/components/Shared/index.ts: -------------------------------------------------------------------------------- 1 | export * from './CopyPopup'; 2 | export * from './SearchBar'; 3 | -------------------------------------------------------------------------------- /packages/common-ui-web/src/components/DynamicSVG/hooks/utils/index.ts: -------------------------------------------------------------------------------- 1 | export * from './transformInlineCss'; 2 | -------------------------------------------------------------------------------- /packages/common-ui-web/src/components/ImageDetailedView/translations/en.json: -------------------------------------------------------------------------------- 1 | { 2 | "retake": "Retake" 3 | } 4 | -------------------------------------------------------------------------------- /packages/common-ui-web/src/components/ImageDetailedView/translations/it.json: -------------------------------------------------------------------------------- 1 | { 2 | "retake": "Ripeti" 3 | } 4 | -------------------------------------------------------------------------------- /packages/common/.gitignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | coverage 3 | .eslintcache 4 | yarn-error.log 5 | .idea 6 | lib 7 | -------------------------------------------------------------------------------- /packages/posthog/.gitignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | coverage 3 | .eslintcache 4 | yarn-error.log 5 | .idea 6 | lib 7 | -------------------------------------------------------------------------------- /packages/sentry/.gitignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | coverage 3 | .eslintcache 4 | yarn-error.log 5 | .idea 6 | lib 7 | -------------------------------------------------------------------------------- /apps/demo-app-video/public/robots.txt: -------------------------------------------------------------------------------- 1 | # https://www.robotstxt.org/robotstxt.html 2 | User-agent: * 3 | Disallow: 4 | -------------------------------------------------------------------------------- /apps/demo-app/public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/monkvision/monkjs/HEAD/apps/demo-app/public/favicon.ico -------------------------------------------------------------------------------- /apps/demo-app/public/logo192.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/monkvision/monkjs/HEAD/apps/demo-app/public/logo192.png -------------------------------------------------------------------------------- /apps/demo-app/public/logo512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/monkvision/monkjs/HEAD/apps/demo-app/public/logo512.png -------------------------------------------------------------------------------- /configs/test-utils/.gitignore: -------------------------------------------------------------------------------- 1 | dist 2 | node_modules 3 | coverage 4 | .eslintcache 5 | yarn-error.log 6 | .idea 7 | -------------------------------------------------------------------------------- /packages/camera-web/.gitignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | coverage 3 | .eslintcache 4 | yarn-error.log 5 | .idea 6 | lib 7 | -------------------------------------------------------------------------------- /packages/common-ui-web/.gitignore: -------------------------------------------------------------------------------- 1 | lib 2 | node_modules 3 | coverage 4 | .eslintcache 5 | yarn-error.log 6 | .idea 7 | -------------------------------------------------------------------------------- /packages/common-ui-web/src/components/ImageDetailedView/translations/de.json: -------------------------------------------------------------------------------- 1 | { 2 | "retake": "Wiederholen" 3 | } 4 | -------------------------------------------------------------------------------- /packages/common-ui-web/src/components/ImageDetailedView/translations/fr.json: -------------------------------------------------------------------------------- 1 | { 2 | "retake": "Reprendre" 3 | } 4 | -------------------------------------------------------------------------------- /packages/common-ui-web/src/components/Spinner/index.ts: -------------------------------------------------------------------------------- 1 | export { Spinner, type SpinnerProps } from './Spinner'; 2 | -------------------------------------------------------------------------------- /packages/inspection-capture-web/src/DamageDisclosure/hooks/index.ts: -------------------------------------------------------------------------------- 1 | export * from './useDamageDisclosureState'; 2 | -------------------------------------------------------------------------------- /packages/types/.gitignore: -------------------------------------------------------------------------------- 1 | dist 2 | node_modules 3 | coverage 4 | .eslintcache 5 | yarn-error.log 6 | .idea 7 | lib 8 | -------------------------------------------------------------------------------- /documentation/docs/v3-docs/apis/javascript/_category_.json: -------------------------------------------------------------------------------- 1 | { 2 | "label": "JavaScript", 3 | "position": 1 4 | } 5 | -------------------------------------------------------------------------------- /documentation/docs/v3-docs/apis/react-native/_category_.json: -------------------------------------------------------------------------------- 1 | { 2 | "label": "React Native", 3 | "position": 2 4 | } 5 | -------------------------------------------------------------------------------- /documentation/src/components/ConfigValidator/ConfigValidateResults/index.ts: -------------------------------------------------------------------------------- 1 | export * from './ConfigValidateResults'; 2 | -------------------------------------------------------------------------------- /documentation/static/img/monkjs.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/monkvision/monkjs/HEAD/documentation/static/img/monkjs.png -------------------------------------------------------------------------------- /packages/analytics/.gitignore: -------------------------------------------------------------------------------- 1 | dist 2 | node_modules 3 | coverage 4 | .eslintcache 5 | yarn-error.log 6 | .idea 7 | lib 8 | -------------------------------------------------------------------------------- /packages/common-ui-web/src/components/AuthGuard/index.ts: -------------------------------------------------------------------------------- 1 | export { AuthGuard, type AuthGuardProps } from './AuthGuard'; 2 | -------------------------------------------------------------------------------- /packages/common-ui-web/src/components/ImageDetailedView/translations/nl.json: -------------------------------------------------------------------------------- 1 | { 2 | "retake": "Opnieuw nemen" 3 | } 4 | -------------------------------------------------------------------------------- /packages/inspection-capture-web/src/VideoCapture/hooks/useFrameSelection/index.ts: -------------------------------------------------------------------------------- 1 | export * from './useFrameSelection'; 2 | -------------------------------------------------------------------------------- /packages/monitoring/.gitignore: -------------------------------------------------------------------------------- 1 | dist 2 | node_modules 3 | coverage 4 | .eslintcache 5 | yarn-error.log 6 | .idea 7 | lib 8 | -------------------------------------------------------------------------------- /packages/network/.gitignore: -------------------------------------------------------------------------------- 1 | dist 2 | node_modules 3 | coverage 4 | .eslintcache 5 | yarn-error.log 6 | .idea 7 | lib 8 | -------------------------------------------------------------------------------- /documentation/static/img/favicon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/monkvision/monkjs/HEAD/documentation/static/img/favicon.png -------------------------------------------------------------------------------- /packages/inspection-capture-web/.gitignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | coverage 3 | .eslintcache 4 | yarn-error.log 5 | .idea 6 | lib 7 | -------------------------------------------------------------------------------- /packages/inspection-capture-web/src/PhotoCapture/PhotoCaptureHUD/hooks/index.ts: -------------------------------------------------------------------------------- 1 | export * from './usePhotoCaptureHUDStyle'; 2 | -------------------------------------------------------------------------------- /packages/inspection-capture-web/src/assets/index.ts: -------------------------------------------------------------------------------- 1 | export * from './crosshair.asset'; 2 | export * from './arrows.asset'; 3 | -------------------------------------------------------------------------------- /apps/demo-app-video/public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/monkvision/monkjs/HEAD/apps/demo-app-video/public/favicon.ico -------------------------------------------------------------------------------- /apps/demo-app-video/public/logo192.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/monkvision/monkjs/HEAD/apps/demo-app-video/public/logo192.png -------------------------------------------------------------------------------- /apps/demo-app-video/public/logo512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/monkvision/monkjs/HEAD/apps/demo-app-video/public/logo512.png -------------------------------------------------------------------------------- /apps/demo-app/src/components/index.ts: -------------------------------------------------------------------------------- 1 | export * from './App'; 2 | export * from './AppRouter'; 3 | export * from './AppContainer'; 4 | -------------------------------------------------------------------------------- /apps/demo-app/tsconfig.build.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "./tsconfig.json", 3 | "include": ["src"], 4 | "exclude": ["test"] 5 | } 6 | -------------------------------------------------------------------------------- /documentation/babel.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | presets: [require.resolve('@docusaurus/core/lib/babel/preset')], 3 | }; 4 | -------------------------------------------------------------------------------- /packages/analytics/src/react/index.ts: -------------------------------------------------------------------------------- 1 | export * from './context'; 2 | export * from './provider'; 3 | export * from './hooks'; 4 | -------------------------------------------------------------------------------- /packages/camera-web/test/mocks/index.ts: -------------------------------------------------------------------------------- 1 | export * from './getUserMedia.mock'; 2 | export * from './internalMonitoringConfig.mock'; 3 | -------------------------------------------------------------------------------- /packages/common-ui-web/src/components/Slider/hooks/index.ts: -------------------------------------------------------------------------------- 1 | export * from './useSlider'; 2 | export * from './useSliderStyle'; 3 | -------------------------------------------------------------------------------- /packages/monitoring/src/react/index.ts: -------------------------------------------------------------------------------- 1 | export * from './context'; 2 | export * from './provider'; 3 | export * from './hooks'; 4 | -------------------------------------------------------------------------------- /packages/sights/.eslintignore: -------------------------------------------------------------------------------- 1 | dist 2 | node_modules 3 | .eslintrc.js 4 | jest.config.js 5 | dist 6 | ./lib 7 | src/lib/data/** 8 | -------------------------------------------------------------------------------- /documentation/src/components/ConfigValidator/index.ts: -------------------------------------------------------------------------------- 1 | export * from './ConfigImport'; 2 | export * from './ConfigValidateResults'; 3 | -------------------------------------------------------------------------------- /documentation/svgo.config.js: -------------------------------------------------------------------------------- 1 | const config = require('@monkvision/svgo-config'); 2 | 3 | module.exports = { 4 | ...config, 5 | }; 6 | -------------------------------------------------------------------------------- /packages/common-ui-web/src/components/ImageDetailedView/ImageDetailedViewOverlay/index.ts: -------------------------------------------------------------------------------- 1 | export * from './ImageDetailedViewOverlay'; 2 | -------------------------------------------------------------------------------- /packages/common-ui-web/src/components/InspectionGallery/InspectionGalleryTopBar/index.ts: -------------------------------------------------------------------------------- 1 | export * from './InspectionGalleryTopBar'; 2 | -------------------------------------------------------------------------------- /packages/common-ui-web/src/components/SightOverlay/index.ts: -------------------------------------------------------------------------------- 1 | export { SightOverlay, type SightOverlayProps } from './SightOverlay'; 2 | -------------------------------------------------------------------------------- /packages/inspection-capture-web/src/components/HUDButtons/index.ts: -------------------------------------------------------------------------------- 1 | export { HUDButtons, type HUDButtonsProps } from './HUDButtons'; 2 | -------------------------------------------------------------------------------- /packages/sights/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "@monkvision/typescript-config/tsconfig.json", 3 | "include": ["src", "test"] 4 | } 5 | -------------------------------------------------------------------------------- /apps/demo-app-video/src/components/index.ts: -------------------------------------------------------------------------------- 1 | export * from './App'; 2 | export * from './AppRouter'; 3 | export * from './AppContainer'; 4 | -------------------------------------------------------------------------------- /apps/demo-app-video/tsconfig.build.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "./tsconfig.json", 3 | "include": ["src"], 4 | "exclude": ["test"] 5 | } 6 | -------------------------------------------------------------------------------- /apps/demo-app/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "@monkvision/typescript-config/tsconfig.react.json", 3 | "include": ["src", "test"] 4 | } 5 | -------------------------------------------------------------------------------- /configs/test-utils/jest.config.js: -------------------------------------------------------------------------------- 1 | const { react } = require('@monkvision/jest-config'); 2 | 3 | module.exports = { 4 | ...react, 5 | }; 6 | -------------------------------------------------------------------------------- /documentation/src/components/Sights/index.ts: -------------------------------------------------------------------------------- 1 | export * from './SightCard'; 2 | export * from './TopBar'; 3 | export * from './LabelTable'; 4 | -------------------------------------------------------------------------------- /packages/common-ui-web/src/components/InspectionGallery/InspectionGalleryItemCard/index.ts: -------------------------------------------------------------------------------- 1 | export * from './InspectionGalleryItemCard'; 2 | -------------------------------------------------------------------------------- /packages/common/src/apps/index.ts: -------------------------------------------------------------------------------- 1 | export * from './appState'; 2 | export * from './appStateProvider'; 3 | export * from './searchParams'; 4 | -------------------------------------------------------------------------------- /packages/inspection-capture-web/src/components/CancelButton/index.ts: -------------------------------------------------------------------------------- 1 | export { CancelButton, type CancelButtonProps } from './CancelButton'; 2 | -------------------------------------------------------------------------------- /packages/inspection-capture-web/src/components/ZoomOutShot/index.ts: -------------------------------------------------------------------------------- 1 | export { ZoomOutShot, type ZoomOutShotProps } from './ZoomOutShot'; 2 | -------------------------------------------------------------------------------- /apps/demo-app-video/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "@monkvision/typescript-config/tsconfig.react.json", 3 | "include": ["src", "test"] 4 | } 5 | -------------------------------------------------------------------------------- /configs/test-utils/src/index.ts: -------------------------------------------------------------------------------- 1 | export * from './expects'; 2 | export * from './dom'; 3 | export * from './styles'; 4 | export * from './async'; 5 | -------------------------------------------------------------------------------- /documentation/static/img/monkjs-social-card.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/monkvision/monkjs/HEAD/documentation/static/img/monkjs-social-card.png -------------------------------------------------------------------------------- /packages/analytics/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "@monkvision/typescript-config/tsconfig.react.json", 3 | "include": ["src", "test"] 4 | } 5 | -------------------------------------------------------------------------------- /packages/camera-web/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "@monkvision/typescript-config/tsconfig.react.json", 3 | "include": ["src", "test"] 4 | } 5 | -------------------------------------------------------------------------------- /packages/common-ui-web/src/components/Checkbox/index.ts: -------------------------------------------------------------------------------- 1 | export { Checkbox } from './Checkbox'; 2 | export { type CheckboxProps } from './hooks'; 3 | -------------------------------------------------------------------------------- /packages/common-ui-web/src/icons/index.ts: -------------------------------------------------------------------------------- 1 | export { Icon, type IconProps } from './Icon'; 2 | export { iconNames, type IconName } from './names'; 3 | -------------------------------------------------------------------------------- /packages/common/src/i18n/translations/index.ts: -------------------------------------------------------------------------------- 1 | export * from './damageTypes'; 2 | export * from './vehicleParts'; 3 | export * from './image'; 4 | -------------------------------------------------------------------------------- /packages/common/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "@monkvision/typescript-config/tsconfig.react.json", 3 | "include": ["src", "test"] 4 | } 5 | -------------------------------------------------------------------------------- /packages/monitoring/src/adapters/index.ts: -------------------------------------------------------------------------------- 1 | export * from './adapter'; 2 | export * from './emptyAdapter'; 3 | export * from './debugAdapter'; 4 | -------------------------------------------------------------------------------- /packages/monitoring/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "@monkvision/typescript-config/tsconfig.react.json", 3 | "include": ["src", "test"] 4 | } 5 | -------------------------------------------------------------------------------- /packages/network/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "@monkvision/typescript-config/tsconfig.react.json", 3 | "include": ["src", "test"] 4 | } 5 | -------------------------------------------------------------------------------- /packages/posthog/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "@monkvision/typescript-config/tsconfig.react.json", 3 | "include": ["src", "test"] 4 | } 5 | -------------------------------------------------------------------------------- /packages/sentry/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "@monkvision/typescript-config/tsconfig.react.json", 3 | "include": ["src", "test"] 4 | } 5 | -------------------------------------------------------------------------------- /packages/sights/.gitignore: -------------------------------------------------------------------------------- 1 | /dist 2 | /lib 3 | /node_modules 4 | /coverage 5 | /.eslintcache 6 | /yarn-error.log 7 | /.idea 8 | /src/lib/data 9 | -------------------------------------------------------------------------------- /configs/test-utils/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "@monkvision/typescript-config/tsconfig.react.json", 3 | "include": ["src", "index.ts"] 4 | } 5 | -------------------------------------------------------------------------------- /packages/common-ui-web/src/components/CreateInspection/index.ts: -------------------------------------------------------------------------------- 1 | export { CreateInspection, type CreateInspectionProps } from './CreateInspection'; 2 | -------------------------------------------------------------------------------- /packages/common-ui-web/src/components/TextField/index.ts: -------------------------------------------------------------------------------- 1 | export { TextField } from './TextField'; 2 | export { type TextFieldProps } from './hooks'; 3 | -------------------------------------------------------------------------------- /packages/common-ui-web/src/components/VehicleTypeAsset/index.ts: -------------------------------------------------------------------------------- 1 | export { VehicleTypeAsset, type VehicleTypeAssetProps } from './VehicleTypeAsset'; 2 | -------------------------------------------------------------------------------- /packages/inspection-capture-web/src/components/Counter/index.ts: -------------------------------------------------------------------------------- 1 | export { Counter } from './Counter'; 2 | export { type CounterProps } from './hooks'; 3 | -------------------------------------------------------------------------------- /packages/sights/.prettierignore: -------------------------------------------------------------------------------- 1 | dist 2 | node_modules 3 | .eslintrc.js 4 | jest.config.js 5 | dist 6 | ./lib 7 | src/lib/** 8 | !src/lib/types.ts 9 | -------------------------------------------------------------------------------- /packages/types/src/theme/index.ts: -------------------------------------------------------------------------------- 1 | export * from './colors'; 2 | export * from './palette'; 3 | export * from './utils'; 4 | export * from './theme'; 5 | -------------------------------------------------------------------------------- /packages/types/tsconfig.build.development.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "./tsconfig.json", 3 | "compilerOptions": { 4 | "outDir": "lib" 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /packages/common-ui-web/src/components/Slider/index.ts: -------------------------------------------------------------------------------- 1 | export { Slider } from './Slider'; 2 | export { type SliderProps } from './hooks/useSliderStyle'; 3 | -------------------------------------------------------------------------------- /packages/inspection-capture-web/src/PhotoCapture/PhotoCaptureHUD/PhotoCaptureHUDElementsSight/SightGuideline/index.ts: -------------------------------------------------------------------------------- 1 | export * from './SightGuideline'; 2 | -------------------------------------------------------------------------------- /packages/inspection-capture-web/src/VideoCapture/VideoCaptureHUD/index.ts: -------------------------------------------------------------------------------- 1 | export { VideoCaptureHUD, type VideoCaptureHUDProps } from './VideoCaptureHUD'; 2 | -------------------------------------------------------------------------------- /configs/jest-config/index.js: -------------------------------------------------------------------------------- 1 | const base = require('./base'); 2 | const react = require('./react'); 3 | 4 | module.exports = { 5 | base, 6 | react, 7 | }; 8 | -------------------------------------------------------------------------------- /packages/analytics/jest.config.js: -------------------------------------------------------------------------------- 1 | const { react } = require('@monkvision/jest-config'); 2 | 3 | module.exports = { 4 | ...react({ monorepo: true }), 5 | }; 6 | -------------------------------------------------------------------------------- /packages/camera-web/jest.config.js: -------------------------------------------------------------------------------- 1 | const { react } = require('@monkvision/jest-config'); 2 | 3 | module.exports = { 4 | ...react({ monorepo: true }), 5 | }; 6 | -------------------------------------------------------------------------------- /packages/common-ui-web/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "@monkvision/typescript-config/tsconfig.react.json", 3 | "include": ["src", "test", "types"] 4 | } 5 | -------------------------------------------------------------------------------- /packages/common/jest.config.js: -------------------------------------------------------------------------------- 1 | const { react } = require('@monkvision/jest-config'); 2 | 3 | module.exports = { 4 | ...react({ monorepo: true }), 5 | }; 6 | -------------------------------------------------------------------------------- /packages/inspection-capture-web/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "@monkvision/typescript-config/tsconfig.react.json", 3 | "include": ["src", "test"] 4 | } 5 | -------------------------------------------------------------------------------- /packages/monitoring/jest.config.js: -------------------------------------------------------------------------------- 1 | const { react } = require('@monkvision/jest-config'); 2 | 3 | module.exports = { 4 | ...react({ monorepo: true }), 5 | }; 6 | -------------------------------------------------------------------------------- /packages/common-ui-web/jest.config.js: -------------------------------------------------------------------------------- 1 | const { react } = require('@monkvision/jest-config'); 2 | 3 | module.exports = { 4 | ...react({ monorepo: true }), 5 | }; 6 | -------------------------------------------------------------------------------- /packages/common-ui-web/src/components/InspectionGallery/InspectionGalleryTopBar/InspectionGalleryFilterPill/index.ts: -------------------------------------------------------------------------------- 1 | export * from './InspectionGalleryFilterPill'; 2 | -------------------------------------------------------------------------------- /packages/common-ui-web/src/components/VehiclePartSelection/index.ts: -------------------------------------------------------------------------------- 1 | export { VehiclePartSelection, type VehiclePartSelectionProps } from './VehiclePartSelection'; 2 | -------------------------------------------------------------------------------- /packages/common-ui-web/src/components/VehicleTypeSelection/index.ts: -------------------------------------------------------------------------------- 1 | export { VehicleTypeSelection, type VehicleTypeSelectionProps } from './VehicleTypeSelection'; 2 | -------------------------------------------------------------------------------- /packages/inspection-capture-web/src/components/HUDOverlay/index.ts: -------------------------------------------------------------------------------- 1 | export { HUDOverlay } from './HUDOverlay'; 2 | export { type HUDOverlayProps } from './hooks'; 3 | -------------------------------------------------------------------------------- /packages/inspection-capture-web/src/errors.ts: -------------------------------------------------------------------------------- 1 | export enum PhotoCaptureErrorName { 2 | MISSING_TASK_IN_INSPECTION = 'PhotoCaptureMissingTaskInInspection', 3 | } 4 | -------------------------------------------------------------------------------- /packages/common-ui-web/src/components/BackdropDialog/index.ts: -------------------------------------------------------------------------------- 1 | export { BackdropDialog } from './BackdropDialog'; 2 | export { type BackdropDialogProps } from './hooks'; 3 | -------------------------------------------------------------------------------- /packages/common-ui-web/src/components/LiveConfigAppProvider/index.ts: -------------------------------------------------------------------------------- 1 | export { LiveConfigAppProvider, type LiveConfigAppProviderProps } from './LiveConfigAppProvider'; 2 | -------------------------------------------------------------------------------- /packages/inspection-capture-web/src/components/OrientationEnforcer/index.ts: -------------------------------------------------------------------------------- 1 | export { OrientationEnforcer, type OrientationEnforcerProps } from './OrientationEnforcer'; 2 | -------------------------------------------------------------------------------- /packages/inspection-capture-web/src/components/SightTutorialButton/index.ts: -------------------------------------------------------------------------------- 1 | export { SightTutorialButton, type SightTutorialButtonProps } from './SightTutorialButton'; 2 | -------------------------------------------------------------------------------- /packages/network/src/auth/index.ts: -------------------------------------------------------------------------------- 1 | export * from './token'; 2 | export * from './hooks'; 3 | export * from './authProvider'; 4 | export * from './authProvider.types'; 5 | -------------------------------------------------------------------------------- /packages/types/tsconfig.build.production.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "./tsconfig.build.development.json", 3 | "compilerOptions": { 4 | "sourceMap": false 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /packages/analytics/tsconfig.build.production.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "./tsconfig.build.development.json", 3 | "compilerOptions": { 4 | "sourceMap": false 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /packages/camera-web/src/Camera/hooks/utils/index.ts: -------------------------------------------------------------------------------- 1 | export * from './getCanvasHandle'; 2 | export * from './getMediaContraints'; 3 | export * from './analyzeCameraDevices'; 4 | -------------------------------------------------------------------------------- /packages/camera-web/tsconfig.build.production.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "./tsconfig.build.development.json", 3 | "compilerOptions": { 4 | "sourceMap": false 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /packages/common/tsconfig.build.production.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "./tsconfig.build.development.json", 3 | "compilerOptions": { 4 | "sourceMap": false 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /packages/inspection-capture-web/jest.config.js: -------------------------------------------------------------------------------- 1 | const { react } = require('@monkvision/jest-config'); 2 | 3 | module.exports = { 4 | ...react({ monorepo: true }), 5 | }; 6 | -------------------------------------------------------------------------------- /packages/inspection-capture-web/src/PhotoCapture/errors.ts: -------------------------------------------------------------------------------- 1 | export enum PhotoCaptureErrorName { 2 | MISSING_TASK_IN_INSPECTION = 'PhotoCaptureMissingTaskInInspection', 3 | } 4 | -------------------------------------------------------------------------------- /packages/inspection-capture-web/src/VideoCapture/VideoCapturePageLayout/PageLayoutItem/index.ts: -------------------------------------------------------------------------------- 1 | export { PageLayoutItem, type PageLayoutItemProps } from './PageLayoutItem'; 2 | -------------------------------------------------------------------------------- /packages/monitoring/tsconfig.build.production.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "./tsconfig.build.development.json", 3 | "compilerOptions": { 4 | "sourceMap": false 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /packages/network/tsconfig.build.production.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "./tsconfig.build.development.json", 3 | "compilerOptions": { 4 | "sourceMap": false 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /packages/posthog/tsconfig.build.production.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "./tsconfig.build.development.json", 3 | "compilerOptions": { 4 | "sourceMap": false 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /packages/sentry/tsconfig.build.production.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "./tsconfig.build.development.json", 3 | "compilerOptions": { 4 | "sourceMap": false 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /packages/sights/tsconfig.build.production.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "./tsconfig.build.development.json", 3 | "compilerOptions": { 4 | "sourceMap": false 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /apps/demo-app-video/src/translations/en.json: -------------------------------------------------------------------------------- 1 | { 2 | "inspection-complete": { 3 | "thank-message": "Thank you for taking the time to complete the inspection." 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /apps/demo-app-video/src/translations/fr.json: -------------------------------------------------------------------------------- 1 | { 2 | "inspection-complete": { 3 | "thank-message": "Merci d'avoir pris le temps pour compléter l'inspection." 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /apps/demo-app-video/src/translations/it.json: -------------------------------------------------------------------------------- 1 | { 2 | "inspection-complete": { 3 | "thank-message": "Grazie per aver dedicato del tempo a completare l'ispezione." 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /documentation/docs/v3-docs/_category_.json: -------------------------------------------------------------------------------- 1 | { 2 | "label": "V3 Docs", 3 | "position": 13, 4 | "link": { 5 | "type": "doc", 6 | "id": "v3-docs/index" 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /packages/common-ui-web/tsconfig.build.production.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "./tsconfig.build.development.json", 3 | "compilerOptions": { 4 | "sourceMap": false 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /packages/common/tsconfig.build.development.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "./tsconfig.json", 3 | "compilerOptions": { 4 | "outDir": "lib" 5 | }, 6 | "exclude": ["test"] 7 | } 8 | -------------------------------------------------------------------------------- /packages/network/tsconfig.build.development.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "./tsconfig.json", 3 | "compilerOptions": { 4 | "outDir": "lib" 5 | }, 6 | "exclude": ["test"] 7 | } 8 | -------------------------------------------------------------------------------- /packages/posthog/tsconfig.build.development.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "./tsconfig.json", 3 | "compilerOptions": { 4 | "outDir": "lib" 5 | }, 6 | "exclude": ["test"] 7 | } 8 | -------------------------------------------------------------------------------- /packages/sentry/tsconfig.build.development.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "./tsconfig.json", 3 | "compilerOptions": { 4 | "outDir": "lib" 5 | }, 6 | "exclude": ["test"] 7 | } 8 | -------------------------------------------------------------------------------- /apps/demo-app-video/src/translations/nl.json: -------------------------------------------------------------------------------- 1 | { 2 | "inspection-complete": { 3 | "thank-message": "Bedankt voor het nemen van de tijd om de inspectie te voltooien." 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /packages/analytics/tsconfig.build.development.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "./tsconfig.json", 3 | "compilerOptions": { 4 | "outDir": "lib" 5 | }, 6 | "exclude": ["test"] 7 | } 8 | -------------------------------------------------------------------------------- /packages/camera-web/src/index.ts: -------------------------------------------------------------------------------- 1 | export * from './Camera'; 2 | export * from './SimpleCameraHUD'; 3 | export * from './hooks'; 4 | export * from './utils'; 5 | export * from './i18n'; 6 | -------------------------------------------------------------------------------- /packages/camera-web/tsconfig.build.development.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "./tsconfig.json", 3 | "compilerOptions": { 4 | "outDir": "lib" 5 | }, 6 | "exclude": ["test"] 7 | } 8 | -------------------------------------------------------------------------------- /packages/common-ui-web/src/components/ImageDetailedView/index.ts: -------------------------------------------------------------------------------- 1 | export { ImageDetailedView } from './ImageDetailedView'; 2 | export { type ImageDetailedViewProps } from './hooks'; 3 | -------------------------------------------------------------------------------- /packages/common-ui-web/src/components/SwitchButton/index.ts: -------------------------------------------------------------------------------- 1 | export { SwitchButton } from './SwitchButton'; 2 | export { type SwitchButtonProps, type SwitchButtonSize } from './hooks'; 3 | -------------------------------------------------------------------------------- /packages/common/src/theme/index.ts: -------------------------------------------------------------------------------- 1 | export * from './context'; 2 | export * from './default'; 3 | export * from './hooks'; 4 | export * from './provider'; 5 | export * from './theme'; 6 | -------------------------------------------------------------------------------- /packages/inspection-capture-web/src/components/PartSelection/index.ts: -------------------------------------------------------------------------------- 1 | export { PartSelection } from './PartSelection'; 2 | export { type PartSelectionProps } from './PartSelection'; 3 | -------------------------------------------------------------------------------- /packages/inspection-capture-web/src/index.ts: -------------------------------------------------------------------------------- 1 | export * from './PhotoCapture'; 2 | export * from './VideoCapture'; 3 | export * from './DamageDisclosure'; 4 | export * from './i18n'; 5 | -------------------------------------------------------------------------------- /packages/monitoring/tsconfig.build.development.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "./tsconfig.json", 3 | "compilerOptions": { 4 | "outDir": "lib" 5 | }, 6 | "exclude": ["test"] 7 | } 8 | -------------------------------------------------------------------------------- /packages/sights/tsconfig.build.development.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "./tsconfig.json", 3 | "compilerOptions": { 4 | "outDir": "lib" 5 | }, 6 | "include": ["src/lib"] 7 | } 8 | -------------------------------------------------------------------------------- /packages/common-ui-web/src/components/Button/index.ts: -------------------------------------------------------------------------------- 1 | export { type ButtonProps, Button } from './Button'; 2 | export type { ButtonSize, ButtonVariant, MonkButtonProps } from './hooks'; 3 | -------------------------------------------------------------------------------- /packages/common-ui-web/src/components/VehicleTypeSelection/translations/en.json: -------------------------------------------------------------------------------- 1 | { 2 | "header": { 3 | "title": "Select your vehicle's type", 4 | "confirm": "Confirm" 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /packages/inspection-capture-web/src/VideoCapture/VideoCaptureHUD/VideoCaptureTutorial/index.ts: -------------------------------------------------------------------------------- 1 | export { VideoCaptureTutorial, type VideoCaptureTutorialProps } from './VideoCaptureTutorial'; 2 | -------------------------------------------------------------------------------- /packages/inspection-capture-web/src/VideoCapture/index.ts: -------------------------------------------------------------------------------- 1 | export { type VideoCaptureProps } from './VideoCapture'; 2 | export { VideoCaptureHOC as VideoCapture } from './VideoCaptureHOC'; 3 | -------------------------------------------------------------------------------- /packages/inspection-capture-web/tsconfig.build.production.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "./tsconfig.build.development.json", 3 | "compilerOptions": { 4 | "sourceMap": false 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /packages/common-ui-web/src/components/VehicleTypeSelection/translations/it.json: -------------------------------------------------------------------------------- 1 | { 2 | "header": { 3 | "title": "Seleziona il tipo di veicolo", 4 | "confirm": "Conferma" 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /packages/common-ui-web/src/components/VehicleTypeSelection/translations/nl.json: -------------------------------------------------------------------------------- 1 | { 2 | "header": { 3 | "title": "Selecteer het type voertuig", 4 | "confirm": "Bevestig" 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /packages/inspection-capture-web/tsconfig.build.development.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "./tsconfig.json", 3 | "compilerOptions": { 4 | "outDir": "lib" 5 | }, 6 | "exclude": ["test"] 7 | } 8 | -------------------------------------------------------------------------------- /packages/network/src/api/models/pdf.ts: -------------------------------------------------------------------------------- 1 | export interface ApiPdfPost { 2 | pdf_post_strategy?: string; 3 | } 4 | 5 | export interface ApiPdf { 6 | id: string; 7 | pdf_url: string; 8 | } 9 | -------------------------------------------------------------------------------- /packages/sights/src/build/index.ts: -------------------------------------------------------------------------------- 1 | import { buildJSONs } from './buildJSONs'; 2 | 3 | export function build(): void { 4 | console.log('📂 Building JSON files...'); 5 | buildJSONs(); 6 | } 7 | -------------------------------------------------------------------------------- /packages/types/.eslintignore: -------------------------------------------------------------------------------- 1 | dist 2 | node_modules 3 | .eslintrc.js 4 | jest.config.js 5 | dist 6 | lib 7 | src/lib/data.ts 8 | src/lib/index.ts.ts 9 | src/lib/data 10 | src/templates 11 | -------------------------------------------------------------------------------- /packages/common-ui-web/src/components/IconAroundVehicle/index.ts: -------------------------------------------------------------------------------- 1 | export { IconAroundVehicle } from './IconAroundVehicle'; 2 | export { type IconAroundVehicleProps } from './IconAroundVehicle.types'; 3 | -------------------------------------------------------------------------------- /packages/common-ui-web/src/components/VehicleTypeSelection/translations/fr.json: -------------------------------------------------------------------------------- 1 | { 2 | "header": { 3 | "title": "Sélectionnez votre type de véhicule", 4 | "confirm": "Confimer" 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /packages/inspection-capture-web/src/PhotoCapture/PhotoCaptureHUD/PhotoCaptureHUDElementsSight/AddDamageButton/index.ts: -------------------------------------------------------------------------------- 1 | export { AddDamageButton, type AddDamageButtonProps } from './AddDamageButton'; 2 | -------------------------------------------------------------------------------- /packages/inspection-capture-web/src/VideoCapture/hooks/useFastMovementsDetection/index.ts: -------------------------------------------------------------------------------- 1 | export { FastMovementType } from './fastMovementsDetection'; 2 | export * from './useFastMovementsDetection'; 3 | -------------------------------------------------------------------------------- /.editorconfig: -------------------------------------------------------------------------------- 1 | root = true 2 | 3 | [*] 4 | indent_style = space 5 | indent_size = 2 6 | end_of_line = lf 7 | charset = utf-8 8 | trim_trailing_whitespace = true 9 | insert_final_newline = true 10 | -------------------------------------------------------------------------------- /apps/demo-app-video/src/translations/de.json: -------------------------------------------------------------------------------- 1 | { 2 | "inspection-complete": { 3 | "thank-message": "Vielen Dank, dass Sie sich die Zeit genommen haben, die Inspektion durchzuführen." 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /packages/common-ui-web/src/components/VehicleDynamicWireframe/index.ts: -------------------------------------------------------------------------------- 1 | export { VehicleDynamicWireframe } from './VehicleDynamicWireframe'; 2 | export { type VehicleDynamicWireframeProps } from './hooks'; 3 | -------------------------------------------------------------------------------- /packages/common-ui-web/src/components/VehicleTypeSelection/translations/de.json: -------------------------------------------------------------------------------- 1 | { 2 | "header": { 3 | "title": "Wählen Sie den Typ Ihres Fahrzeugs", 4 | "confirm": "Bestätigen Sie" 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /packages/inspection-capture-web/src/VideoCapture/VideoCapturePermissions/index.ts: -------------------------------------------------------------------------------- 1 | export { 2 | VideoCapturePermissions, 3 | type VideoCapturePermissionsProps, 4 | } from './VideoCapturePermissions'; 5 | -------------------------------------------------------------------------------- /packages/inspection-capture-web/src/components/CloseUpShot/index.ts: -------------------------------------------------------------------------------- 1 | export { 2 | CloseUpShot, 3 | type CloseUpShotProps as PhotoCaptureHUDElementsAddDamage2ndShotProps, 4 | } from './CloseUpShot'; 5 | -------------------------------------------------------------------------------- /.yarnrc.yml: -------------------------------------------------------------------------------- 1 | nodeLinker: node-modules 2 | 3 | plugins: 4 | - path: .yarn/plugins/@yarnpkg/plugin-typescript.cjs 5 | spec: "@yarnpkg/plugin-typescript" 6 | 7 | yarnPath: .yarn/releases/yarn-3.2.4.cjs 8 | -------------------------------------------------------------------------------- /packages/network/.eslintignore: -------------------------------------------------------------------------------- 1 | dist 2 | node_modules 3 | .eslintrc.js 4 | jest.config.js 5 | lib 6 | src/lib/data.ts 7 | src/lib/index.ts.ts 8 | src/lib/data 9 | src/templates 10 | **/*/*.testdata.* 11 | -------------------------------------------------------------------------------- /packages/network/jest.config.js: -------------------------------------------------------------------------------- 1 | const { react } = require('@monkvision/jest-config'); 2 | 3 | module.exports = { 4 | ...react({ monorepo: true }), 5 | modulePathIgnorePatterns: ['/lib/'], 6 | }; 7 | -------------------------------------------------------------------------------- /apps/demo-app/src/pages/DamageDisclosurePage/DamageDisclosurePage.module.css: -------------------------------------------------------------------------------- 1 | .container { 2 | width: 100%; 3 | height: 100%; 4 | display: flex; 5 | align-items: center; 6 | justify-content: center; 7 | } 8 | -------------------------------------------------------------------------------- /packages/common-ui-web/src/components/IconVerticalPosition/index.ts: -------------------------------------------------------------------------------- 1 | export { IconVerticalPosition } from './IconVerticalPosition'; 2 | export { type IconVerticalPositionProps } from './IconVerticalPosition.types'; 3 | -------------------------------------------------------------------------------- /packages/common-ui-web/src/components/TakePictureButton/index.ts: -------------------------------------------------------------------------------- 1 | export { TakePictureButton, type TakePictureButtonProps } from './TakePictureButton'; 2 | export { type MonkTakePictureButtonProps } from './hooks'; 3 | -------------------------------------------------------------------------------- /packages/common/src/state/index.ts: -------------------------------------------------------------------------------- 1 | export * from './actions'; 2 | export * from './context'; 3 | export * from './hooks'; 4 | export * from './provider'; 5 | export * from './reducer'; 6 | export * from './state'; 7 | -------------------------------------------------------------------------------- /packages/network/.prettierignore: -------------------------------------------------------------------------------- 1 | dist 2 | node_modules 3 | .eslintrc.js 4 | jest.config.js 5 | lib 6 | src/lib/data.ts 7 | src/lib/index.ts.ts 8 | src/lib/data 9 | src/templates 10 | **/*/*.testdata.* 11 | -------------------------------------------------------------------------------- /packages/network/src/api/inspection/index.ts: -------------------------------------------------------------------------------- 1 | export * from './requests'; 2 | export { 3 | type PaginationRequestParams, 4 | type SortRequestParams, 5 | type GetAllInspectionsOptions, 6 | } from './mappers'; 7 | -------------------------------------------------------------------------------- /lerna.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "node_modules/lerna/schemas/lerna-schema.json", 3 | "version": "5.2.2", 4 | "command": { 5 | "version": { 6 | "message": "Release MonkJs %s" 7 | } 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /packages/common-ui-web/src/components/VehicleTypeSelection/VehicleTypeSelectionCard/index.ts: -------------------------------------------------------------------------------- 1 | export { 2 | VehicleTypeSelectionCard, 3 | type VehicleTypeSelectionCardProps, 4 | } from './VehicleTypeSelectionCard'; 5 | -------------------------------------------------------------------------------- /packages/common-ui-web/tsconfig.build.development.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "./tsconfig.json", 3 | "compilerOptions": { 4 | "outDir": "lib" 5 | }, 6 | "include": ["src", "types"], 7 | "exclude": ["test"] 8 | } 9 | -------------------------------------------------------------------------------- /packages/inspection-capture-web/src/PhotoCapture/PhotoCaptureHUD/PhotoCaptureHUDElements/index.ts: -------------------------------------------------------------------------------- 1 | export { 2 | PhotoCaptureHUDElements, 3 | type PhotoCaptureHUDElementsProps, 4 | } from './PhotoCaptureHUDElements'; 5 | -------------------------------------------------------------------------------- /packages/sights/jest.config.js: -------------------------------------------------------------------------------- 1 | const { base } = require('@monkvision/jest-config'); 2 | 3 | module.exports = { 4 | ...base({ monorepo: true }), 5 | coveragePathIgnorePatterns: [ 6 | 'src/lib/*', 7 | ], 8 | }; 9 | -------------------------------------------------------------------------------- /packages/types/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "@monkvision/typescript-config/tsconfig.json", 3 | "include": ["src"], 4 | "compilerOptions": { 5 | "baseUrl": "./src", 6 | "rootDir": "./src" 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /documentation/src/components/index.ts: -------------------------------------------------------------------------------- 1 | export * from './Shared'; 2 | export * from './Home'; 3 | export * from './Sights'; 4 | export * from './Icons'; 5 | export * from './ConfigValidator'; 6 | export * from './domOnly'; 7 | -------------------------------------------------------------------------------- /packages/inspection-capture-web/src/DamageDisclosure/DamageDisclosureHUD/index.ts: -------------------------------------------------------------------------------- 1 | export { DamageDisclosureHUD, type DamageDisclosureHUDProps } from './DamageDisclosureHUD'; 2 | export * from './DamageDisclosureHUDElements'; 3 | -------------------------------------------------------------------------------- /apps/demo-app-video/src/pages/index.ts: -------------------------------------------------------------------------------- 1 | export * from './pages'; 2 | export * from './LoginPage'; 3 | export * from './CreateInspectionPage'; 4 | export * from './VideoCapturePage'; 5 | export * from './InspectionCompletePage'; 6 | -------------------------------------------------------------------------------- /apps/demo-app-video/src/pages/pages.ts: -------------------------------------------------------------------------------- 1 | export enum Page { 2 | LOG_IN = '/log-in', 3 | CREATE_INSPECTION = '/create-inspection', 4 | VIDEO_CAPTURE = '/video-capture', 5 | INSPECTION_COMPLETE = '/inspection-complete', 6 | } 7 | -------------------------------------------------------------------------------- /packages/inspection-capture-web/src/PhotoCapture/index.ts: -------------------------------------------------------------------------------- 1 | export * from './PhotoCaptureHUD'; 2 | export { type PhotoCaptureProps } from './PhotoCapture'; 3 | export { PhotoCaptureHOC as PhotoCapture } from './PhotoCaptureHOC'; 4 | -------------------------------------------------------------------------------- /packages/posthog/jest.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | preset: 'ts-jest', 3 | testEnvironment: 'node', 4 | testMatch: ['**/test/**/*.test.ts'], 5 | coverageDirectory: 'coverage', 6 | coverageReporters: ['lcov'], 7 | }; 8 | -------------------------------------------------------------------------------- /packages/sentry/jest.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | preset: 'ts-jest', 3 | testEnvironment: 'node', 4 | testMatch: ['**/test/**/*.test.ts'], 5 | coverageDirectory: 'coverage', 6 | coverageReporters: ['lcov'], 7 | }; 8 | -------------------------------------------------------------------------------- /packages/common/src/index.ts: -------------------------------------------------------------------------------- 1 | export * from './PreventExit'; 2 | export * from './apps'; 3 | export * from './hooks'; 4 | export * from './i18n'; 5 | export * from './state'; 6 | export * from './theme'; 7 | export * from './utils'; 8 | -------------------------------------------------------------------------------- /packages/inspection-capture-web/src/VideoCapture/VideoCaptureProcessing/index.ts: -------------------------------------------------------------------------------- 1 | export { VideoCaptureProcessing } from './VideoCaptureProcessing'; 2 | export { type VideoCaptureProcessingProps } from './VideoCaptureProcessing.types'; 3 | -------------------------------------------------------------------------------- /documentation/src/pages/Icons/styles.module.css: -------------------------------------------------------------------------------- 1 | .cards-container { 2 | padding-top: var(--ifm-navbar-height); 3 | width: 100%; 4 | display: flex; 5 | align-items: center; 6 | justify-content: center; 7 | flex-wrap: wrap; 8 | } 9 | -------------------------------------------------------------------------------- /documentation/src/pages/Sights/styles.module.css: -------------------------------------------------------------------------------- 1 | .cards-container { 2 | padding-top: var(--ifm-navbar-height); 3 | width: 100%; 4 | display: flex; 5 | align-items: center; 6 | justify-content: center; 7 | flex-wrap: wrap; 8 | } 9 | -------------------------------------------------------------------------------- /packages/inspection-capture-web/src/PhotoCapture/PhotoCaptureHUD/PhotoCaptureHUDSightTutorial/index.ts: -------------------------------------------------------------------------------- 1 | export { 2 | PhotoCaptureHUDSightTutorial, 3 | type PhotoCaptureHUDSightTutorialProps, 4 | } from './PhotoCaptureHUDSightTutorial'; 5 | -------------------------------------------------------------------------------- /packages/inspection-capture-web/src/VideoCapture/VideoCapture.styles.ts: -------------------------------------------------------------------------------- 1 | import { Styles } from '@monkvision/types'; 2 | 3 | export const styles: Styles = { 4 | container: { 5 | height: '100%', 6 | width: '100%', 7 | }, 8 | }; 9 | -------------------------------------------------------------------------------- /packages/inspection-capture-web/src/components/SightTutorialButton/SightTutorialButton.styles.ts: -------------------------------------------------------------------------------- 1 | import { Styles } from '@monkvision/types'; 2 | 3 | export const styles: Styles = { 4 | sightTutorialButton: { padding: '8px' }, 5 | }; 6 | -------------------------------------------------------------------------------- /packages/sights/svgo.config.js: -------------------------------------------------------------------------------- 1 | const config = require('@monkvision/svgo-config'); 2 | 3 | module.exports = /** @type {import('svgo').Config} */ ({ 4 | ...config, 5 | plugins: config.plugins?.filter((i) => i !== 'prefixIds'), 6 | }); 7 | -------------------------------------------------------------------------------- /configs/test-utils/src/__mocks__/@monkvision/posthog.ts: -------------------------------------------------------------------------------- 1 | import analyticsMock from './analytics'; 2 | 3 | export = { 4 | /* Actual exports */ 5 | 6 | /* Mocks */ 7 | PosthogAnalyticsAdapter: analyticsMock.AnalyticsAdapterMock, 8 | }; 9 | -------------------------------------------------------------------------------- /configs/test-utils/src/__mocks__/@monkvision/sentry.ts: -------------------------------------------------------------------------------- 1 | import monitoringMock from './monitoring'; 2 | 3 | export = { 4 | /* Actual exports */ 5 | 6 | /* Mocks */ 7 | SentryMonitoringAdapter: monitoringMock.MonitoringAdapterMock, 8 | }; 9 | -------------------------------------------------------------------------------- /documentation/sidebars.js: -------------------------------------------------------------------------------- 1 | // @ts-check 2 | /** @type {import('@docusaurus/plugin-content-docs').SidebarsConfig} */ 3 | const sidebars = { 4 | docsSidebar: [{type: 'autogenerated', dirName: '.'}], 5 | }; 6 | 7 | module.exports = sidebars; 8 | -------------------------------------------------------------------------------- /packages/common-ui-web/src/components/VehicleWalkaroundIndicator/index.ts: -------------------------------------------------------------------------------- 1 | export { VehicleWalkaroundIndicator } from './VehicleWalkaroundIndicator'; 2 | export { type VehicleWalkaroundIndicatorProps } from './VehicleWalkaroundIndicator.types'; 3 | -------------------------------------------------------------------------------- /packages/inspection-capture-web/src/DamageDisclosure/DamageDisclosureHUD/DamageDisclosureHUDElements/index.ts: -------------------------------------------------------------------------------- 1 | export { 2 | DamageDisclosureHUDElements, 3 | type DamageDisclosureHUDElementsProps, 4 | } from './DamageDisclosureHUDElements'; 5 | -------------------------------------------------------------------------------- /packages/inspection-capture-web/src/PhotoCapture/PhotoCapture.styles.ts: -------------------------------------------------------------------------------- 1 | import { Styles } from '@monkvision/types'; 2 | 3 | export const styles: Styles = { 4 | container: { 5 | height: '100dvh', 6 | width: '100%', 7 | }, 8 | }; 9 | -------------------------------------------------------------------------------- /documentation/docs/packages/_category_.json: -------------------------------------------------------------------------------- 1 | { 2 | "label": "Packages", 3 | "position": 12, 4 | "link": { 5 | "type": "generated-index", 6 | "description": "This page lists the NPM packages available in the MonkJs SDK." 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /packages/common-ui-web/src/components/RecordVideoButton/index.ts: -------------------------------------------------------------------------------- 1 | export { RecordVideoButton } from './RecordVideoButton'; 2 | export { 3 | type RecordVideoButtonProps, 4 | type MonkRecordVideoButtonProps, 5 | } from './RecordVideoButton.types'; 6 | -------------------------------------------------------------------------------- /packages/inspection-capture-web/src/VideoCapture/VideoCaptureHUD/VideoCaptureRecording/index.ts: -------------------------------------------------------------------------------- 1 | export { VideoCaptureRecording } from './VideoCaptureRecording'; 2 | export { type VideoCaptureRecordingProps } from './VideoCaptureRecording.types'; 3 | -------------------------------------------------------------------------------- /packages/sights/research/schemas/subschemas/cameraHeight.schema.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://json-schema.org/draft/2020-12/schema", 3 | "$id": "subschemas/cameraHeight.schema", 4 | "type": "string", 5 | "enum": ["high", "mid", "low"] 6 | } 7 | -------------------------------------------------------------------------------- /packages/common-ui-web/src/components/DynamicSVG/hooks/index.ts: -------------------------------------------------------------------------------- 1 | export * from './types'; 2 | export * from './useCustomAttributes'; 3 | export * from './useInnerHTML'; 4 | export * from './useJSXTransformAttributes'; 5 | export * from './useXMLParser'; 6 | -------------------------------------------------------------------------------- /packages/inspection-capture-web/src/DamageDisclosure/index.ts: -------------------------------------------------------------------------------- 1 | export * from './DamageDisclosureHUD'; 2 | export { type DamageDisclosureProps } from './DamageDisclosure'; 3 | export { DamageDisclosureHOC as DamageDisclosure } from './DamageDisclosureHOC'; 4 | -------------------------------------------------------------------------------- /packages/sights/research/schemas/subschemas/category.schema.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://json-schema.org/draft/2020-12/schema", 3 | "$id": "subschemas/category.schema", 4 | "type": "string", 5 | "enum": ["interior", "exterior", "misc"] 6 | } 7 | -------------------------------------------------------------------------------- /configs/test-utils/src/__mocks__/react-router-dom.tsx: -------------------------------------------------------------------------------- 1 | export = { 2 | /* Actual exports */ 3 | /* Mocks */ 4 | Navigate: jest.fn(() => <>), 5 | useSearchParams: jest.fn(() => [{ get: jest.fn() }]), 6 | useNavigate: jest.fn(() => jest.fn()), 7 | }; 8 | -------------------------------------------------------------------------------- /packages/common-ui-web/src/components/InspectionGallery/index.ts: -------------------------------------------------------------------------------- 1 | export { 2 | NavigateToCaptureReason, 3 | type NavigateToCaptureOptions, 4 | type InspectionGalleryProps, 5 | } from './types'; 6 | export { InspectionGallery } from './InspectionGallery'; 7 | -------------------------------------------------------------------------------- /packages/sights/test/dataValidation.test.ts: -------------------------------------------------------------------------------- 1 | import { validate } from '../src/validate'; 2 | 3 | describe('Monk Research Data', () => { 4 | it('should respect the validation rules', () => { 5 | expect(() => validate()).not.toThrow(); 6 | }); 7 | }); 8 | -------------------------------------------------------------------------------- /apps/demo-app/src/index.css: -------------------------------------------------------------------------------- 1 | html, 2 | body, 3 | #root, 4 | .app-container { 5 | height: 100dvh; 6 | width: 100%; 7 | } 8 | 9 | body { 10 | margin: 0; 11 | background-color: #000000; 12 | font-family: sans-serif; 13 | color: white; 14 | } 15 | -------------------------------------------------------------------------------- /documentation/.gitignore: -------------------------------------------------------------------------------- 1 | # Dependencies 2 | /node_modules 3 | 4 | # Production 5 | /build 6 | 7 | # Generated files 8 | .docusaurus 9 | .cache-loader 10 | 11 | # Misc 12 | .DS_Store 13 | 14 | npm-debug.log* 15 | yarn-debug.log* 16 | yarn-error.log* 17 | -------------------------------------------------------------------------------- /documentation/src/components/Home/HomeFeatures/HomeFeatures.module.css: -------------------------------------------------------------------------------- 1 | .features { 2 | display: flex; 3 | align-items: center; 4 | padding: 2rem 0; 5 | width: 100%; 6 | } 7 | 8 | .featureSvg { 9 | height: 200px; 10 | width: 200px; 11 | } 12 | -------------------------------------------------------------------------------- /packages/common-ui-web/src/components/InspectionGallery/hooks/index.ts: -------------------------------------------------------------------------------- 1 | export * from './useInspectionGalleryItems'; 2 | export * from './useInspectionGalleryStyles'; 3 | export * from './useInspectionGalleryEmptyLabel'; 4 | export * from './useItemListFillers'; 5 | -------------------------------------------------------------------------------- /packages/sights/research/schemas/subschemas/cameraDistance.schema.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://json-schema.org/draft/2020-12/schema", 3 | "$id": "subschemas/cameraDistance.schema", 4 | "type": "string", 5 | "enum": ["interior", "close", "standard"] 6 | } 7 | -------------------------------------------------------------------------------- /packages/sights/tsconfig.compile.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "./tsconfig.json", 3 | "compilerOptions": { 4 | "outDir": "dist", 5 | "declaration": false, 6 | "sourceMap": false 7 | }, 8 | "include": ["src"], 9 | "exclude": ["src/lib"] 10 | } 11 | -------------------------------------------------------------------------------- /packages/inspection-capture-web/src/PhotoCapture/PhotoCaptureHUD/PhotoCaptureHUDElementsSight/SightSlider/index.ts: -------------------------------------------------------------------------------- 1 | export { SightSliderButton, type SightSliderButtonProps } from './SightSliderButton'; 2 | export { SightSlider, type SightSliderProps } from './SightSlider'; 3 | -------------------------------------------------------------------------------- /packages/inspection-capture-web/src/VideoCapture/hooks/index.ts: -------------------------------------------------------------------------------- 1 | export * from './useVehicleWalkaround'; 2 | export * from './useVideoRecording'; 3 | export * from './useFrameSelection'; 4 | export * from './useVideoUploadQueue'; 5 | export * from './useFastMovementsDetection'; 6 | -------------------------------------------------------------------------------- /apps/demo-app/src/setupTests.ts: -------------------------------------------------------------------------------- 1 | // jest-dom adds custom jest matchers for asserting on DOM nodes. 2 | // allows you to do things like: 3 | // expect(element).toHaveTextContent(/react/i) 4 | // learn more: https://github.com/testing-library/jest-dom 5 | import '@testing-library/jest-dom'; 6 | -------------------------------------------------------------------------------- /packages/common-ui-web/src/components/DynamicSVG/index.ts: -------------------------------------------------------------------------------- 1 | export { DynamicSVG, type DynamicSVGProps } from './DynamicSVG'; 2 | export { SVGElement, type SVGElementProps } from './SVGElement'; 3 | export { type DynamicSVGCustomizationFunctions, type SVGElementCustomProps } from './hooks'; 4 | -------------------------------------------------------------------------------- /apps/demo-app-video/src/setupTests.ts: -------------------------------------------------------------------------------- 1 | // jest-dom adds custom jest matchers for asserting on DOM nodes. 2 | // allows you to do things like: 3 | // expect(element).toHaveTextContent(/react/i) 4 | // learn more: https://github.com/testing-library/jest-dom 5 | import '@testing-library/jest-dom'; 6 | -------------------------------------------------------------------------------- /apps/demo-app/src/pages/PhotoCapturePage/PhotoCapturePage.module.css: -------------------------------------------------------------------------------- 1 | .container { 2 | width: 100%; 3 | height: 100%; 4 | display: flex; 5 | align-items: center; 6 | justify-content: center; 7 | } 8 | 9 | .error-message { 10 | text-align: center; 11 | padding-bottom: 20px; 12 | } 13 | -------------------------------------------------------------------------------- /packages/common/src/hooks/useSearchParams.ts: -------------------------------------------------------------------------------- 1 | import { useMemo } from 'react'; 2 | 3 | /** 4 | * Custom hook used to fetch search params from the current window URL. 5 | */ 6 | export function useSearchParams() { 7 | return useMemo(() => new URL(window.location.toString()).searchParams, []); 8 | } 9 | -------------------------------------------------------------------------------- /packages/sights/research/schemas/subschemas/wheelName.schema.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://json-schema.org/draft/2020-12/schema", 3 | "$id": "subschemas/wheelName.schema", 4 | "type": "string", 5 | "enum": ["wheel_front_left", "wheel_front_right", "wheel_back_left", "wheel_back_right"] 6 | } 7 | -------------------------------------------------------------------------------- /packages/common-ui-web/src/components/CreateInspection/translations/en.json: -------------------------------------------------------------------------------- 1 | { 2 | "errors": { 3 | "retry": "Retry", 4 | "create-inspection": "An unexpected error occurred while creating the inspection.", 5 | "missing-inspection-id": "The URL you are trying to access is invalid." 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /packages/sights/research/data/all/overlays/all-11w-_e9c.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /packages/sights/research/schemas/subschemas/xyzArray.schema.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://json-schema.org/draft/2020-12/schema", 3 | "$id": "subschemas/xyzArray.schema", 4 | "type": "array", 5 | "items": { 6 | "type": "number" 7 | }, 8 | "minItems": 3, 9 | "maxItems": 3 10 | } 11 | -------------------------------------------------------------------------------- /apps/demo-app-video/src/pages/VideoCapturePage/VideoCapturePage.module.css: -------------------------------------------------------------------------------- 1 | .container { 2 | width: 100%; 3 | height: 100%; 4 | display: flex; 5 | align-items: center; 6 | justify-content: center; 7 | } 8 | 9 | .error-message { 10 | text-align: center; 11 | padding-bottom: 20px; 12 | } 13 | -------------------------------------------------------------------------------- /apps/demo-app/src/pages/index.ts: -------------------------------------------------------------------------------- 1 | export * from './pages'; 2 | export * from './LoginPage'; 3 | export * from './CreateInspectionPage'; 4 | export * from './PhotoCapturePage'; 5 | export * from './VehicleTypeSelectionPage'; 6 | export * from './CaptureSelectionPage'; 7 | export * from './DamageDisclosurePage'; 8 | -------------------------------------------------------------------------------- /packages/inspection-capture-web/src/VideoCapture/VideoCapturePageLayout/index.ts: -------------------------------------------------------------------------------- 1 | export { VideoCapturePageLayout } from './VideoCapturePageLayout'; 2 | export { type VideoCapturePageLayoutProps } from './VideoCapturePageLayout.types'; 3 | export { PageLayoutItem, type PageLayoutItemProps } from './PageLayoutItem'; 4 | -------------------------------------------------------------------------------- /apps/demo-app/jest.config.js: -------------------------------------------------------------------------------- 1 | const { react } = require('@monkvision/jest-config'); 2 | 3 | module.exports = { 4 | ...react({ monorepo: true }), 5 | coverageThreshold: { 6 | global: { 7 | branches: 0, 8 | functions: 0, 9 | lines: 0, 10 | statements: 0, 11 | }, 12 | }, 13 | }; 14 | -------------------------------------------------------------------------------- /apps/demo-app/src/pages/pages.ts: -------------------------------------------------------------------------------- 1 | export enum Page { 2 | LOG_IN = '/log-in', 3 | CREATE_INSPECTION = '/create-inspection', 4 | PHOTO_CAPTURE = '/photo-capture', 5 | DAMAGE_DISCLOSURE = '/damage-disclosure', 6 | VEHICLE_TYPE_SELECTION = '/vehicle-type-selection', 7 | CAPTURE_SELECTION = '/capture-selection', 8 | } 9 | -------------------------------------------------------------------------------- /configs/test-utils/src/styles.ts: -------------------------------------------------------------------------------- 1 | export function getNumberFromCSSProperty(prop: string | undefined | null): number { 2 | expect(typeof prop).toBe('string'); 3 | const reg = /^(\d+)\D*$/; 4 | expect(prop).toMatch(reg); 5 | const result = (prop as string).match(reg); 6 | return Number((result as string[])[1]); 7 | } 8 | -------------------------------------------------------------------------------- /packages/common-ui-web/test/components/Button/mocks.tsx: -------------------------------------------------------------------------------- 1 | export function mockButtonDependencies(): void { 2 | jest.mock('../../../src/components/Spinner', () => ({ 3 | Spinner: jest.fn(() => <>), 4 | })); 5 | 6 | jest.mock('../../../src/icons', () => ({ 7 | Icon: jest.fn(() => <>), 8 | })); 9 | } 10 | -------------------------------------------------------------------------------- /packages/common/src/theme/context.ts: -------------------------------------------------------------------------------- 1 | import { createContext } from 'react'; 2 | import { MonkTheme } from '@monkvision/types'; 3 | import { createTheme } from './theme'; 4 | 5 | /** 6 | * A React Context that contains the current Monk theme. 7 | */ 8 | export const MonkThemeContext = createContext(createTheme()); 9 | -------------------------------------------------------------------------------- /packages/inspection-capture-web/src/PhotoCapture/PhotoCaptureHUD/index.ts: -------------------------------------------------------------------------------- 1 | export { PhotoCaptureHUD, type PhotoCaptureHUDProps } from './PhotoCaptureHUD'; 2 | export * from './hooks'; 3 | export * from './PhotoCaptureHUDElements'; 4 | export * from './PhotoCaptureHUDElementsSight'; 5 | export * from './PhotoCaptureHUDTutorial'; 6 | -------------------------------------------------------------------------------- /packages/types/src/index.ts: -------------------------------------------------------------------------------- 1 | export * from './state'; 2 | export * from './sights'; 3 | export * from './theme'; 4 | export * from './jsx'; 5 | export * from './camera'; 6 | export * from './config'; 7 | export * from './i18n'; 8 | export * from './api'; 9 | export * from './utils'; 10 | export * from './typeUtils'; 11 | -------------------------------------------------------------------------------- /apps/demo-app-video/jest.config.js: -------------------------------------------------------------------------------- 1 | const { react } = require('@monkvision/jest-config'); 2 | 3 | module.exports = { 4 | ...react({ monorepo: true }), 5 | coverageThreshold: { 6 | global: { 7 | branches: 0, 8 | functions: 0, 9 | lines: 0, 10 | statements: 0, 11 | }, 12 | }, 13 | }; 14 | -------------------------------------------------------------------------------- /packages/common-ui-web/src/components/CreateInspection/translations/fr.json: -------------------------------------------------------------------------------- 1 | { 2 | "errors": { 3 | "retry": "Réessayer", 4 | "create-inspection": "Une erreur inattendue est survenue lors de la création de l'inspection.", 5 | "missing-inspection-id": "L'URL à laquelle vous essayez d'accéder est invalide." 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /packages/common-ui-web/src/components/CreateInspection/translations/it.json: -------------------------------------------------------------------------------- 1 | { 2 | "errors": { 3 | "retry": "Riprova", 4 | "create-inspection": "Si è verificato un errore imprevisto durante la creazione dell'ispezione.", 5 | "missing-inspection-id": "L'URL a cui stai tentando di accedere non è valido." 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /packages/common-ui-web/src/components/CreateInspection/translations/nl.json: -------------------------------------------------------------------------------- 1 | { 2 | "errors": { 3 | "retry": "Opnieuw proberen", 4 | "create-inspection": "Er is een onverwachte fout opgetreden tijdens het maken van de inspectie.", 5 | "missing-inspection-id": "De URL die u probeert te bereiken is ongeldig." 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /apps/demo-app-video/src/index.css: -------------------------------------------------------------------------------- 1 | html, 2 | body, 3 | #root, 4 | .app-container { 5 | height: 100dvh; 6 | width: 100%; 7 | text-size-adjust: 100%; 8 | -webkit-text-size-adjust: 100%; 9 | } 10 | 11 | body { 12 | margin: 0; 13 | background-color: #000000; 14 | font-family: sans-serif; 15 | color: white; 16 | } 17 | -------------------------------------------------------------------------------- /configs/svgo-config/index.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | recursive: true, 3 | quiet: true, 4 | plugins: [ 5 | 'preset-default', 6 | 'prefixIds', 7 | 'removeDimensions', 8 | { 9 | name: 'sortAttrs', 10 | params: { 11 | xmlnsOrder: 'alphabetical', 12 | }, 13 | }, 14 | ], 15 | }; 16 | -------------------------------------------------------------------------------- /packages/network/src/api/models/renderedOutput.ts: -------------------------------------------------------------------------------- 1 | import type { ApiAdditionalData } from './common'; 2 | 3 | export interface ApiRenderedOutput { 4 | additional_data?: ApiAdditionalData; 5 | base_image_id: string; 6 | id: string; 7 | path: string; 8 | } 9 | 10 | export type ApiRenderedOutputs = ApiRenderedOutput[]; 11 | -------------------------------------------------------------------------------- /packages/sights/test/utils.ts: -------------------------------------------------------------------------------- 1 | import { resolve } from 'path'; 2 | 3 | export function pathsEqual(p1: string, p2: string): boolean { 4 | const path1 = resolve(p1); 5 | const path2 = resolve(p2); 6 | return process.platform === 'win32' 7 | ? path1.toLowerCase() === path2.toLowerCase() 8 | : path1 === path2; 9 | } 10 | -------------------------------------------------------------------------------- /packages/common-ui-web/src/components/CreateInspection/translations/de.json: -------------------------------------------------------------------------------- 1 | { 2 | "errors": { 3 | "retry": "Wiederholung", 4 | "create-inspection": "Bei der Erstellung der Inspektion ist ein unerwarteter Fehler aufgetreten.", 5 | "missing-inspection-id": "Die URL, auf die Sie zuzugreifen versuchen, ist ungültig." 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /packages/common/src/utils/promise.utils.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * This function creates and returns a new Promise that will resolve to void after the given amount of milliseconds. 3 | */ 4 | export function timeoutPromise(delayMs: number): Promise { 5 | return new Promise((resolve) => { 6 | setTimeout(() => resolve(), delayMs); 7 | }); 8 | } 9 | -------------------------------------------------------------------------------- /packages/inspection-capture-web/src/PhotoCapture/PhotoCaptureHUD/PhotoCaptureHUDTutorial/index.ts: -------------------------------------------------------------------------------- 1 | export { 2 | PhotoCaptureHUDTutorial, 3 | type PhotoCaptureHUDTutorialProps, 4 | } from './PhotoCaptureHUDTutorial'; 5 | export { ArrowIcon, type ArrowIconProps } from './ArrowIcon'; 6 | export { DisplayText, type DisplayTextProps } from './DisplayText'; 7 | -------------------------------------------------------------------------------- /packages/types/.eslintrc.js: -------------------------------------------------------------------------------- 1 | const OFF = 0; 2 | const WARN = 1; 3 | const ERROR = 2; 4 | 5 | module.exports = { 6 | extends: ['@monkvision/eslint-config-typescript'], 7 | parserOptions: { 8 | project: ['./tsconfig.json'], 9 | }, 10 | rules: { 11 | 'import/no-extraneous-dependencies': OFF, 12 | 'no-console': OFF, 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /apps/demo-app/.eslintrc.js: -------------------------------------------------------------------------------- 1 | const OFF = 0; 2 | const WARN = 1; 3 | const ERROR = 2; 4 | 5 | module.exports = { 6 | extends: ['@monkvision/eslint-config-typescript-react'], 7 | parserOptions: { 8 | project: ['./tsconfig.json'], 9 | }, 10 | rules: { 11 | 'import/no-extraneous-dependencies': OFF, 12 | 'no-console': OFF, 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /packages/camera-web/src/Camera/hooks/index.ts: -------------------------------------------------------------------------------- 1 | export * from './useCameraPreview'; 2 | export * from './useCameraScreenshot'; 3 | export * from './useUserMedia'; 4 | export * from './useCameraCanvas'; 5 | export * from './useCompression'; 6 | export * from './useTakePicture'; 7 | export { type CanvasHandle, CameraFacingMode, type CameraConfig } from './utils'; 8 | -------------------------------------------------------------------------------- /packages/inspection-capture-web/src/PhotoCapture/PhotoCaptureHUD/PhotoCaptureHUDElementsSight/index.ts: -------------------------------------------------------------------------------- 1 | export * from './SightSlider'; 2 | export * from './AddDamageButton'; 3 | export * from './SightGuideline'; 4 | export { PhotoCaptureHUDElementsSight } from './PhotoCaptureHUDElementsSight'; 5 | export { type PhotoCaptureHUDElementsSightProps } from './hooks'; 6 | -------------------------------------------------------------------------------- /packages/network/.eslintrc.js: -------------------------------------------------------------------------------- 1 | const OFF = 0; 2 | const WARN = 1; 3 | const ERROR = 2; 4 | 5 | module.exports = { 6 | extends: ['@monkvision/eslint-config-typescript'], 7 | parserOptions: { 8 | project: ['./tsconfig.json'], 9 | }, 10 | rules: { 11 | 'import/no-extraneous-dependencies': OFF, 12 | 'no-console': OFF, 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /packages/sights/src/index.ts: -------------------------------------------------------------------------------- 1 | /* eslint-disable import/first */ 2 | const buildStart = Date.now(); 3 | 4 | import { validate } from './validate'; 5 | import { build } from './build'; 6 | 7 | validate(); 8 | 9 | if (!process.argv.includes('--validate-only')) { 10 | build(); 11 | } 12 | 13 | console.log(`⚡️ Done in ${Date.now() - buildStart}ms`); 14 | -------------------------------------------------------------------------------- /apps/demo-app-video/src/pages/InspectionCompletePage/InspectionCompletePage.module.css: -------------------------------------------------------------------------------- 1 | .container { 2 | width: 100%; 3 | height: 100%; 4 | display: flex; 5 | flex-direction: column; 6 | justify-content: center; 7 | align-items: center; 8 | font-size: 20px; 9 | text-align: center; 10 | padding: 20px; 11 | box-sizing: border-box; 12 | } 13 | -------------------------------------------------------------------------------- /apps/demo-app-video/.eslintrc.js: -------------------------------------------------------------------------------- 1 | const OFF = 0; 2 | const WARN = 1; 3 | const ERROR = 2; 4 | 5 | module.exports = { 6 | extends: ['@monkvision/eslint-config-typescript-react'], 7 | parserOptions: { 8 | project: ['./tsconfig.json'], 9 | }, 10 | rules: { 11 | 'import/no-extraneous-dependencies': OFF, 12 | 'no-console': OFF, 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /packages/camera-web/.eslintrc.js: -------------------------------------------------------------------------------- 1 | const OFF = 0; 2 | const WARN = 1; 3 | const ERROR = 2; 4 | 5 | module.exports = { 6 | extends: ['@monkvision/eslint-config-typescript-react'], 7 | parserOptions: { 8 | project: ['./tsconfig.json'], 9 | }, 10 | rules: { 11 | 'import/no-extraneous-dependencies': OFF, 12 | 'no-console': OFF, 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /documentation/src/components/Shared/SearchBar/SearchBar.module.css: -------------------------------------------------------------------------------- 1 | .input-container { 2 | display: flex; 3 | align-items: center; 4 | } 5 | 6 | .input-container > input { 7 | border-width: 0 0 1px 0; 8 | border-color: #ffffff; 9 | outline: none; 10 | font-size: 16px; 11 | background-color: transparent; 12 | width: 200px; 13 | padding: 5px; 14 | } 15 | -------------------------------------------------------------------------------- /apps/demo-app/.gitignore: -------------------------------------------------------------------------------- 1 | # builds 2 | build/ 3 | lib/ 4 | dist/ 5 | module/ 6 | commonjs/ 7 | typescript/ 8 | web-build/ 9 | 10 | # modules 11 | node_modules/ 12 | coverage/ 13 | .expo/ 14 | .docusaurus/ 15 | 16 | # logs 17 | npm-debug.* 18 | npm-debug.log* 19 | yarn-debug.log* 20 | yarn-error.log* 21 | 22 | # cache 23 | .eslintcache 24 | 25 | # misc 26 | .DS_Store 27 | -------------------------------------------------------------------------------- /packages/inspection-capture-web/.eslintrc.js: -------------------------------------------------------------------------------- 1 | const OFF = 0; 2 | const WARN = 1; 3 | const ERROR = 2; 4 | 5 | module.exports = { 6 | extends: ['@monkvision/eslint-config-typescript-react'], 7 | parserOptions: { 8 | project: ['./tsconfig.json'], 9 | }, 10 | rules: { 11 | 'import/no-extraneous-dependencies': OFF, 12 | 'no-console': OFF, 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /apps/demo-app-video/.gitignore: -------------------------------------------------------------------------------- 1 | # builds 2 | build/ 3 | lib/ 4 | dist/ 5 | module/ 6 | commonjs/ 7 | typescript/ 8 | web-build/ 9 | 10 | # modules 11 | node_modules/ 12 | coverage/ 13 | .expo/ 14 | .docusaurus/ 15 | 16 | # logs 17 | npm-debug.* 18 | npm-debug.log* 19 | yarn-debug.log* 20 | yarn-error.log* 21 | 22 | # cache 23 | .eslintcache 24 | 25 | # misc 26 | .DS_Store 27 | -------------------------------------------------------------------------------- /apps/demo-app-video/src/pages/InspectionCompletePage/InspectionCompletePage.tsx: -------------------------------------------------------------------------------- 1 | import { useTranslation } from 'react-i18next'; 2 | import styles from './InspectionCompletePage.module.css'; 3 | 4 | export function InspectionCompletePage() { 5 | const { t } = useTranslation(); 6 | 7 | return
{t('inspection-complete.thank-message')}
; 8 | } 9 | -------------------------------------------------------------------------------- /packages/inspection-capture-web/src/VideoCapture/VideoCaptureHUD/VideoCaptureHUD.styles.ts: -------------------------------------------------------------------------------- 1 | import { Styles } from '@monkvision/types'; 2 | 3 | export const styles: Styles = { 4 | container: { 5 | width: '100%', 6 | height: '100%', 7 | position: 'relative', 8 | }, 9 | hudContainer: { 10 | position: 'absolute', 11 | inset: '0 0 0 0', 12 | }, 13 | }; 14 | -------------------------------------------------------------------------------- /packages/inspection-capture-web/src/components/index.ts: -------------------------------------------------------------------------------- 1 | export * from './OrientationEnforcer'; 2 | export * from './CancelButton'; 3 | export * from './CloseUpShot'; 4 | export * from './HUDButtons'; 5 | export * from './PartSelection'; 6 | export * from './Counter'; 7 | export * from './ZoomOutShot'; 8 | export * from './HUDOverlay'; 9 | export * from './SightTutorialButton'; 10 | -------------------------------------------------------------------------------- /configs/test-utils/src/__mocks__/react-i18next.tsx: -------------------------------------------------------------------------------- 1 | export = { 2 | /* Actual exports */ 3 | 4 | /* Mocks */ 5 | initReactI18next: {}, 6 | I18nextProvider: jest.fn(({ children }) => <>{children}), 7 | useTranslation: jest.fn(() => ({ 8 | t: jest.fn((str) => str), 9 | i18n: { language: 'en', changeLanguage: jest.fn(() => Promise.resolve()) }, 10 | })), 11 | }; 12 | -------------------------------------------------------------------------------- /packages/common/src/theme/hooks.ts: -------------------------------------------------------------------------------- 1 | import { useContext } from 'react'; 2 | import { MonkTheme } from '@monkvision/types'; 3 | import { MonkThemeContext } from './context'; 4 | 5 | /** 6 | * Custom hook that allows you to access the current Monk theme used by the application. 7 | */ 8 | export function useMonkTheme(): MonkTheme { 9 | return useContext(MonkThemeContext); 10 | } 11 | -------------------------------------------------------------------------------- /packages/inspection-capture-web/src/PhotoCapture/hooks/index.ts: -------------------------------------------------------------------------------- 1 | export * from './usePhotoCaptureSightState'; 2 | export * from './useComplianceAnalytics'; 3 | export * from './usePhotoCaptureTutorial'; 4 | export * from './usePhotoCaptureSightGuidelines'; 5 | export * from './useInspectionComplete'; 6 | export * from './usePhotoCaptureSightTutorial'; 7 | export * from './useImagesCleanup'; 8 | -------------------------------------------------------------------------------- /packages/network/src/api/damage/mappers.ts: -------------------------------------------------------------------------------- 1 | import { DamageType, VehiclePart } from '@monkvision/types'; 2 | import { ApiDamagePost } from '../models'; 3 | 4 | export function mapApiDamagePostRequest( 5 | damageType: DamageType, 6 | vehiclePart: VehiclePart, 7 | ): ApiDamagePost { 8 | return { 9 | damage_type: damageType, 10 | part_type: vehiclePart, 11 | }; 12 | } 13 | -------------------------------------------------------------------------------- /packages/common-ui-web/src/components/VehicleDynamicWireframe/VehicleDynamicWireframe.style.ts: -------------------------------------------------------------------------------- 1 | import { Styles } from '@monkvision/types'; 2 | 3 | export const styles: Styles = { 4 | notCarPart: { 5 | display: 'none', 6 | }, 7 | selectable: { 8 | pointerEvents: 'fill', 9 | cursor: 'pointer', 10 | }, 11 | svg: { 12 | width: '100%', 13 | height: '100%', 14 | }, 15 | }; 16 | -------------------------------------------------------------------------------- /packages/common/.eslintrc.js: -------------------------------------------------------------------------------- 1 | const OFF = 0; 2 | const WARN = 1; 3 | const ERROR = 2; 4 | 5 | module.exports = { 6 | extends: ['@monkvision/eslint-config-typescript-react'], 7 | parserOptions: { 8 | project: ['./tsconfig.json'], 9 | }, 10 | rules: { 11 | 'import/no-extraneous-dependencies': OFF, 12 | '@typescript-eslint/no-explicit-any': OFF, 13 | 'no-console': OFF, 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /packages/sights/research/schemas/subschemas/vehicleType.schema.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://json-schema.org/draft/2020-12/schema", 3 | "$id": "subschemas/vehicleType.schema", 4 | "type": "string", 5 | "enum": [ 6 | "hatchback", 7 | "cuv", 8 | "pickup", 9 | "city", 10 | "van", 11 | "sedan", 12 | "large-suv", 13 | "minivan", 14 | "suv", 15 | "hgv" 16 | ] 17 | } 18 | -------------------------------------------------------------------------------- /packages/common/src/utils/env.utils.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * Utility function that returns the value of a given environment variable. If the value does not exist, it throws an 3 | * error. 4 | */ 5 | export function getEnvOrThrow(name: string): string { 6 | const value = process.env[name]; 7 | if (!value) { 8 | throw new Error(`Required environment variable ${name} is not defined.`); 9 | } 10 | return value; 11 | } 12 | -------------------------------------------------------------------------------- /packages/types/README.md: -------------------------------------------------------------------------------- 1 | # @monkvision/types 2 | This package provides type definitions for the MonkJs TypeScript project. Since all the packages in this project are 3 | supposed to be used with the same version number, please only install this package with the proper version. 4 | 5 | # Installing 6 | To install the package, you can run the following command : 7 | 8 | ```shell 9 | yarn add -D @monkvision/types 10 | ``` 11 | -------------------------------------------------------------------------------- /configs/jest-config/react.js: -------------------------------------------------------------------------------- 1 | const base = require('./base'); 2 | 3 | module.exports = (options) => ({ 4 | ...base(options), 5 | testEnvironment: 'jsdom', 6 | testMatch: ['**/test/**/*.test.{ts,tsx}'], 7 | moduleNameMapper:{ 8 | '\\.(css|less|sass|scss)$': '@monkvision/test-utils/src/__mocks__/imports/style', 9 | '\\.(gif|ttf|eot|svg)$': '@monkvision/test-utils/src/__mocks__/imports/file' 10 | }, 11 | }); 12 | -------------------------------------------------------------------------------- /documentation/static/img/animated-logo.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /packages/analytics/src/react/context.ts: -------------------------------------------------------------------------------- 1 | import { createContext } from 'react'; 2 | import { AnalyticsAdapter, EmptyAnalyticsAdapter } from '../adapters'; 3 | 4 | /** 5 | * A React Context that wraps up the analytics methods provided by an Analytics Adapter. This context is initialized by 6 | * default with the EmptyAnalyticsAdapter. 7 | */ 8 | export const AnalyticsContext = createContext(new EmptyAnalyticsAdapter()); 9 | -------------------------------------------------------------------------------- /packages/inspection-capture-web/src/components/Counter/Counter.styles.ts: -------------------------------------------------------------------------------- 1 | import { Styles } from '@monkvision/types'; 2 | 3 | export const styles: Styles = { 4 | counter: { 5 | display: 'flex', 6 | color: 'white', 7 | alignItems: 'center', 8 | justifyContent: 'center', 9 | padding: 12, 10 | margin: '0 10px', 11 | whiteSpace: 'nowrap', 12 | borderRadius: 8, 13 | zIndex: 9, 14 | }, 15 | }; 16 | -------------------------------------------------------------------------------- /configs/test-utils/src/__mocks__/i18next.ts: -------------------------------------------------------------------------------- 1 | const i18nextInstanceMock: any = { 2 | language: 'en', 3 | changeLanguage: jest.fn(() => Promise.resolve(undefined)), 4 | on: jest.fn(), 5 | use: jest.fn(() => i18nextInstanceMock), 6 | init: jest.fn(() => Promise.resolve(undefined)), 7 | }; 8 | 9 | export = { 10 | /* Actual exports */ 11 | 12 | /* Mocks */ 13 | createInstance: jest.fn(() => i18nextInstanceMock), 14 | }; 15 | -------------------------------------------------------------------------------- /configs/typescript-config/tsconfig.react.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "./tsconfig.json", 3 | "compilerOptions": { 4 | "target": "es5", 5 | "lib": [ 6 | "dom", 7 | "dom.iterable", 8 | "esnext" 9 | ], 10 | "isolatedModules": true, 11 | "jsx": "react-jsx", 12 | "module": "commonjs", 13 | "skipLibCheck": true 14 | }, 15 | "include": ["src"], 16 | "exclude": ["node_modules", "**/*.spec.ts"] 17 | } 18 | -------------------------------------------------------------------------------- /documentation/src/components/domOnly.tsx: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import ExecutionEnvironment from '@docusaurus/ExecutionEnvironment'; 3 | 4 | const Empty = () => <>; 5 | const Icon = ExecutionEnvironment.canUseDOM ? require('@monkvision/common-ui-web').Icon : Empty; 6 | const DynamicSVG = ExecutionEnvironment.canUseDOM 7 | ? require('@monkvision/common-ui-web').DynamicSVG 8 | : Empty; 9 | 10 | export { Icon, DynamicSVG }; 11 | -------------------------------------------------------------------------------- /packages/monitoring/src/react/context.ts: -------------------------------------------------------------------------------- 1 | import { createContext } from 'react'; 2 | import { MonitoringAdapter, EmptyMonitoringAdapter } from '../adapters'; 3 | 4 | /** 5 | * A React Context that wraps up the monitoring methods provided by a Monitoring Adapter. This context is initialized by 6 | * default with the EmptyMonitoringAdapter. 7 | */ 8 | export const MonitoringContext = createContext(new EmptyMonitoringAdapter()); 9 | -------------------------------------------------------------------------------- /configs/prettier-config/index.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | printWidth: 100, 3 | tabWidth: 2, 4 | useTabs: false, 5 | semi: true, 6 | singleQuote: true, 7 | quoteProps: 'consistent', 8 | jsxSingleQuote: true, 9 | trailingComma: 'all', 10 | bracketSpacing: true, 11 | bracketSameLine: false, 12 | arrowParens: 'always', 13 | endOfLine: 'lf', 14 | embeddedLanguageFormatting: 'off', 15 | singleAttributePerLine: false, 16 | }; 17 | -------------------------------------------------------------------------------- /packages/posthog/.eslintrc.js: -------------------------------------------------------------------------------- 1 | const OFF = 0; 2 | const WARN = 1; 3 | const ERROR = 2; 4 | 5 | module.exports = { 6 | extends: ['@monkvision/eslint-config-typescript'], 7 | parserOptions: { 8 | project: ['./tsconfig.json'], 9 | }, 10 | rules: { 11 | 'import/no-extraneous-dependencies': OFF, 12 | 'no-console': OFF, 13 | 'class-methods-use-this': OFF, 14 | '@typescript-eslint/no-empty-function': OFF, 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /packages/analytics/.eslintrc.js: -------------------------------------------------------------------------------- 1 | const OFF = 0; 2 | const WARN = 1; 3 | const ERROR = 2; 4 | 5 | module.exports = { 6 | extends: ['@monkvision/eslint-config-typescript-react'], 7 | parserOptions: { 8 | project: ['./tsconfig.json'], 9 | }, 10 | rules: { 11 | 'import/no-extraneous-dependencies': OFF, 12 | 'no-console': OFF, 13 | 'class-methods-use-this': OFF, 14 | '@typescript-eslint/no-empty-function': OFF, 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /apps/demo-app/src/posthog.ts: -------------------------------------------------------------------------------- 1 | import { PosthogAnalyticsAdapter } from '@monkvision/posthog'; 2 | import { getEnvOrThrow } from '@monkvision/common'; 3 | 4 | export const posthogAnalyticsAdapter = new PosthogAnalyticsAdapter({ 5 | token: 'phc_9mKWu5rYzvrUT6Bo3bTzrclNa5sOILKthH9BA9sna0M', 6 | api_host: 'https://eu.posthog.com', 7 | environnement: getEnvOrThrow('REACT_APP_ENVIRONMENT'), 8 | projectName: 'demo-app', 9 | release: '1.0.0', 10 | }); 11 | -------------------------------------------------------------------------------- /apps/demo-app/src/sentry.ts: -------------------------------------------------------------------------------- 1 | import { SentryMonitoringAdapter } from '@monkvision/sentry'; 2 | import { getEnvOrThrow } from '@monkvision/common'; 3 | 4 | export const sentryMonitoringAdapter = new SentryMonitoringAdapter({ 5 | dsn: getEnvOrThrow('REACT_APP_SENTRY_DSN'), 6 | environment: getEnvOrThrow('REACT_APP_ENVIRONMENT'), 7 | debug: process.env['REACT_APP_SENTRY_DEBUG'] === 'true', 8 | tracesSampleRate: 0.025, 9 | release: '1.0', 10 | }); 11 | -------------------------------------------------------------------------------- /packages/camera-web/src/Camera/index.ts: -------------------------------------------------------------------------------- 1 | export { Camera, type CameraProps } from './Camera'; 2 | export { 3 | type CameraConfig, 4 | CameraFacingMode, 5 | type UserMediaError, 6 | UserMediaErrorType, 7 | } from './hooks'; 8 | export { 9 | type CameraEventHandlers, 10 | type CameraHUDComponent, 11 | type CameraHUDProps, 12 | type CameraHandle, 13 | } from './CameraHUD.types'; 14 | export { type CameraMonitoringConfig } from './monitoring'; 15 | -------------------------------------------------------------------------------- /packages/common-ui-web/src/components/VehicleWalkaroundIndicator/VehicleWalkaroundIndicator.types.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * Props accepted by the VehicleWalkaroundIndicator component. 3 | */ 4 | export interface VehicleWalkaroundIndicatorProps { 5 | /** 6 | * The rotation of the user around the vehicle. 7 | */ 8 | alpha: number; 9 | /** 10 | * The size of the indicator in pixels. 11 | * 12 | * @default 60 13 | */ 14 | size?: number; 15 | } 16 | -------------------------------------------------------------------------------- /packages/network/src/api/models/index.ts: -------------------------------------------------------------------------------- 1 | export * from './common'; 2 | export * from './compliance'; 3 | export * from './damage'; 4 | export * from './image'; 5 | export * from './inspection'; 6 | export * from './part'; 7 | export * from './pricingV2'; 8 | export * from './renderedOutput'; 9 | export * from './severityResult'; 10 | export * from './task'; 11 | export * from './vehicle'; 12 | export * from './view'; 13 | export * from './wheelAnalysis'; 14 | -------------------------------------------------------------------------------- /apps/demo-app-video/src/posthog.ts: -------------------------------------------------------------------------------- 1 | import { PosthogAnalyticsAdapter } from '@monkvision/posthog'; 2 | import { getEnvOrThrow } from '@monkvision/common'; 3 | 4 | export const posthogAnalyticsAdapter = new PosthogAnalyticsAdapter({ 5 | token: 'phc_9mKWu5rYzvrUT6Bo3bTzrclNa5sOILKthH9BA9sna0M', 6 | api_host: 'https://eu.posthog.com', 7 | environnement: getEnvOrThrow('REACT_APP_ENVIRONMENT'), 8 | projectName: 'demo-app', 9 | release: '1.0.0', 10 | }); 11 | -------------------------------------------------------------------------------- /apps/demo-app-video/src/sentry.ts: -------------------------------------------------------------------------------- 1 | import { SentryMonitoringAdapter } from '@monkvision/sentry'; 2 | import { getEnvOrThrow } from '@monkvision/common'; 3 | 4 | export const sentryMonitoringAdapter = new SentryMonitoringAdapter({ 5 | dsn: getEnvOrThrow('REACT_APP_SENTRY_DSN'), 6 | environment: getEnvOrThrow('REACT_APP_ENVIRONMENT'), 7 | debug: process.env['REACT_APP_SENTRY_DEBUG'] === 'true', 8 | tracesSampleRate: 0.025, 9 | release: '1.0', 10 | }); 11 | -------------------------------------------------------------------------------- /configs/test-utils/src/__mocks__/@auth0/auth0-react.tsx: -------------------------------------------------------------------------------- 1 | const mockAuth0Provider = ({ children, ...props }: any) => { 2 | (global as any).__auth0ProviderLastProps = props; 3 | return <>{children}; 4 | }; 5 | 6 | export = { 7 | /* Actual exports */ 8 | /* Mocks */ 9 | useAuth0: jest.fn(() => ({ 10 | getAccessTokenWithPopup: jest.fn(() => Promise.resolve('')), 11 | logout: jest.fn(), 12 | })), 13 | Auth0Provider: mockAuth0Provider, 14 | }; 15 | -------------------------------------------------------------------------------- /documentation/src/utils/schemas/index.ts: -------------------------------------------------------------------------------- 1 | import { z } from 'zod'; 2 | import { PhotoCaptureAppConfigSchema } from '@site/src/utils/schemas/photoCaptureConfig.schema'; 3 | import { VideoCaptureAppConfigSchema } from '@site/src/utils/schemas/videoCaptureConfig.schema'; 4 | 5 | export const LiveConfigSchema = z 6 | .object({ 7 | id: z.string(), 8 | description: z.string(), 9 | }) 10 | .and(PhotoCaptureAppConfigSchema.or(VideoCaptureAppConfigSchema)); 11 | -------------------------------------------------------------------------------- /apps/demo-app/src/pages/LoginPage/LoginPage.tsx: -------------------------------------------------------------------------------- 1 | import { useNavigate } from 'react-router-dom'; 2 | import { Login } from '@monkvision/common-ui-web'; 3 | import { useTranslation } from 'react-i18next'; 4 | import { Page } from '../pages'; 5 | 6 | export function LoginPage() { 7 | const { i18n } = useTranslation(); 8 | const navigate = useNavigate(); 9 | 10 | return navigate(Page.CREATE_INSPECTION)} />; 11 | } 12 | -------------------------------------------------------------------------------- /packages/common-ui-web/src/components/CaptureSelection/translations/en.json: -------------------------------------------------------------------------------- 1 | { 2 | "addDamage": { 3 | "title": "Report Damage", 4 | "description": "Add photos of dents, scratches or other damages present on the vehicle.", 5 | "button": "Add Damage Photos" 6 | }, 7 | "capture": { 8 | "title": "Start Inspection", 9 | "description": "No dents or scratches? Walk around the vehicle and take photos.", 10 | "button": "Take Photos" 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /packages/common-ui-web/src/components/LiveConfigAppProvider/LiveConfigAppProvider.styles.ts: -------------------------------------------------------------------------------- 1 | import { Styles } from '@monkvision/types'; 2 | 3 | export const styles: Styles = { 4 | container: { 5 | width: '100%', 6 | height: '100%', 7 | display: 'flex', 8 | flexDirection: 'column', 9 | alignItems: 'center', 10 | justifyContent: 'center', 11 | }, 12 | errorMessage: { 13 | paddingBottom: 20, 14 | maxWidth: '60%', 15 | }, 16 | }; 17 | -------------------------------------------------------------------------------- /packages/common/src/utils/index.ts: -------------------------------------------------------------------------------- 1 | export * from './string.utils'; 2 | export * from './array.utils'; 3 | export * from './color.utils'; 4 | export * from './mimetype.utils'; 5 | export * from './promise.utils'; 6 | export * from './zlib.utils'; 7 | export * from './browser.utils'; 8 | export * from './env.utils'; 9 | export * from './state.utils'; 10 | export * from './config.utils'; 11 | export * from './formValidation.utils'; 12 | export * from './vehicle.utils'; 13 | -------------------------------------------------------------------------------- /documentation/.eslintrc.js: -------------------------------------------------------------------------------- 1 | const OFF = 0; 2 | const WARN = 1; 3 | const ERROR = 2; 4 | 5 | module.exports = { 6 | extends: ['@monkvision/eslint-config-typescript-react'], 7 | parserOptions: { 8 | project: ['./tsconfig.json'], 9 | }, 10 | rules: { 11 | '@typescript-eslint/no-var-requires': OFF, 12 | 'global-require': OFF, 13 | 'import/no-unresolved': OFF, 14 | 'react/function-component-definition': OFF, 15 | 'no-console': OFF, 16 | }, 17 | } 18 | -------------------------------------------------------------------------------- /packages/common-ui-web/src/components/CaptureSelection/translations/nl.json: -------------------------------------------------------------------------------- 1 | { 2 | "addDamage": { 3 | "title": "Schade melden", 4 | "description": "Voeg foto's toe van deuken, krassen of andere schade aan het voertuig.", 5 | "button": "Schadefoto's toevoegen" 6 | }, 7 | "capture": { 8 | "title": "Inspectie starten", 9 | "description": "Geen deuken of krassen? Loop rond het voertuig en maak foto's.", 10 | "button": "Foto's maken" 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /packages/common/src/apps/analytics.ts: -------------------------------------------------------------------------------- 1 | import { useAnalytics } from '@monkvision/analytics'; 2 | import { useEffect } from 'react'; 3 | import { MonkAppState } from './appState'; 4 | 5 | export function useAppStateAnalytics({ inspectionId }: Pick): void { 6 | const { setUserId } = useAnalytics(); 7 | 8 | useEffect(() => { 9 | if (inspectionId) { 10 | setUserId(inspectionId); 11 | } 12 | }, [inspectionId, setUserId]); 13 | } 14 | -------------------------------------------------------------------------------- /apps/demo-app-video/src/pages/LoginPage/LoginPage.tsx: -------------------------------------------------------------------------------- 1 | import { useNavigate } from 'react-router-dom'; 2 | import { Login } from '@monkvision/common-ui-web'; 3 | import { useTranslation } from 'react-i18next'; 4 | import { Page } from '../pages'; 5 | 6 | export function LoginPage() { 7 | const { i18n } = useTranslation(); 8 | const navigate = useNavigate(); 9 | 10 | return navigate(Page.CREATE_INSPECTION)} />; 11 | } 12 | -------------------------------------------------------------------------------- /packages/camera-web/src/Camera/Camera.styles.ts: -------------------------------------------------------------------------------- 1 | import { Styles } from '@monkvision/types'; 2 | 3 | export const styles: Styles = { 4 | container: { 5 | width: '100%', 6 | height: '100%', 7 | display: 'flex', 8 | alignItems: 'center', 9 | justifyContent: 'center', 10 | backgroundColor: '#000000', 11 | }, 12 | cameraPreview: { 13 | width: '100%', 14 | height: '100%', 15 | }, 16 | cameraCanvas: { 17 | display: 'none', 18 | }, 19 | }; 20 | -------------------------------------------------------------------------------- /packages/common-ui-web/src/components/DynamicSVG/hooks/useXMLParser.ts: -------------------------------------------------------------------------------- 1 | import { useMemo } from 'react'; 2 | 3 | /** 4 | * Custom hook used to parse an XML string and return a Document object. This hook is mainly used in the SDK to parse 5 | * SVG images from strings and iterate over the parsed document to create dynamic SVGs. 6 | */ 7 | export function useXMLParser(xml: string): Document { 8 | return useMemo(() => new DOMParser().parseFromString(xml, 'text/xml'), [xml]); 9 | } 10 | -------------------------------------------------------------------------------- /packages/types/src/state/index.ts: -------------------------------------------------------------------------------- 1 | export * from './common'; 2 | export * from './damage'; 3 | export * from './entity'; 4 | export * from './image'; 5 | export * from './inspection'; 6 | export * from './part'; 7 | export * from './partOperation'; 8 | export * from './pricingV2'; 9 | export * from './renderedOutput'; 10 | export * from './severityResult'; 11 | export * from './task'; 12 | export * from './vehicle'; 13 | export * from './view'; 14 | export * from './wheelAnalysis'; 15 | -------------------------------------------------------------------------------- /packages/network/src/api/models/part.ts: -------------------------------------------------------------------------------- 1 | import type { ApiDamageIds } from './damage'; 2 | import type { ApiRelatedImages } from './image'; 3 | 4 | export interface ApiPart { 5 | damage_ids: ApiDamageIds; 6 | id: string; 7 | part_type: string; 8 | related_images?: ApiRelatedImages; 9 | } 10 | 11 | export interface ApiPartSimplifiedGet { 12 | id: string; 13 | part_type: string; 14 | } 15 | 16 | export type ApiParts = ApiPart[]; 17 | 18 | export type ApiPartIds = string[]; 19 | -------------------------------------------------------------------------------- /packages/common-ui-web/src/components/CaptureSelection/translations/it.json: -------------------------------------------------------------------------------- 1 | { 2 | "addDamage": { 3 | "title": "Segnala un danno", 4 | "description": "Aggiungi foto di ammaccature, graffi o altri danni presenti sul veicolo.", 5 | "button": "Aggiungi foto dei danni" 6 | }, 7 | "capture": { 8 | "title": "Avvia l’ispezione", 9 | "description": "Nessuna ammaccatura o graffio? Fai il giro del veicolo e scatta delle foto.", 10 | "button": "Scatta foto" 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /packages/sentry/.eslintrc.js: -------------------------------------------------------------------------------- 1 | const OFF = 0; 2 | const WARN = 1; 3 | const ERROR = 2; 4 | 5 | module.exports = { 6 | extends: ['@monkvision/eslint-config-typescript'], 7 | parserOptions: { 8 | project: ['./tsconfig.json'], 9 | }, 10 | rules: { 11 | 'import/no-extraneous-dependencies': OFF, 12 | 'no-console': OFF, 13 | '@typescript-eslint/no-explicit-any': OFF, 14 | 'class-methods-use-this': OFF, 15 | '@typescript-eslint/no-empty-function': OFF, 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /packages/common/test/hooks/useIsMounted.test.ts: -------------------------------------------------------------------------------- 1 | import { useIsMounted } from '../../src/hooks/useIsMounted'; 2 | import { renderHook } from '@testing-library/react-hooks'; 3 | 4 | describe('useIsMounted hook', () => { 5 | it('should return true when the component is mounted and false when unmounted', () => { 6 | const { result, unmount } = renderHook(useIsMounted); 7 | expect(result.current()).toBe(true); 8 | unmount(); 9 | expect(result.current()).toBe(false); 10 | }); 11 | }); 12 | -------------------------------------------------------------------------------- /packages/sights/test/lib/data.test.ts: -------------------------------------------------------------------------------- 1 | import { labels, sights, vehicles } from '../../src/lib'; 2 | 3 | describe('Sights data', () => { 4 | it('should contained a defined label dictionary', () => { 5 | expect(labels).toBeDefined(); 6 | }); 7 | 8 | it('should contained a defined vehicle dictionary', () => { 9 | expect(vehicles).toBeDefined(); 10 | }); 11 | 12 | it('should contained a defined sight dictionary', () => { 13 | expect(sights).toBeDefined(); 14 | }); 15 | }); 16 | -------------------------------------------------------------------------------- /configs/test-utils/.eslintrc.js: -------------------------------------------------------------------------------- 1 | const OFF = 0; 2 | const WARN = 1; 3 | const ERROR = 2; 4 | 5 | module.exports = { 6 | extends: ['@monkvision/eslint-config-typescript-react'], 7 | parserOptions: { 8 | project: ['./tsconfig.json'], 9 | }, 10 | rules: { 11 | 'import/no-extraneous-dependencies': OFF, 12 | 'no-console': OFF, 13 | '@typescript-eslint/no-explicit-any': OFF, 14 | 'class-methods-use-this': OFF, 15 | '@typescript-eslint/no-empty-function': OFF, 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /packages/common-ui-web/.eslintrc.js: -------------------------------------------------------------------------------- 1 | const OFF = 0; 2 | const WARN = 1; 3 | const ERROR = 2; 4 | 5 | module.exports = { 6 | extends: ['@monkvision/eslint-config-typescript-react'], 7 | parserOptions: { 8 | project: ['./tsconfig.json'], 9 | }, 10 | rules: { 11 | 'import/no-extraneous-dependencies': OFF, 12 | 'no-console': OFF, 13 | '@typescript-eslint/no-explicit-any': OFF, 14 | 'class-methods-use-this': OFF, 15 | '@typescript-eslint/no-empty-function': OFF, 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /packages/common-ui-web/src/components/CaptureSelection/translations/de.json: -------------------------------------------------------------------------------- 1 | { 2 | "addDamage": { 3 | "title": "Schaden melden", 4 | "description": "Fügen Sie Fotos von Dellen, Kratzern oder anderen Schäden am Fahrzeug hinzu.", 5 | "button": "Schadensfotos hinzufügen" 6 | }, 7 | "capture": { 8 | "title": "Inspektion starten", 9 | "description": "Keine Dellen oder Kratzer? Gehen Sie um das Fahrzeug herum und machen Sie Fotos.", 10 | "button": "Fotos machen" 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /packages/monitoring/.eslintrc.js: -------------------------------------------------------------------------------- 1 | const OFF = 0; 2 | const WARN = 1; 3 | const ERROR = 2; 4 | 5 | module.exports = { 6 | extends: ['@monkvision/eslint-config-typescript-react'], 7 | parserOptions: { 8 | project: ['./tsconfig.json'], 9 | }, 10 | rules: { 11 | 'import/no-extraneous-dependencies': OFF, 12 | 'no-console': OFF, 13 | '@typescript-eslint/no-explicit-any': OFF, 14 | 'class-methods-use-this': OFF, 15 | '@typescript-eslint/no-empty-function': OFF, 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /apps/demo-app-video/src/pages/VideoCapturePage/inspectionReport.ts: -------------------------------------------------------------------------------- 1 | import { getEnvOrThrow, zlibCompress } from '@monkvision/common'; 2 | 3 | export function createInspectionReportLink( 4 | authToken: string | null, 5 | inspectionId: string | null, 6 | language: string, 7 | ): string { 8 | const url = getEnvOrThrow('REACT_APP_INSPECTION_REPORT_URL'); 9 | const token = encodeURIComponent(zlibCompress(authToken ?? '')); 10 | return `${url}?c=e5j&lang=${language}&i=${inspectionId}&t=${token}`; 11 | } 12 | -------------------------------------------------------------------------------- /configs/test-utils/src/dom.ts: -------------------------------------------------------------------------------- 1 | import { fireEvent } from '@testing-library/react'; 2 | 3 | /** 4 | * Resizes the test window and fires a resize event. 5 | */ 6 | export function resizeWindow(dimensions?: { innerWidth?: number; innerHeight?: number }): void { 7 | if (dimensions?.innerWidth) { 8 | global.innerWidth = dimensions.innerWidth; 9 | } 10 | if (dimensions?.innerHeight) { 11 | global.innerHeight = dimensions.innerHeight; 12 | } 13 | fireEvent(window, new Event('resize')); 14 | } 15 | -------------------------------------------------------------------------------- /documentation/src/components/Icons/IconsTopBar/IconsTopBar.module.css: -------------------------------------------------------------------------------- 1 | .top-bar { 2 | width: 100%; 3 | background-color: var(--ifm-navbar-background-color); 4 | display: flex; 5 | align-items: center; 6 | justify-content: flex-end; 7 | position: fixed; 8 | top: var(--ifm-navbar-height); 9 | box-shadow: var(--ifm-navbar-shadow); 10 | left: 0; 11 | z-index: 999; 12 | } 13 | 14 | .filters { 15 | height: 100%; 16 | display: flex; 17 | align-items: center; 18 | padding: 10px; 19 | } 20 | -------------------------------------------------------------------------------- /packages/inspection-capture-web/src/PhotoCapture/PhotoCaptureHUD/PhotoCaptureHUDTutorial/hooks.ts: -------------------------------------------------------------------------------- 1 | import { useResponsiveStyle } from '@monkvision/common'; 2 | import { styles } from './PhotoCaptureHUDTutorial.styles'; 3 | 4 | export function usePhotoCaptureHUDTutorialStyle() { 5 | const { responsive } = useResponsiveStyle(); 6 | 7 | return { 8 | elementsContainer: { 9 | ...styles['elementsContainer'], 10 | ...responsive(styles['elementsContainerPortrait']), 11 | }, 12 | }; 13 | } 14 | -------------------------------------------------------------------------------- /packages/types/src/i18n.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * An array containing Monk available languages. 3 | */ 4 | export const monkLanguages = ['fr', 'en', 'de', 'nl', 'it'] as const; 5 | 6 | /** 7 | * Represents a Monk language type, which is one of the available Monk languages. 8 | */ 9 | export type MonkLanguage = (typeof monkLanguages)[number]; 10 | 11 | /** 12 | * Represents a translation object where each language is associated to a string. 13 | */ 14 | export type TranslationObject = Record; 15 | -------------------------------------------------------------------------------- /packages/inspection-capture-web/src/hooks/index.ts: -------------------------------------------------------------------------------- 1 | export * from './useStartTasksOnComplete'; 2 | export * from './useEnforceOrientation'; 3 | export * from './useColorBackground'; 4 | export * from './useAddDamageMode'; 5 | export * from './useUploadQueue'; 6 | export * from './usePictureTaken'; 7 | export * from './usePhotoCaptureImages'; 8 | export * from './useBadConnectionWarning'; 9 | export * from './useAdaptiveCameraConfig'; 10 | export * from './useTracking'; 11 | export * from './useCaptureDuration'; 12 | -------------------------------------------------------------------------------- /packages/sights/research/schemas/subschemas/vehicle.schema.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://json-schema.org/draft/2020-12/schema", 3 | "$id": "subschemas/vehicle.schema", 4 | "type": "string", 5 | "enum": [ 6 | "all", 7 | "audia7", 8 | "fesc20", 9 | "ff150", 10 | "ffocus18", 11 | "ftransit18", 12 | "haccord", 13 | "jgc21", 14 | "tsienna20", 15 | "vwtroc", 16 | "man12", 17 | "teslam3", 18 | "teslamy", 19 | "teslams", 20 | "teslamx" 21 | ] 22 | } 23 | -------------------------------------------------------------------------------- /configs/jest-config/setupTests.js: -------------------------------------------------------------------------------- 1 | const fs = require('fs'); 2 | const path = require('path'); 3 | 4 | const mocks = fs.readdirSync( 5 | path.join(__dirname, '..', 'test-utils', 'src', '__mocks__'), 6 | { recursive: true }, 7 | ).filter((name) => !name.startsWith('imports') && !name.match(/^@[^/]+$/g)) 8 | .map((name) => name.substring(0, name.length - (name.endsWith('x') ? 4 : 3))); 9 | 10 | mocks.forEach((mock) => { 11 | jest.mock(mock, () => require('@monkvision/test-utils/src/__mocks__/' + mock)); 12 | }); 13 | -------------------------------------------------------------------------------- /configs/test-utils/src/__mocks__/@monkvision/inspection-capture-web.tsx: -------------------------------------------------------------------------------- 1 | export = { 2 | /* Actual exports */ 3 | /* Mocks */ 4 | PhotoCaptureHUDButtons: jest.fn(() => <>), 5 | PhotoCaptureHUDAddDamagePreview: jest.fn(() => <>), 6 | PhotoCaptureHUDSightPreview: jest.fn(() => <>), 7 | SightsCounter: jest.fn(() => <>), 8 | AddDamageButton: jest.fn(() => <>), 9 | SightsSlider: jest.fn(() => <>), 10 | PhotoCaptureHUD: jest.fn(() => <>), 11 | PhotoCapture: jest.fn(() => <>), 12 | }; 13 | -------------------------------------------------------------------------------- /configs/prettier-config/README.md: -------------------------------------------------------------------------------- 1 | # @monkvision/prettier-config 2 | This package provides the base Prettier used throughout the MonkJs projects 3 | 4 | # Install 5 | To install the project simply run the following command : 6 | 7 | ```shell 8 | yarn add prettier @monkvision/prettier-config 9 | ``` 10 | 11 | # How to use 12 | To use the Prettier config exported by this package, simply add the following line in your `package.json` : 13 | 14 | ```json 15 | { 16 | "prettier": "@monkvision/prettier-config" 17 | } 18 | ``` 19 | -------------------------------------------------------------------------------- /packages/inspection-capture-web/src/PhotoCapture/PhotoCaptureHUD/hooks/usePhotoCaptureHUDStyle.ts: -------------------------------------------------------------------------------- 1 | import { useResponsiveStyle } from '@monkvision/common'; 2 | import { styles } from '../PhotoCaptureHUD.styles'; 3 | 4 | export function usePhotoCaptureHUDStyle() { 5 | const { responsive } = useResponsiveStyle(); 6 | 7 | return { 8 | container: { 9 | ...styles['container'], 10 | ...responsive(styles['containerPortrait']), 11 | }, 12 | previewContainer: styles['previewContainer'], 13 | }; 14 | } 15 | -------------------------------------------------------------------------------- /packages/common-ui-web/src/components/CaptureSelection/translations/fr.json: -------------------------------------------------------------------------------- 1 | { 2 | "addDamage": { 3 | "title": "Signaler un dégât", 4 | "description": "Ajoutez des photos d'enfoncements, rayures ou autres dégâts présents sur le véhicule.", 5 | "button": "Ajouter des photos de dégâts" 6 | }, 7 | "capture": { 8 | "title": "Démarrer l’inspection", 9 | "description": "Pas d'enfoncements ni de rayures ? Faites le tour du véhicule et prenez des photos.", 10 | "button": "Prendre des photos" 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /packages/common-ui-web/src/components/InspectionGallery/InspectionGalleryTopBar/InspectionGalleryFilterPill/InspectionGalleryFilterPill.styles.ts: -------------------------------------------------------------------------------- 1 | import { Styles } from '@monkvision/types'; 2 | 3 | export const styles: Styles = { 4 | pill: { 5 | display: 'flex', 6 | alignItems: 'center', 7 | justifyContent: 'center', 8 | padding: '4px 10px', 9 | fontSize: 12, 10 | marginRight: 8, 11 | }, 12 | count: { 13 | borderRadius: 200, 14 | padding: '1px 4px', 15 | marginLeft: 4, 16 | }, 17 | }; 18 | -------------------------------------------------------------------------------- /packages/common-ui-web/test/icons/assets.test.ts: -------------------------------------------------------------------------------- 1 | import { iconNames } from '../../src'; 2 | import { MonkIconAssetsMap } from '../../src/icons/assets'; 3 | 4 | describe('Icons assets', () => { 5 | it('should contain a valid asset for each icon name', () => { 6 | iconNames.forEach((name) => { 7 | const svgStr = MonkIconAssetsMap[name]; 8 | 9 | expect(typeof svgStr).toEqual('string'); 10 | expect(() => new DOMParser().parseFromString(svgStr, 'text/xml')).not.toThrow(); 11 | }); 12 | }); 13 | }); 14 | -------------------------------------------------------------------------------- /packages/common-ui-web/src/components/CreateInspection/CreateInspection.styles.ts: -------------------------------------------------------------------------------- 1 | import { Styles } from '@monkvision/types'; 2 | 3 | export const styles: Styles = { 4 | container: { 5 | width: '100%', 6 | height: '100%', 7 | display: 'flex', 8 | flexDirection: 'column', 9 | justifyContent: 'center', 10 | alignItems: 'center', 11 | }, 12 | errorMessage: { 13 | textAlign: 'center', 14 | padding: '0 16px 16px 16px', 15 | }, 16 | retryButtonContainer: { 17 | paddingTop: 20, 18 | }, 19 | }; 20 | -------------------------------------------------------------------------------- /packages/common-ui-web/src/components/Login/Login.styles.ts: -------------------------------------------------------------------------------- 1 | import { Styles } from '@monkvision/types'; 2 | 3 | export const styles: Styles = { 4 | container: { 5 | width: '100%', 6 | height: '100%', 7 | display: 'flex', 8 | flexDirection: 'column', 9 | justifyContent: 'center', 10 | gap: '20px', 11 | alignItems: 'center', 12 | textAlign: 'center', 13 | maxWidth: '70%', 14 | margin: 'auto', 15 | }, 16 | errorMessage: { 17 | textAlign: 'center', 18 | paddingBottom: 20, 19 | }, 20 | }; 21 | -------------------------------------------------------------------------------- /packages/sights/test/build/index.test.ts: -------------------------------------------------------------------------------- 1 | import { build } from '../../src/build'; 2 | import * as buildJSONsModule from '../../src/build/buildJSONs'; 3 | 4 | describe('Build function', () => { 5 | it('should call the compileJSONs function', () => { 6 | jest.spyOn(console, 'log').mockImplementation(() => {}); 7 | const spy = jest.spyOn(buildJSONsModule, 'buildJSONs').mockImplementation(() => {}); 8 | 9 | build(); 10 | 11 | expect(spy).toHaveBeenCalled(); 12 | jest.spyOn(console, 'log').mockRestore(); 13 | }); 14 | }); 15 | -------------------------------------------------------------------------------- /packages/types/src/theme/utils.ts: -------------------------------------------------------------------------------- 1 | import { Color, ColorProp } from './colors'; 2 | 3 | /** 4 | * Utility functions that come included with the Monk theme. 5 | */ 6 | export interface ThemeUtils { 7 | /** 8 | * Utility function that takes a color from a prop (ColorProp object) and returns the corresponding color value. If 9 | * the prop is not a color name, it will be returned as is. 10 | * 11 | * @param prop The color prop. 12 | * @return The value of the color. 13 | */ 14 | getColor: (prop: ColorProp) => Color; 15 | } 16 | -------------------------------------------------------------------------------- /documentation/src/utils/schemas/cameraConfig.schema.ts: -------------------------------------------------------------------------------- 1 | import { z } from 'zod'; 2 | import { CameraResolution, CompressionFormat } from '@monkvision/types'; 3 | 4 | export const CompressionOptionsSchema = z.object({ 5 | format: z.nativeEnum(CompressionFormat), 6 | quality: z.number().gte(0).lte(1), 7 | }); 8 | 9 | export const CameraConfigSchema = z 10 | .object({ 11 | resolution: z.nativeEnum(CameraResolution).optional(), 12 | allowImageUpscaling: z.boolean().optional(), 13 | }) 14 | .and(CompressionOptionsSchema.partial()); 15 | -------------------------------------------------------------------------------- /packages/camera-web/test/mocks/internalMonitoringConfig.mock.ts: -------------------------------------------------------------------------------- 1 | import { InternalCameraMonitoringConfig } from '../../src/Camera/monitoring'; 2 | 3 | export function createMockInternalMonitoringConfig(): InternalCameraMonitoringConfig { 4 | return { 5 | transaction: { 6 | startMeasurement: jest.fn(), 7 | stopMeasurement: jest.fn(), 8 | setMeasurement: jest.fn(), 9 | }, 10 | tags: { testTagName: 'testTagValue' }, 11 | data: { testDataKey: 'testDataValue' }, 12 | } as unknown as InternalCameraMonitoringConfig; 13 | } 14 | -------------------------------------------------------------------------------- /packages/sights/src/validate/index.ts: -------------------------------------------------------------------------------- 1 | import { JSONValidator } from './validator'; 2 | import { validateAdditionalRules } from './additionalValidation'; 3 | 4 | const logs = process.env['NODE_ENV'] !== 'test'; 5 | 6 | export function validate(): void { 7 | const jsonValidator = new JSONValidator(); 8 | 9 | if (logs) { 10 | console.log('🔬️ Validating research data...'); 11 | } 12 | jsonValidator.validateAllFiles(); 13 | 14 | if (logs) { 15 | console.log('🔍 Additional validation...'); 16 | } 17 | validateAdditionalRules(); 18 | } 19 | -------------------------------------------------------------------------------- /documentation/src/pages/ConfigValidator/styles.module.css: -------------------------------------------------------------------------------- 1 | .container { 2 | width: 100%; 3 | height: 100%; 4 | display: flex; 5 | flex-direction: column; 6 | align-items: center; 7 | padding: 30px; 8 | } 9 | 10 | .config-text-area { 11 | margin-top: 30px; 12 | width: 70%; 13 | height: 800px; 14 | border-radius: 10px; 15 | font-family: monospace; 16 | background-color: var(--text-area-background); 17 | padding: 10px; 18 | } 19 | 20 | @media screen and (max-width: 900px) { 21 | .config-text-area { 22 | width: 100%; 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /packages/inspection-capture-web/src/hooks/useColorBackground.ts: -------------------------------------------------------------------------------- 1 | import { useMonkTheme, changeAlpha } from '@monkvision/common'; 2 | import { useMemo } from 'react'; 3 | 4 | /** 5 | * Custom hook used to generate the background color in the inspection capture web components. 6 | */ 7 | export function useColorBackground(opacity = 0.64) { 8 | const { palette } = useMonkTheme(); 9 | 10 | const clampedOpacity = Math.max(0, Math.min(opacity, 1)); 11 | 12 | return useMemo(() => changeAlpha(palette.background.base, opacity), [palette, clampedOpacity]); 13 | } 14 | -------------------------------------------------------------------------------- /packages/sights/research/schemas/subschemas/task.schema.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://json-schema.org/draft/2020-12/schema", 3 | "$id": "subschemas/task.schema", 4 | "type": "array", 5 | "items": { 6 | "type": "string", 7 | "enum": [ 8 | "damage_detection", 9 | "wheel_analysis", 10 | "repair_estimate", 11 | "images_ocr", 12 | "image_editing", 13 | "inspection_pdf", 14 | "pricing", 15 | "dashboard_ocr", 16 | "compliances" 17 | ] 18 | }, 19 | "minItems": 1, 20 | "maxItems": 8 21 | } 22 | -------------------------------------------------------------------------------- /configs/svgo-config/README.md: -------------------------------------------------------------------------------- 1 | # @monkvision/svgo-config 2 | This package provides the base SVGO configuration used throughout the MonkJs projects 3 | 4 | # Install 5 | To install the project simply run the following command : 6 | 7 | ```shell 8 | yarn add -D svgo @monkvision/svgo-config 9 | ``` 10 | 11 | # How to use 12 | To use the SVGO config exported by this package, simply add the following line in your `svgo.config.js` : 13 | 14 | ```javascript 15 | const config = require('@monkvision/svgo-config'); 16 | 17 | module.exports = { 18 | ...config, 19 | }; 20 | ``` 21 | -------------------------------------------------------------------------------- /documentation/src/components/Icons/IconsTopBar/IconsTopBar.tsx: -------------------------------------------------------------------------------- 1 | import { SearchBar } from '@site/src/components'; 2 | import React from 'react'; 3 | import styles from './IconsTopBar.module.css'; 4 | 5 | export interface IconsTopBarProps { 6 | onLookupInput: (value: string) => void; 7 | } 8 | 9 | export function IconsTopBar({ onLookupInput }: IconsTopBarProps) { 10 | return ( 11 |
12 |
13 | 14 |
15 |
16 | ); 17 | } 18 | -------------------------------------------------------------------------------- /apps/demo-app-video/src/pages/CreateInspectionPage/CreateInspectionPage.tsx: -------------------------------------------------------------------------------- 1 | import { useTranslation } from 'react-i18next'; 2 | import { useNavigate } from 'react-router-dom'; 3 | import { CreateInspection } from '@monkvision/common-ui-web'; 4 | import { Page } from '../pages'; 5 | 6 | export function CreateInspectionPage() { 7 | const navigate = useNavigate(); 8 | const { i18n } = useTranslation(); 9 | 10 | return ( 11 | navigate(Page.VIDEO_CAPTURE)} 13 | lang={i18n.language} 14 | /> 15 | ); 16 | } 17 | -------------------------------------------------------------------------------- /packages/common/src/hooks/useIsMounted.ts: -------------------------------------------------------------------------------- 1 | import { useCallback, useEffect, useRef } from 'react'; 2 | 3 | /** 4 | * Custom hook returning a ref to a util function returning `true` if the component using the hook is mounted, and false 5 | * otherwise. 6 | */ 7 | export function useIsMounted(): () => boolean { 8 | const isMounted = useRef(false); 9 | 10 | useEffect(() => { 11 | isMounted.current = true; 12 | 13 | return () => { 14 | isMounted.current = false; 15 | }; 16 | }, []); 17 | 18 | return useCallback(() => isMounted.current, []); 19 | } 20 | -------------------------------------------------------------------------------- /apps/demo-app/src/pages/CreateInspectionPage/CreateInspectionPage.tsx: -------------------------------------------------------------------------------- 1 | import { useTranslation } from 'react-i18next'; 2 | import { useNavigate } from 'react-router-dom'; 3 | import { CreateInspection } from '@monkvision/common-ui-web'; 4 | import { Page } from '../pages'; 5 | 6 | export function CreateInspectionPage() { 7 | const navigate = useNavigate(); 8 | const { i18n } = useTranslation(); 9 | 10 | return ( 11 | navigate(Page.VEHICLE_TYPE_SELECTION)} 13 | lang={i18n.language} 14 | /> 15 | ); 16 | } 17 | -------------------------------------------------------------------------------- /configs/test-utils/src/__mocks__/@monkvision/camera-web.tsx: -------------------------------------------------------------------------------- 1 | const { CameraFacingMode, UserMediaErrorType } = jest.requireActual('@monkvision/camera-web'); 2 | 3 | export = { 4 | /* Actual exports */ 5 | CameraFacingMode, 6 | UserMediaErrorType, 7 | 8 | /* Mocks */ 9 | Camera: jest.fn(() => <>), 10 | SimpleCameraHUD: jest.fn(() => <>), 11 | i18nCamera: {}, 12 | getCameraErrorLabel: jest.fn(() => ({ en: '', fr: '', de: '' })), 13 | useCameraPermission: jest.fn(() => ({ 14 | requestCameraPermission: jest.fn(() => Promise.resolve()), 15 | })), 16 | }; 17 | -------------------------------------------------------------------------------- /packages/sights/.eslintrc.js: -------------------------------------------------------------------------------- 1 | const OFF = 0; 2 | const WARN = 1; 3 | const ERROR = 2; 4 | 5 | module.exports = { 6 | root: true, 7 | extends: ['@monkvision/eslint-config-typescript'], 8 | parserOptions: { 9 | project: ['./tsconfig.json'], 10 | }, 11 | rules: { 12 | 'import/no-extraneous-dependencies': OFF, 13 | 'no-console': OFF, 14 | }, 15 | overrides: [ 16 | { 17 | files: ['src/lib/*.ts'], 18 | rules: { 19 | '@typescript-eslint/ban-ts-comment': OFF, 20 | 'import/no-unresolved': OFF, 21 | }, 22 | }, 23 | ], 24 | } 25 | -------------------------------------------------------------------------------- /packages/common/src/utils/config.utils.ts: -------------------------------------------------------------------------------- 1 | import { PhotoCaptureAppConfig, VehicleType } from '@monkvision/types'; 2 | import { uniq } from './array.utils'; 3 | 4 | /** 5 | * Util function used to extract the list of available vehicle types in a CaptureAppConfig object. 6 | */ 7 | export function getAvailableVehicleTypes(config: PhotoCaptureAppConfig): VehicleType[] { 8 | return ( 9 | config.enableSteeringWheelPosition 10 | ? uniq([...Object.keys(config.sights.left), ...Object.keys(config.sights.right)]) 11 | : Object.keys(config.sights) 12 | ) as VehicleType[]; 13 | } 14 | -------------------------------------------------------------------------------- /packages/common/test/utils/promise.utils.test.ts: -------------------------------------------------------------------------------- 1 | import { timeoutPromise } from '../../src'; 2 | 3 | describe('Promise utils', () => { 4 | describe('timeoutPromise util function', () => { 5 | it('should create a promise that resolves after the specified delay', async () => { 6 | const delay = 1000; 7 | const startTime = Date.now(); 8 | await timeoutPromise(delay); 9 | const actualDelay = Date.now() - startTime; 10 | expect(actualDelay).toBeGreaterThanOrEqual(delay); 11 | expect(actualDelay).toBeLessThan(delay + 100); 12 | }); 13 | }); 14 | }); 15 | -------------------------------------------------------------------------------- /packages/types/src/theme/theme.ts: -------------------------------------------------------------------------------- 1 | import { CSSProperties } from 'react'; 2 | import { MonkPalette } from './palette'; 3 | import { ThemeUtils } from './utils'; 4 | 5 | /** 6 | * Application theme used to customize the look and feel of the Monk SDK. 7 | */ 8 | export interface MonkTheme { 9 | /** 10 | * The color palette. 11 | */ 12 | palette: MonkPalette; 13 | /** 14 | * Theme utils. 15 | */ 16 | utils: ThemeUtils; 17 | /** 18 | * Root styles of the application that define global styles such as font color etc. 19 | */ 20 | rootStyles: CSSProperties; 21 | } 22 | -------------------------------------------------------------------------------- /documentation/src/components/Home/HomeFeatures/HomeFeatures.tsx: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import { featureList } from './featureList'; 3 | import { Feature } from './Feature'; 4 | import styles from './HomeFeatures.module.css'; 5 | 6 | export function HomeFeatures() { 7 | return ( 8 |
9 |
10 |
11 | {featureList.map((props, idx) => ( 12 | 13 | ))} 14 |
15 |
16 |
17 | ); 18 | } 19 | -------------------------------------------------------------------------------- /documentation/src/pages/index.tsx: -------------------------------------------------------------------------------- 1 | import useDocusaurusContext from '@docusaurus/useDocusaurusContext'; 2 | import Layout from '@theme/Layout'; 3 | import React, { JSX } from 'react'; 4 | import { HomeFeatures, HomeHeader } from '@site/src/components'; 5 | 6 | export default function Home(): JSX.Element { 7 | const { siteConfig } = useDocusaurusContext(); 8 | 9 | return ( 10 | 11 | 12 |
13 | 14 |
15 |
16 | ); 17 | } 18 | -------------------------------------------------------------------------------- /packages/common/src/state/actions/index.ts: -------------------------------------------------------------------------------- 1 | export * from './monkAction'; 2 | export * from './resetState'; 3 | export * from './gotOneInspection'; 4 | export * from './createdOneImage'; 5 | export * from './deletedOneImage'; 6 | export * from './updatedManyTasks'; 7 | export * from './updatedVehicle'; 8 | export * from './createdOnePricing'; 9 | export * from './deletedOnePricing'; 10 | export * from './updatedOnePricing'; 11 | export * from './updatedOneInspectionAdditionalData'; 12 | export * from './createdOneDamage'; 13 | export * from './deletedOneDamage'; 14 | export * from './gotOneInspectionPdf'; 15 | -------------------------------------------------------------------------------- /packages/common/src/hooks/useObjectMemo.ts: -------------------------------------------------------------------------------- 1 | import { useMemo } from 'react'; 2 | 3 | /** 4 | * This custom hook is used to have a more handy way of memoizing a record of values. 5 | * 6 | * @example 7 | * import { useMemo } from 'React'; 8 | * import { useObjectMemo } from '@monkvision/common'; 9 | * 10 | * // These 2 lines are equivalent 11 | * const foo = useMemo(() => ({ bar, baz }), [bar, baz]); 12 | * const foo = useObjectMemo({ bar, baz }); 13 | */ 14 | export function useObjectMemo>(object: T): T { 15 | return useMemo(() => object, Object.values(object)); 16 | } 17 | -------------------------------------------------------------------------------- /packages/common-ui-web/src/components/InspectionGallery/translations/en.json: -------------------------------------------------------------------------------- 1 | { 2 | "card": { 3 | "addDamage": "Add Custom Damage" 4 | }, 5 | "topBar": { 6 | "submit": "Validate", 7 | "title": "Photos", 8 | "retakeFilter": "Retakes", 9 | "approvedFilter": "Approved", 10 | "completed": "This inspection is completed" 11 | }, 12 | "list": { 13 | "empty": { 14 | "capture": "No photos yet. Pictures taken will be displayed here.", 15 | "nonCapture": "There are no pictures in this inspection.", 16 | "filter": "No matches for the selected filter." 17 | } 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /packages/inspection-capture-web/src/hooks/usePhotoCaptureImages.ts: -------------------------------------------------------------------------------- 1 | import { Image } from '@monkvision/types'; 2 | import { getInspectionImages, useMonkState } from '@monkvision/common'; 3 | import { useMemo } from 'react'; 4 | 5 | /** 6 | * Custom hook that returns the current images taken in the inspection (it filters retakes etc.). 7 | */ 8 | export function usePhotoCaptureImages(inspectionId: string): Image[] { 9 | const { state } = useMonkState(); 10 | 11 | return useMemo( 12 | () => getInspectionImages(inspectionId, state.images, undefined, true), 13 | [state.images, inspectionId], 14 | ); 15 | } 16 | -------------------------------------------------------------------------------- /apps/demo-app/src/pages/CaptureSelectionPage/CaptureSelectionPage.tsx: -------------------------------------------------------------------------------- 1 | import { CaptureSelection } from '@monkvision/common-ui-web'; 2 | import { useNavigate } from 'react-router-dom'; 3 | import { useTranslation } from 'react-i18next'; 4 | import { Page } from '../pages'; 5 | 6 | export function CaptureSelectionPage() { 7 | const navigate = useNavigate(); 8 | const { i18n } = useTranslation(); 9 | 10 | return ( 11 | navigate(Page.PHOTO_CAPTURE)} 14 | onAddDamage={() => navigate(Page.DAMAGE_DISCLOSURE)} 15 | /> 16 | ); 17 | } 18 | -------------------------------------------------------------------------------- /packages/common-ui-web/src/components/InspectionGallery/hooks/useInspectionGalleryEmptyLabel.ts: -------------------------------------------------------------------------------- 1 | import { useTranslation } from 'react-i18next'; 2 | 3 | export interface UseInspectionGalleryEmptyLabelParams { 4 | captureMode: boolean; 5 | isFilterActive: boolean; 6 | } 7 | 8 | export function useInspectionGalleryEmptyLabel({ 9 | captureMode, 10 | isFilterActive, 11 | }: UseInspectionGalleryEmptyLabelParams): string { 12 | const { t } = useTranslation(); 13 | if (isFilterActive) { 14 | return t('list.empty.filter'); 15 | } 16 | return captureMode ? t('list.empty.capture') : t('list.empty.nonCapture'); 17 | } 18 | -------------------------------------------------------------------------------- /packages/common-ui-web/src/components/InspectionGallery/translations/it.json: -------------------------------------------------------------------------------- 1 | { 2 | "card": { 3 | "addDamage": "Aggiungi un danno" 4 | }, 5 | "topBar": { 6 | "submit": "Conferma", 7 | "title": "Foto", 8 | "retakeFilter": "Riprese", 9 | "approvedFilter": "Scattate e approvate", 10 | "completed": "Questa ispezione è terminata" 11 | }, 12 | "list": { 13 | "empty": { 14 | "capture": "Nessuna foto. Le foto scattate appariranno qui.", 15 | "nonCapture": "Non ci sono foto in questa ispezione.", 16 | "filter": "Nessun risultato per il filtro selezionato." 17 | } 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /packages/common/test/utils/browser.utils.test.ts: -------------------------------------------------------------------------------- 1 | import { isMobileDevice } from '../../src'; 2 | 3 | describe('isMobileDevice', () => { 4 | it('should return true for mobile user agents', () => { 5 | jest.spyOn(window.navigator, 'userAgent', 'get').mockReturnValue('iphone'); 6 | 7 | const result = isMobileDevice(); 8 | expect(result).toBe(true); 9 | }); 10 | 11 | it('should return false for non-mobile user agents', () => { 12 | jest.spyOn(window.navigator, 'userAgent', 'get').mockReturnValue('safari'); 13 | 14 | const result = isMobileDevice(); 15 | expect(result).toBe(false); 16 | }); 17 | }); 18 | -------------------------------------------------------------------------------- /packages/inspection-capture-web/src/PhotoCapture/PhotoCaptureHUD/PhotoCaptureHUDElementsSight/SightSlider/hooks.ts: -------------------------------------------------------------------------------- 1 | import { CSSProperties } from 'react'; 2 | import { useResponsiveStyle } from '@monkvision/common'; 3 | import { styles } from './SightSlider.styles'; 4 | 5 | export interface SightsSliderHUDStyle { 6 | container: CSSProperties; 7 | } 8 | 9 | export function useSightSliderStyles(): SightsSliderHUDStyle { 10 | const { responsive } = useResponsiveStyle(); 11 | 12 | return { 13 | container: { 14 | ...styles['container'], 15 | ...responsive(styles['containerPortrait']), 16 | }, 17 | }; 18 | } 19 | -------------------------------------------------------------------------------- /packages/common-ui-web/src/components/InspectionGallery/translations/fr.json: -------------------------------------------------------------------------------- 1 | { 2 | "card": { 3 | "addDamage": "Ajouter Un Dégât" 4 | }, 5 | "topBar": { 6 | "submit": "Valider", 7 | "title": "Photos", 8 | "retakeFilter": "Reprises", 9 | "approvedFilter": "Prises et approuvées", 10 | "completed": "Cette inspection est terminée" 11 | }, 12 | "list": { 13 | "empty": { 14 | "capture": "Aucune photo. Les photos prises apparaîtront ici.", 15 | "nonCapture": "Il n'y a aucune photo dans cette inspection.", 16 | "filter": "Aucun résultat pour le filtre sélectionné." 17 | } 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /apps/demo-app/public/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "short_name": "Monk Demo App", 3 | "name": "Monk Inspection Demo Application", 4 | "icons": [ 5 | { 6 | "src": "favicon.ico", 7 | "sizes": "64x64 32x32 24x24 16x16", 8 | "type": "image/x-icon" 9 | }, 10 | { 11 | "src": "logo192.png", 12 | "type": "image/png", 13 | "sizes": "192x192" 14 | }, 15 | { 16 | "src": "logo512.png", 17 | "type": "image/png", 18 | "sizes": "512x512" 19 | } 20 | ], 21 | "start_url": ".", 22 | "display": "standalone", 23 | "theme_color": "#274B9F", 24 | "background_color": "#202020" 25 | } 26 | -------------------------------------------------------------------------------- /apps/demo-app-video/public/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "short_name": "Monk Demo App", 3 | "name": "Monk Inspection Demo Application", 4 | "icons": [ 5 | { 6 | "src": "favicon.ico", 7 | "sizes": "64x64 32x32 24x24 16x16", 8 | "type": "image/x-icon" 9 | }, 10 | { 11 | "src": "logo192.png", 12 | "type": "image/png", 13 | "sizes": "192x192" 14 | }, 15 | { 16 | "src": "logo512.png", 17 | "type": "image/png", 18 | "sizes": "512x512" 19 | } 20 | ], 21 | "start_url": ".", 22 | "display": "standalone", 23 | "theme_color": "#274B9F", 24 | "background_color": "#202020" 25 | } 26 | -------------------------------------------------------------------------------- /packages/common/src/hooks/index.ts: -------------------------------------------------------------------------------- 1 | export * from './useWindowDimensions'; 2 | export * from './useResponsiveStyle'; 3 | export * from './useInteractiveStatus'; 4 | export * from './useQueue'; 5 | export * from './useObjectTranslation'; 6 | export * from './useSightLabel'; 7 | export * from './useLoadingState'; 8 | export * from './useAsyncEffect'; 9 | export * from './useSearchParams'; 10 | export * from './useInterval'; 11 | export * from './useAsyncInterval'; 12 | export * from './useObjectMemo'; 13 | export * from './useForm'; 14 | export * from './useIsMounted'; 15 | export * from './useDeviceOrientation'; 16 | export * from './useSafeTimeout'; 17 | -------------------------------------------------------------------------------- /packages/inspection-capture-web/src/components/Counter/Counter.tsx: -------------------------------------------------------------------------------- 1 | import { styles } from './Counter.styles'; 2 | import { useColorBackground } from '../../hooks'; 3 | import { CounterProps, useCounterLabel } from './hooks'; 4 | 5 | /** 6 | * Component that implements an indicator of pictures taken during the capture process. 7 | */ 8 | export function Counter(props: CounterProps) { 9 | const label = useCounterLabel(props); 10 | const backgroundColor = useColorBackground(); 11 | 12 | return ( 13 |
14 | {label} 15 |
16 | ); 17 | } 18 | -------------------------------------------------------------------------------- /packages/common-ui-web/src/components/InspectionGallery/i18n.ts: -------------------------------------------------------------------------------- 1 | import { i18nCreateSDKInstance } from '@monkvision/common'; 2 | import en from './translations/en.json'; 3 | import fr from './translations/fr.json'; 4 | import de from './translations/de.json'; 5 | import nl from './translations/nl.json'; 6 | import it from './translations/it.json'; 7 | 8 | const i18nInspectionGallery = i18nCreateSDKInstance({ 9 | resources: { 10 | en: { translation: en }, 11 | fr: { translation: fr }, 12 | de: { translation: de }, 13 | nl: { translation: nl }, 14 | it: { translation: it }, 15 | }, 16 | }); 17 | 18 | export { i18nInspectionGallery }; 19 | -------------------------------------------------------------------------------- /packages/network/src/api/liveConfigs/requests.ts: -------------------------------------------------------------------------------- 1 | import { LiveConfig } from '@monkvision/types'; 2 | import ky from 'ky'; 3 | import { getDefaultOptions } from '../config'; 4 | 5 | /** 6 | * Fetch a webapp live configuration from the API. 7 | * 8 | * @param id The ID of the live config to get. 9 | */ 10 | export async function getLiveConfig(id: string): Promise { 11 | const kyOptions = getDefaultOptions(); 12 | const response = await ky.get( 13 | `https://storage.googleapis.com/monk-front-public/live-configurations/${id}.json?nocache=${Date.now()}`, 14 | kyOptions, 15 | ); 16 | return response.json(); 17 | } 18 | -------------------------------------------------------------------------------- /packages/common-ui-web/src/components/InspectionGallery/translations/de.json: -------------------------------------------------------------------------------- 1 | { 2 | "card": { 3 | "addDamage": "Schaden hinzufügen" 4 | }, 5 | "topBar": { 6 | "submit": "Validieren", 7 | "title": "Fotos", 8 | "retakeFilter": "Wiederholungen", 9 | "approvedFilter": "Genehmigt", 10 | "completed": "Diese Inspektion ist abgeschlossen" 11 | }, 12 | "list": { 13 | "empty": { 14 | "capture": "Noch keine Fotos. Die aufgenommenen Fotos werden hier angezeigt.", 15 | "nonCapture": "Es gibt keine Bilder in dieser Inspektion.", 16 | "filter": "Keine Übereinstimmungen mit den ausgewählten Filtern." 17 | } 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /packages/common-ui-web/src/components/VehicleTypeSelection/i18n.ts: -------------------------------------------------------------------------------- 1 | import { i18nCreateSDKInstance } from '@monkvision/common'; 2 | import en from './translations/en.json'; 3 | import fr from './translations/fr.json'; 4 | import de from './translations/de.json'; 5 | import nl from './translations/nl.json'; 6 | import it from './translations/it.json'; 7 | 8 | const i18nVehicleTypeSelection = i18nCreateSDKInstance({ 9 | resources: { 10 | en: { translation: en }, 11 | fr: { translation: fr }, 12 | de: { translation: de }, 13 | nl: { translation: nl }, 14 | it: { translation: it }, 15 | }, 16 | }); 17 | 18 | export { i18nVehicleTypeSelection }; 19 | -------------------------------------------------------------------------------- /packages/inspection-capture-web/src/PhotoCapture/PhotoCaptureHUD/PhotoCaptureHUD.styles.ts: -------------------------------------------------------------------------------- 1 | import { Styles } from '@monkvision/types'; 2 | 3 | export const styles: Styles = { 4 | container: { 5 | width: '100%', 6 | height: '100%', 7 | display: 'flex', 8 | flexDirection: 'row', 9 | alignItems: 'center', 10 | justifyContent: 'flex-end', 11 | position: 'relative', 12 | alignSelf: 'stretch', 13 | }, 14 | containerPortrait: { 15 | __media: { portrait: true }, 16 | flexDirection: 'column', 17 | }, 18 | previewContainer: { 19 | position: 'relative', 20 | width: '100%', 21 | height: '100%', 22 | }, 23 | }; 24 | -------------------------------------------------------------------------------- /packages/inspection-capture-web/src/hooks/useEnforceOrientation.ts: -------------------------------------------------------------------------------- 1 | import { useWindowDimensions } from '@monkvision/common'; 2 | import { DeviceOrientation } from '@monkvision/types'; 3 | 4 | /** 5 | * Custom hook used to check if the current device's orientation is violating the enforced orientation. Returns true if 6 | * an orientation is being enforced and is not matching the current device orientation. 7 | */ 8 | export function useEnforceOrientation(orientation?: DeviceOrientation | null): boolean { 9 | const dimensions = useWindowDimensions(); 10 | return !!orientation && (orientation === DeviceOrientation.PORTRAIT) !== dimensions.isPortrait; 11 | } 12 | -------------------------------------------------------------------------------- /packages/common-ui-web/src/components/InspectionGallery/translations/nl.json: -------------------------------------------------------------------------------- 1 | { 2 | "card": { 3 | "addDamage": "Voeg aangepaste schade toe" 4 | }, 5 | "topBar": { 6 | "submit": "Valideer", 7 | "title": "Foto's", 8 | "retakeFilter": "Opnieuw genomen", 9 | "approvedFilter": "Goedgekeurd", 10 | "completed": "Deze inspectie is voltooid" 11 | }, 12 | "list": { 13 | "empty": { 14 | "capture": "Er zijn nog geen foto's. Foto's die genomen worden, worden hier weergegeven.", 15 | "nonCapture": "Er zijn geen foto's in deze inspectie.", 16 | "filter": "Geen overeenkomsten voor de geselecteerde filter." 17 | } 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /packages/inspection-capture-web/src/DamageDisclosure/DamageDisclosureHUD/DamageDisclosureHUD.styles.ts: -------------------------------------------------------------------------------- 1 | import { Styles } from '@monkvision/types'; 2 | 3 | export const styles: Styles = { 4 | container: { 5 | width: '100%', 6 | height: '100%', 7 | display: 'flex', 8 | flexDirection: 'row', 9 | alignItems: 'center', 10 | justifyContent: 'flex-end', 11 | position: 'relative', 12 | alignSelf: 'stretch', 13 | }, 14 | containerPortrait: { 15 | __media: { portrait: true }, 16 | flexDirection: 'column', 17 | }, 18 | previewContainer: { 19 | position: 'relative', 20 | width: '100%', 21 | height: '100%', 22 | }, 23 | }; 24 | -------------------------------------------------------------------------------- /packages/sights/research/data/vwtroc/overlays/vwtroc-m1rhrZ88.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # yarn 2 | .yarn/* 3 | .yarn/cache 4 | .yarn/install-state.gz 5 | !.yarn/patches 6 | !.yarn/plugins 7 | !.yarn/releases 8 | !.yarn/sdks 9 | !.yarn/versions 10 | 11 | # Swap the comments on the following lines if you don't wish to use zero-installs 12 | # Documentation here: https://yarnpkg.com/features/zero-installs 13 | #!.yarn/cache 14 | .pnp.* 15 | 16 | # modules 17 | node_modules 18 | .idea 19 | 20 | # testing 21 | coverage/ 22 | 23 | # logs 24 | npm-debug.* 25 | npm-debug.log* 26 | yarn-debug.log* 27 | yarn-error.log* 28 | 29 | # cache 30 | .eslintcache 31 | 32 | # misc 33 | .DS_Store 34 | 35 | # vscode 36 | .vscode 37 | 38 | # lerna 39 | lerna-debug.log 40 | -------------------------------------------------------------------------------- /packages/common-ui-web/src/components/InspectionGallery/hooks/useItemListFillers.ts: -------------------------------------------------------------------------------- 1 | import { useWindowDimensions } from '@monkvision/common'; 2 | import { GALLERY_PADDING_PX, ITEM_PADDING_PX } from '../InspectionGallery.styles'; 3 | import { CARD_WIDTH_PX } from '../InspectionGalleryItemCard/InspectionGalleryItemCard.styles'; 4 | 5 | export function useItemListFillers(itemCount: number): number { 6 | const dimensions = useWindowDimensions(); 7 | const itemWidth = CARD_WIDTH_PX + 2 * ITEM_PADDING_PX; 8 | const listWidth = dimensions.width - 2 * GALLERY_PADDING_PX; 9 | const itemsPerRow = Math.floor(listWidth / itemWidth); 10 | return itemsPerRow - (itemCount % itemsPerRow); 11 | } 12 | -------------------------------------------------------------------------------- /packages/common-ui-web/src/components/Login/translations/en.json: -------------------------------------------------------------------------------- 1 | { 2 | "actions": { 3 | "log-in": "Log In", 4 | "log-out": "Log Out" 5 | }, 6 | "errors": { 7 | "popup-closed": "Oops! We couldn't log you in because the popup was closed. Let's try again!", 8 | "token-expired": "Your authentication token is expired. Please log-in again.", 9 | "insufficient-authorization": "You do not have the required authorizations to use this application. Please log out and use a different account.", 10 | "unknown": "Oops! An unexpected error occurred during the log in. Let's try again!", 11 | "missing-token": "The URL you are trying to access is invalid." 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /packages/network/src/api/models/wheelAnalysis.ts: -------------------------------------------------------------------------------- 1 | import type { ApiLabelPrediction } from './common'; 2 | 3 | export type ApiWheelType = 4 | | 'wheel_front_left' 5 | | 'wheel_front_right' 6 | | 'wheel_back_left' 7 | | 'wheel_back_right'; 8 | 9 | export interface ApiWheelAnalysisWithImageId { 10 | hubcap_condition: ApiLabelPrediction; 11 | hubcap_over_rim: ApiLabelPrediction; 12 | hubcap_visual_aspect: ApiLabelPrediction; 13 | image_id?: string; 14 | rim_condition: ApiLabelPrediction; 15 | rim_material: ApiLabelPrediction; 16 | rim_visual_aspect: ApiLabelPrediction; 17 | wheel_name?: ApiWheelType; 18 | } 19 | 20 | export type ApiWheelAnalysis = ApiWheelAnalysisWithImageId[]; 21 | -------------------------------------------------------------------------------- /packages/inspection-capture-web/src/components/ZoomOutShot/hooks.ts: -------------------------------------------------------------------------------- 1 | import { CSSProperties } from 'react'; 2 | import { useResponsiveStyle } from '@monkvision/common'; 3 | import { styles } from './ZoomOutShot.styles'; 4 | 5 | export interface ZoomOutShotStyle { 6 | top: CSSProperties; 7 | infoBtn: CSSProperties; 8 | } 9 | 10 | export function useZoomOutShotStyles(): ZoomOutShotStyle { 11 | const { responsive } = useResponsiveStyle(); 12 | 13 | return { 14 | top: { 15 | ...styles['top'], 16 | ...responsive(styles['topLandscape']), 17 | }, 18 | infoBtn: { 19 | ...styles['infoBtn'], 20 | ...responsive(styles['infoBtnPortrait']), 21 | }, 22 | }; 23 | } 24 | -------------------------------------------------------------------------------- /.github/workflows/build-demo-app.yml: -------------------------------------------------------------------------------- 1 | name: Build Demo App 2 | run-name: Build Demo App On Pull Request 3 | 4 | on: 5 | pull_request: 6 | branches: [main] 7 | 8 | jobs: 9 | build: 10 | name: Build 11 | runs-on: ubuntu-latest 12 | permissions: 13 | actions: read 14 | contents: read 15 | security-events: write 16 | 17 | steps: 18 | - name: 💾 Checking out the repository 19 | uses: actions/checkout@v4 20 | - name: ⚙️ Setting up the MonkJs project 21 | uses: ./.github/actions/monkjs-set-up 22 | with: 23 | build-env: production 24 | - name: 📱 Building the demo app 25 | run: cd apps/demo-app && yarn build:staging 26 | -------------------------------------------------------------------------------- /.github/workflows/code-quality.yml: -------------------------------------------------------------------------------- 1 | name: Code Quality 2 | run-name: Analyze Code Quality On Pull Request 3 | 4 | on: 5 | pull_request: 6 | branches: [main] 7 | 8 | jobs: 9 | checks: 10 | name: Run Checks 11 | runs-on: ubuntu-latest 12 | permissions: 13 | actions: read 14 | contents: read 15 | security-events: write 16 | 17 | steps: 18 | - name: 💾 Checking out the repository 19 | uses: actions/checkout@v4 20 | - name: ⚙️ Setting up the MonkJs project 21 | uses: ./.github/actions/monkjs-set-up 22 | - name: 📝 Checking code formatting 23 | run: yarn lint 24 | - name: 🧪 Running the tests 25 | run: yarn test:coverage 26 | -------------------------------------------------------------------------------- /packages/common-ui-web/src/components/CaptureSelection/hooks.ts: -------------------------------------------------------------------------------- 1 | import { useMonkTheme, useResponsiveStyle } from '@monkvision/common'; 2 | import { styles } from './CaptureSelection.styles'; 3 | 4 | export function useCaptureSelectionStyles() { 5 | const { responsive } = useResponsiveStyle(); 6 | const { palette } = useMonkTheme(); 7 | 8 | return { 9 | container: { 10 | ...styles['container'], 11 | ...responsive(styles['containerSmall']), 12 | }, 13 | contentContainer: { 14 | ...styles['contentContainer'], 15 | ...responsive(styles['contentContainerSmall']), 16 | }, 17 | description: { color: palette.secondary.xlight, ...styles['description'] }, 18 | }; 19 | } 20 | -------------------------------------------------------------------------------- /packages/common-ui-web/src/components/Login/translations/it.json: -------------------------------------------------------------------------------- 1 | { 2 | "actions": { "log-in": "Accedi", "log-out": "Disconnetti" }, 3 | "errors": { 4 | "popup-closed": "Ops! Non siamo riusciti a collegarti perché il pop-up è stato chiuso. Proviamo di nuovo!", 5 | "token-expired": "Il tuo token di autenticazione è scaduto. Effettua nuovamente l'accesso.", 6 | "insufficient-authorization": "Non hai le autorizzazioni necessarie per utilizzare questa applicazione. Disconnettiti e usa un altro account.", 7 | "unknown": "Ops! Si è verificato un errore imprevisto durante la connessione. Proviamo di nuovo!", 8 | "missing-token": "L'URL a cui stai tentando di accedere non è valido." 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /packages/common-ui-web/src/components/Login/translations/nl.json: -------------------------------------------------------------------------------- 1 | { 2 | "actions": { 3 | "log-in": "Inloggen", 4 | "log-out": "Uitloggen" 5 | }, 6 | "errors": { 7 | "popup-closed": "Oeps! We konden u niet inloggen omdat het pop-upvenster werd gesloten. Probeer het nog eens!", 8 | "token-expired": "Uw verificatietoken is verlopen. Log opnieuw in.", 9 | "insufficient-authorization": "U heeft niet de juiste machtigingen om deze applicatie te gebruiken. Log uit en gebruik een ander account.", 10 | "unknown": "Oeps! Er is een onverwachte fout opgetreden tijdens het inloggen. Probeer het nog eens!", 11 | "missing-token": "De URL die u probeert te bereiken is ongeldig." 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /.github/workflows/build-documentation.yml: -------------------------------------------------------------------------------- 1 | name: Build Documentation 2 | run-name: Build Documentation On Pull Request 3 | 4 | on: 5 | pull_request: 6 | branches: [main] 7 | 8 | jobs: 9 | build: 10 | name: Build 11 | runs-on: ubuntu-latest 12 | permissions: 13 | actions: read 14 | contents: read 15 | security-events: write 16 | 17 | steps: 18 | - name: 💾 Checking out the repository 19 | uses: actions/checkout@v4 20 | - name: ⚙️ Setting up the MonkJs project 21 | uses: ./.github/actions/monkjs-set-up 22 | with: 23 | build-env: production 24 | - name: 📚 Building the documentation 25 | run: yarn build:documentation 26 | -------------------------------------------------------------------------------- /packages/common-ui-web/test/components/VehicleTypeAsset/assets.test.ts: -------------------------------------------------------------------------------- 1 | import { VehicleTypeAssetsMap } from '../../../src/components/VehicleTypeAsset/assets'; 2 | import { VehicleType } from '@monkvision/types'; 3 | 4 | describe('VehicleTypeAsset assets map', () => { 5 | it('should be defined', () => { 6 | expect(typeof VehicleTypeAssetsMap).toBe('object'); 7 | }); 8 | 9 | it('should have a defined asset for every vehicle type available in the SDK', () => { 10 | Object.values(VehicleType).forEach((vehicleType) => { 11 | expect(typeof VehicleTypeAssetsMap[vehicleType]).toBe('string'); 12 | expect(VehicleTypeAssetsMap[vehicleType].length).toBeGreaterThan(0); 13 | }); 14 | }); 15 | }); 16 | -------------------------------------------------------------------------------- /packages/sights/research/schemas/subschemas/camera.schema.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://json-schema.org/draft/2020-12/schema", 3 | "$id": "subschemas/camera.schema", 4 | "definitions": { 5 | "xyzArray": { 6 | "$ref": "xyzArray.schema" 7 | } 8 | }, 9 | "type": "object", 10 | "properties": { 11 | "focal_length": { 12 | "type": "number", 13 | "minimum": 0 14 | }, 15 | "location_xyz": { 16 | "$ref": "#/definitions/xyzArray" 17 | }, 18 | "name": { 19 | "type": "string" 20 | }, 21 | "rotation_xyz_deg": { 22 | "$ref": "#/definitions/xyzArray" 23 | } 24 | }, 25 | "required": ["focal_length", "location_xyz", "name", "rotation_xyz_deg"] 26 | } 27 | -------------------------------------------------------------------------------- /documentation/docs/packages/types.md: -------------------------------------------------------------------------------- 1 | --- 2 | sidebar_position: 12 3 | --- 4 | 5 | # types 6 | Shared TypeScript types for the MonkJs SDK. 7 | 8 | ![npm latest package](https://img.shields.io/npm/v/@monkvision/types/latest.svg) 9 | 10 | ## Overview 11 | This package provides type definitions for the MonkJs TypeScript project. Since all the packages in this project are 12 | supposed to be used with the same version number, please only install this package with the proper version. 13 | 14 | ## Complete Documentation 15 | As every other package in the SDK, please refer to 16 | [its README file](https://github.com/monkvision/monkjs/blob/main/packages/types/README.md) for a complete documentation 17 | on how this package works. 18 | -------------------------------------------------------------------------------- /packages/inspection-capture-web/src/PhotoCapture/PhotoCaptureHUD/PhotoCaptureHUDElementsSight/SightGuideline/hooks.ts: -------------------------------------------------------------------------------- 1 | import { AddDamage } from '@monkvision/types'; 2 | import { styles } from './SightGuideline.styles'; 3 | import { useColorBackground } from '../../../../hooks'; 4 | 5 | export interface SightGuidelineParams { 6 | addDamage?: AddDamage; 7 | } 8 | 9 | export function useSightGuidelineStyle({ addDamage }: SightGuidelineParams) { 10 | const backgroundColor = useColorBackground(); 11 | 12 | return { 13 | container: addDamage === AddDamage.DISABLED ? styles['containerWide'] : styles['container'], 14 | guideline: { 15 | ...styles['guideline'], 16 | backgroundColor, 17 | }, 18 | }; 19 | } 20 | -------------------------------------------------------------------------------- /.github/workflows/build-demo-app-video.yml: -------------------------------------------------------------------------------- 1 | name: Build Demo App Video 2 | run-name: Build Demo App Video On Pull Request 3 | 4 | on: 5 | pull_request: 6 | branches: [main] 7 | 8 | jobs: 9 | build: 10 | name: Build 11 | runs-on: ubuntu-latest 12 | permissions: 13 | actions: read 14 | contents: read 15 | security-events: write 16 | 17 | steps: 18 | - name: 💾 Checking out the repository 19 | uses: actions/checkout@v4 20 | - name: ⚙️ Setting up the MonkJs project 21 | uses: ./.github/actions/monkjs-set-up 22 | with: 23 | build-env: production 24 | - name: 📱 Building the demo app video 25 | run: cd apps/demo-app-video && yarn build:staging 26 | -------------------------------------------------------------------------------- /apps/demo-app/public/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 12 | 13 | 14 | Vehicle Inspection 15 | 16 | 17 | 18 |
19 | 20 | 21 | -------------------------------------------------------------------------------- /apps/demo-app-video/public/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 12 | 13 | 14 | Vehicle Inspection 15 | 16 | 17 | 18 |
19 | 20 | 21 | -------------------------------------------------------------------------------- /apps/demo-app/src/components/AppContainer.tsx: -------------------------------------------------------------------------------- 1 | import { PropsWithChildren } from 'react'; 2 | import { MonkThemeProvider, useMonkAppState, useMonkTheme } from '@monkvision/common'; 3 | 4 | function RootStylesContainer({ children }: PropsWithChildren) { 5 | const { rootStyles } = useMonkTheme(); 6 | 7 | return ( 8 |
9 | {children} 10 |
11 | ); 12 | } 13 | 14 | export function AppContainer({ children }: PropsWithChildren) { 15 | const { config } = useMonkAppState(); 16 | 17 | return ( 18 | 19 | {children} 20 | 21 | ); 22 | } 23 | -------------------------------------------------------------------------------- /configs/test-utils/src/async.ts: -------------------------------------------------------------------------------- 1 | export interface FakePromise extends Promise { 2 | resolve: (value: T) => void; 3 | reject: (err?: any) => void; 4 | } 5 | 6 | export function createFakePromise(): FakePromise { 7 | let manualResolve: (value: T) => void = () => {}; 8 | let manualReject: (err?: any) => void = () => {}; 9 | const promise = new Promise((resolve, reject) => { 10 | manualResolve = resolve; 11 | manualReject = reject; 12 | }); 13 | Object.assign(promise, { 14 | resolve: manualResolve, 15 | reject: manualReject, 16 | }); 17 | return promise as FakePromise; 18 | } 19 | 20 | export function flushPromises() { 21 | return new Promise(jest.requireActual('timers').setImmediate); 22 | } 23 | -------------------------------------------------------------------------------- /packages/network/src/api/models/view.ts: -------------------------------------------------------------------------------- 1 | import type { ApiRenderedOutputs } from './renderedOutput'; 2 | 3 | export interface ApiBoundingBox { 4 | xmin: number; 5 | ymin: number; 6 | width: number; 7 | height: number; 8 | } 9 | 10 | export type ApiPolygons = number[][][]; 11 | 12 | export interface ApiSpecification { 13 | bounding_box?: ApiBoundingBox; 14 | polygons?: ApiPolygons; 15 | } 16 | 17 | export interface ApiImageRegion { 18 | id: string; 19 | image_id: string; 20 | specification: ApiSpecification; 21 | } 22 | 23 | export interface ApiView { 24 | element_id: string; 25 | id: string; 26 | image_region: ApiImageRegion; 27 | rendered_outputs: ApiRenderedOutputs; 28 | } 29 | 30 | export type ApiViews = ApiView[]; 31 | -------------------------------------------------------------------------------- /apps/demo-app-video/src/components/AppContainer.tsx: -------------------------------------------------------------------------------- 1 | import { PropsWithChildren } from 'react'; 2 | import { MonkThemeProvider, useMonkAppState, useMonkTheme } from '@monkvision/common'; 3 | 4 | function RootStylesContainer({ children }: PropsWithChildren) { 5 | const { rootStyles } = useMonkTheme(); 6 | 7 | return ( 8 |
9 | {children} 10 |
11 | ); 12 | } 13 | 14 | export function AppContainer({ children }: PropsWithChildren) { 15 | const { config } = useMonkAppState(); 16 | 17 | return ( 18 | 19 | {children} 20 | 21 | ); 22 | } 23 | -------------------------------------------------------------------------------- /documentation/src/components/Home/HomeFeatures/Feature.tsx: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import clsx from 'clsx'; 3 | import styles from './HomeFeatures.module.css'; 4 | import { FeatureItem } from './featureList'; 5 | 6 | export function Feature({ title, Svg, description }: FeatureItem) { 7 | return ( 8 |
9 |
10 | {/* eslint-disable-next-line @typescript-eslint/ban-ts-comment */} 11 | {/* @ts-ignore */} 12 | 13 |
14 |
15 |

{title}

16 |

{description}

17 |
18 |
19 | ); 20 | } 21 | -------------------------------------------------------------------------------- /packages/sights/research/data/haccord/overlays/haccord-pplCo6sV.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /packages/common/test/theme/hooks.test.ts: -------------------------------------------------------------------------------- 1 | jest.mock('react'); 2 | 3 | import { MonkTheme } from '@monkvision/types'; 4 | import React from 'react'; 5 | import { MonkThemeContext, useMonkTheme } from '../../src'; 6 | 7 | describe('useMonkTheme hook', () => { 8 | it('should return the MonkThemeContext', () => { 9 | const context = { 10 | palette: { 11 | alert: { 12 | base: 'test', 13 | }, 14 | }, 15 | } as MonkTheme; 16 | (React.useContext as jest.Mock).mockImplementation(() => context); 17 | const spy = jest.spyOn(React, 'useContext'); 18 | 19 | const theme = useMonkTheme(); 20 | 21 | expect(spy).toHaveBeenCalledWith(MonkThemeContext); 22 | expect(theme).toBe(context); 23 | }); 24 | }); 25 | -------------------------------------------------------------------------------- /configs/jest-config/base.js: -------------------------------------------------------------------------------- 1 | const esModules = ['@monkvision/test-utils', 'ky'].join('|'); 2 | 3 | module.exports = (options) => ({ 4 | rootDir: './', 5 | roots: options?.monorepo ? ['', '/../../configs/test-utils/src/__mocks__'] : [''], 6 | preset: 'ts-jest', 7 | testEnvironment: 'node', 8 | testMatch: ['**/test/**/*.test.ts'], 9 | coverageDirectory: 'coverage', 10 | coverageReporters: ['lcov'], 11 | collectCoverageFrom: [ 12 | 'src/**/*.ts', 13 | ], 14 | transformIgnorePatterns: options?.monorepo ? [] : [`node_modules/(?!${esModules})`], 15 | coverageThreshold: { 16 | global: { 17 | branches: 60, 18 | functions: 60, 19 | lines: 60, 20 | statements: 60, 21 | }, 22 | }, 23 | }) 24 | -------------------------------------------------------------------------------- /documentation/src/utils/schemas/videoCaptureConfig.schema.ts: -------------------------------------------------------------------------------- 1 | import { z } from 'zod'; 2 | import { CaptureWorkflow } from '@monkvision/types'; 3 | import { SharedCaptureAppConfigSchema } from '@site/src/utils/schemas/sharedConfig.schema'; 4 | 5 | export const VideoCaptureAppConfigSchema = z 6 | .object({ 7 | workflow: z.literal(CaptureWorkflow.VIDEO), 8 | minRecordingDuration: z.number().optional(), 9 | maxRetryCount: z.number().optional(), 10 | enableFastWalkingWarning: z.boolean().optional(), 11 | enablePhoneShakingWarning: z.boolean().optional(), 12 | fastWalkingWarningCooldown: z.number().gte(1000).optional(), 13 | phoneShakingWarningCooldown: z.number().gte(1000).optional(), 14 | }) 15 | .and(SharedCaptureAppConfigSchema); 16 | -------------------------------------------------------------------------------- /packages/common/src/utils/vehicle.utils.ts: -------------------------------------------------------------------------------- 1 | import { vehicles } from '@monkvision/sights'; 2 | import { VehicleType, VehicleModel } from '@monkvision/types'; 3 | 4 | /** 5 | * Returns the vehicle model corresponding to the given vehicle type. 6 | */ 7 | export function getVehicleModel(vehicleType: VehicleType): VehicleModel { 8 | const ajustedVehicletype = vehicleType === VehicleType.SUV ? VehicleType.CUV : vehicleType; 9 | const detail = Object.entries(vehicles) 10 | .filter(([type]) => type !== VehicleModel.AUDIA7) 11 | .find(([, details]) => details.type === ajustedVehicletype)?.[1]; 12 | if (detail === undefined) { 13 | throw new Error(`No vehicle model found for vehicle type ${ajustedVehicletype}`); 14 | } 15 | return detail.id; 16 | } 17 | -------------------------------------------------------------------------------- /packages/network/src/api/models/damage.ts: -------------------------------------------------------------------------------- 1 | import { DamageType, VehiclePart } from '@monkvision/types'; 2 | import type { ApiRelatedImages } from './image'; 3 | import type { ApiPartIds } from './part'; 4 | 5 | export interface ApiDamage { 6 | damage_size_cm?: number; 7 | damage_type: string; 8 | id: string; 9 | part_ids: ApiPartIds; 10 | related_images?: ApiRelatedImages; 11 | } 12 | 13 | export interface ApiDamageSimplifiedGet { 14 | damage_type: string; 15 | id: string; 16 | part_ids: ApiPartIds; 17 | damage_size_cm?: number; 18 | } 19 | 20 | export type ApiDamages = ApiDamage[]; 21 | 22 | export type ApiDamageIds = string[]; 23 | 24 | export interface ApiDamagePost { 25 | damage_type: DamageType; 26 | part_type: VehiclePart; 27 | } 28 | -------------------------------------------------------------------------------- /documentation/docs/packages/common.md: -------------------------------------------------------------------------------- 1 | --- 2 | sidebar_position: 3 3 | --- 4 | 5 | # common 6 | Shared logic accross the MonkJs SDK and applications. 7 | 8 | ![npm latest package](https://img.shields.io/npm/v/@monkvision/common/latest.svg) 9 | 10 | ## Overview 11 | This package contains logic and bits of code shared accross the MonkJs project. It is used both internally as a way to 12 | store shared logic accross our packages, as well as externally, by exposing useful interfaces and methods for developers 13 | using our SDK. 14 | 15 | ## Complete Documentation 16 | As every other package in the SDK, please refer to 17 | [its README file](https://github.com/monkvision/monkjs/blob/main/packages/common/README.md) for a complete documentation 18 | on how this package works. 19 | -------------------------------------------------------------------------------- /packages/common-ui-web/src/components/Login/translations/fr.json: -------------------------------------------------------------------------------- 1 | { 2 | "actions": { 3 | "log-in": "Se Connecter", 4 | "log-out": "Se Déconnecter" 5 | }, 6 | "errors": { 7 | "popup-closed": "Oups ! Nous n'avons pas pu vous connecter car la pop-up s'est fermée. Essayons à nouveau !", 8 | "token-expired": "Votre token d'authentification est expiré. Veuillez vous reconnecter.", 9 | "insufficient-authorization": "Vous n'avez pas les autorisations nécessaires pour utiliser cette application. Veuillez vous déconnecter et utiliser un autre compte.", 10 | "unknown": "Oups ! Une erreur inattendue est survenue lors de la connection. Essayons à nouveau !", 11 | "missing-token": "L'URL à laquelle vous essayez d'accéder est invalide." 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /packages/inspection-capture-web/src/VideoCapture/VideoCapturePageLayout/VideoCapturePageLayout.types.ts: -------------------------------------------------------------------------------- 1 | import { ButtonProps } from '@monkvision/common-ui-web'; 2 | 3 | /** 4 | * Props accepted by the VideoCapturePageLayout component. 5 | */ 6 | export interface VideoCapturePageLayoutProps { 7 | /** 8 | * Boolean indicating if a black backdrop should be displayed behind the component. 9 | * 10 | * @default false 11 | */ 12 | showBackdrop?: boolean; 13 | /** 14 | * Boolean indicating if the title of the page should be displayed or not. 15 | * 16 | * @default true 17 | */ 18 | showTitle?: boolean; 19 | /** 20 | * Pass-through props passed down to the confirm button. 21 | */ 22 | confirmButtonProps?: Partial; 23 | } 24 | -------------------------------------------------------------------------------- /packages/monitoring/src/react/hooks.ts: -------------------------------------------------------------------------------- 1 | import { useContext, useMemo } from 'react'; 2 | import { MonitoringAdapter } from '../adapters'; 3 | import { MonitoringContext } from './context'; 4 | 5 | /** 6 | * Custom hook that allows you to access the Monitoring Context methods inside a component. 7 | */ 8 | export function useMonitoring(): MonitoringAdapter { 9 | const adapter = useContext(MonitoringContext); 10 | 11 | return useMemo( 12 | () => ({ 13 | setUserId: adapter.setUserId.bind(adapter), 14 | log: adapter.log.bind(adapter), 15 | handleError: adapter.handleError.bind(adapter), 16 | createTransaction: adapter.createTransaction.bind(adapter), 17 | setTags: adapter.setTags.bind(adapter), 18 | }), 19 | [], 20 | ); 21 | } 22 | -------------------------------------------------------------------------------- /packages/sights/research/data/audia7/overlays/audia7-vedHBC2n.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /packages/sights/research/data/vwtroc/overlays/vwtroc-oIk8RQ3w.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /packages/camera-web/src/i18n.ts: -------------------------------------------------------------------------------- 1 | import { i18nCreateSDKInstance } from '@monkvision/common'; 2 | import en from './translations/en.json'; 3 | import fr from './translations/fr.json'; 4 | import de from './translations/de.json'; 5 | import nl from './translations/nl.json'; 6 | import it from './translations/it.json'; 7 | 8 | /** 9 | * i18n instance of the Camera package. You can use this instance to automatically sync your application current 10 | * language with the one used by the components of the package. 11 | */ 12 | export const i18nCamera = i18nCreateSDKInstance({ 13 | resources: { 14 | en: { translation: en }, 15 | fr: { translation: fr }, 16 | de: { translation: de }, 17 | nl: { translation: nl }, 18 | it: { translation: it }, 19 | }, 20 | }); 21 | -------------------------------------------------------------------------------- /packages/common/src/state/hooks.ts: -------------------------------------------------------------------------------- 1 | import { useContext } from 'react'; 2 | import { MonkContext, MonkStateWithDispatch } from './context'; 3 | 4 | /** 5 | * Custom hook that allows you to access the Monk State Context methods inside a component. 6 | * 7 | * Note : If this hook is called inside a component that is not a child of a MonkProvider component, it will throw an 8 | * error. 9 | */ 10 | export function useMonkState(): MonkStateWithDispatch { 11 | const stateWithDispatch = useContext(MonkContext); 12 | 13 | if (!stateWithDispatch) { 14 | throw new Error( 15 | 'MonkContext not initialized! Did you make a call to `useMonkState()` without initializing the MonkContext in a parent component?', 16 | ); 17 | } 18 | 19 | return stateWithDispatch; 20 | } 21 | -------------------------------------------------------------------------------- /packages/common-ui-web/src/components/TakePictureButton/TakePictureButton.styles.ts: -------------------------------------------------------------------------------- 1 | import { getInteractiveVariants, InteractiveVariation } from '@monkvision/common'; 2 | import { Styles } from '@monkvision/types'; 3 | 4 | export const TAKE_PICTURE_BUTTON_COLORS = getInteractiveVariants( 5 | '#f3f3f3', 6 | InteractiveVariation.DARKEN, 7 | ); 8 | 9 | export const styles: Styles = { 10 | outerLayer: { 11 | borderStyle: 'solid', 12 | borderRadius: '50%', 13 | display: 'inline-block', 14 | cursor: 'pointer', 15 | }, 16 | outerLayerDisabled: { 17 | opacity: 0.75, 18 | cursor: 'default', 19 | }, 20 | innerLayer: { 21 | borderRadius: '50%', 22 | cursor: 'pointer', 23 | }, 24 | innerLayerDisabled: { 25 | cursor: 'default', 26 | }, 27 | }; 28 | -------------------------------------------------------------------------------- /packages/common/src/hooks/useSafeTimeout.ts: -------------------------------------------------------------------------------- 1 | import { useCallback, useEffect, useRef } from 'react'; 2 | 3 | /** 4 | * A custom hook that provides a safe way to use setTimeout. 5 | */ 6 | export function useSafeTimeout() { 7 | const isMounted = useRef(true); 8 | const timeoutRef = useRef | null>(null); 9 | 10 | useEffect(() => { 11 | return () => { 12 | isMounted.current = false; 13 | if (timeoutRef.current) { 14 | clearTimeout(timeoutRef.current); 15 | } 16 | }; 17 | }, []); 18 | 19 | return useCallback((callback: () => void, delay: number) => { 20 | timeoutRef.current = setTimeout(() => { 21 | if (isMounted.current) { 22 | callback(); 23 | } 24 | }, delay); 25 | }, []); 26 | } 27 | -------------------------------------------------------------------------------- /packages/common/test/hooks/useSearchParams.test.ts: -------------------------------------------------------------------------------- 1 | import { renderHook } from '@testing-library/react-hooks'; 2 | import { useSearchParams } from '../../src'; 3 | 4 | describe('useSearchParams hook', () => { 5 | it('should return the proper search params using the window.location property', () => { 6 | Object.defineProperty(global.window, 'location', { 7 | value: 'https://www.mywebsite.com/page?test=1&testtest=2', 8 | configurable: true, 9 | writable: true, 10 | }); 11 | const { result, unmount } = renderHook(useSearchParams); 12 | 13 | expect(result.current.get('test')).toEqual('1'); 14 | expect(result.current.get('testtest')).toEqual('2'); 15 | expect(result.current.get('unknown')).toBeNull(); 16 | 17 | unmount(); 18 | }); 19 | }); 20 | -------------------------------------------------------------------------------- /packages/common-ui-web/src/components/VehicleTypeAsset/VehicleTypeAsset.tsx: -------------------------------------------------------------------------------- 1 | import { VehicleType } from '@monkvision/types'; 2 | import { HTMLProps } from 'react'; 3 | import { VehicleTypeAssetsMap } from './assets'; 4 | 5 | /** 6 | * Props accepted by the VehicleTypeAsset component. 7 | */ 8 | export interface VehicleTypeAssetProps extends HTMLProps { 9 | /** 10 | * The vehicle type to display the image of. 11 | */ 12 | vehicleType: VehicleType; 13 | } 14 | 15 | /** 16 | * This component displays an example image for the given vehicle type. 17 | */ 18 | export function VehicleTypeAsset({ vehicleType, ...passThroughProps }: VehicleTypeAssetProps) { 19 | return {vehicleType}; 20 | } 21 | -------------------------------------------------------------------------------- /packages/sights/research/data/jgc21/overlays/jgc21-2bGeRS3I.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /packages/sights/research/data/all/overlays/all-sLu0CfOt.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /packages/types/src/state/partOperation.ts: -------------------------------------------------------------------------------- 1 | import { Severity } from './common'; 2 | import { MonkEntity, MonkEntityType } from './entity'; 3 | 4 | /** 5 | * Details about the operation needed to repair a damage on a part. 6 | */ 7 | export interface PartOperation extends MonkEntity { 8 | /** 9 | * The type of the entity. 10 | */ 11 | entityType: MonkEntityType.PART_OPERATION; 12 | /** 13 | * The name of the repair operation. 14 | */ 15 | name?: string; 16 | /** 17 | * The severity of the damage on the part. 18 | */ 19 | severity?: Severity; 20 | /** 21 | * The cost of the replacement pieces if the part needs replacement. 22 | */ 23 | piecesOEMCost?: number; 24 | /** 25 | * The total cost of the reparation. 26 | */ 27 | totalCost?: number; 28 | } 29 | -------------------------------------------------------------------------------- /packages/types/src/state/renderedOutput.ts: -------------------------------------------------------------------------------- 1 | import { MonkEntity, MonkEntityType } from './entity'; 2 | import { AdditionalData } from './common'; 3 | 4 | /** 5 | * A rendered output is an image generated by the API by editing an existing image to mark some useful details. 6 | */ 7 | export interface RenderedOutput extends MonkEntity { 8 | /** 9 | * The type of the entity. 10 | */ 11 | entityType: MonkEntityType.RENDERED_OUTPUT; 12 | /** 13 | * The ID of the image this rendered output was generated from. 14 | */ 15 | baseImageId: string; 16 | /** 17 | * The URL at which the rendered output can be downloaded. 18 | */ 19 | path: string; 20 | /** 21 | * Additional data associated with the rendered output. 22 | */ 23 | additionalData?: AdditionalData; 24 | } 25 | -------------------------------------------------------------------------------- /packages/common-ui-web/src/components/Login/translations/de.json: -------------------------------------------------------------------------------- 1 | { 2 | "actions": { 3 | "log-in": "Einloggen", 4 | "log-out": "Sich abmelden" 5 | }, 6 | "errors": { 7 | "popup-closed": "Huch! Wir konnten Sie nicht anmelden, weil das Popup geschlossen wurde. Versuchen wir es noch einmal!", 8 | "token-expired": "Ihr Authentifizierungstoken ist abgelaufen. Bitte melden Sie sich erneut an.", 9 | "insufficient-authorization": "Sie haben nicht die erforderlichen Berechtigungen, um diese Anwendung zu nutzen. Bitte melden Sie sich ab und verwenden Sie ein anderes Konto.", 10 | "unknown": "Huch! Beim Einloggen ist ein unerwarteter Fehler aufgetreten. Versuchen wir es noch einmal!", 11 | "missing-token": "Die URL, auf die Sie zuzugreifen versuchen, ist ungültig." 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /packages/common-ui-web/src/components/VehiclePartSelection/VehiclePartSelection.style.ts: -------------------------------------------------------------------------------- 1 | import { Styles } from '@monkvision/types'; 2 | 3 | export const ICON_SIZE = 40; 4 | 5 | export const styles: Styles = { 6 | wrapper: { 7 | display: 'flex', 8 | alignItems: 'center', 9 | justifyContent: 'space-between', 10 | height: '100%', 11 | width: '100%', 12 | }, 13 | wireframeContainer: { 14 | height: '90%', 15 | width: '100%', 16 | position: 'absolute', 17 | top: '50%', 18 | transform: 'translateY(-50%)', 19 | }, 20 | leftArrowContainer: { 21 | display: 'flex', 22 | }, 23 | leftArrow: { 24 | zIndex: 1, 25 | }, 26 | spacer: { width: `${ICON_SIZE}px` }, 27 | rightArrow: { 28 | position: 'absolute', 29 | right: 0, 30 | }, 31 | }; 32 | -------------------------------------------------------------------------------- /packages/sights/research/data/vwtroc/overlays/vwtroc-36qmcrgr.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /configs/test-utils/src/__mocks__/@monkvision/analytics.tsx: -------------------------------------------------------------------------------- 1 | class AnalyticsAdapterMock { 2 | setUserId = jest.fn(); 3 | setUserProperties = jest.fn(); 4 | resetUser = jest.fn(); 5 | trackEvent = jest.fn(); 6 | setEventsProperties = jest.fn(); 7 | getUserId = jest.fn(() => 'test-user-id'); 8 | } 9 | 10 | export = { 11 | /* Custom Mock Exports */ 12 | AnalyticsAdapterMock, 13 | 14 | /* Mocks */ 15 | EmptyAnalyticsAdapter: AnalyticsAdapterMock, 16 | useAnalytics: jest.fn(() => ({ 17 | setUserId: jest.fn(), 18 | setUserProperties: jest.fn(), 19 | resetUser: jest.fn(), 20 | trackEvent: jest.fn(), 21 | setEventsProperties: jest.fn(), 22 | getUserId: jest.fn(() => 'test-user-id'), 23 | })), 24 | AnalyticsProvider: jest.fn(({ children }) => <>{children}), 25 | }; 26 | -------------------------------------------------------------------------------- /packages/common-ui-web/src/components/IconVerticalPosition/IconVerticalPosition.types.ts: -------------------------------------------------------------------------------- 1 | import { CameraHeight } from '@monkvision/types'; 2 | 3 | export enum IconVerticalPositionVariant { 4 | PRIMARY = 'primary', 5 | SECONDARY = 'secondary', 6 | } 7 | 8 | /** 9 | * Props accepted by the IconVerticalPosition component. 10 | */ 11 | export interface IconVerticalPositionProps { 12 | /** 13 | * The size (width and height, in pixels) of the icon. 14 | * 15 | * @default 50 16 | */ 17 | size?: number; 18 | /** 19 | * The height position of the icon. 20 | * 21 | * @default CameraHeight.MID 22 | */ 23 | position?: CameraHeight; 24 | /** 25 | * The height position of the icon. 26 | * 27 | * @default primary 28 | */ 29 | variant?: IconVerticalPositionVariant; 30 | } 31 | -------------------------------------------------------------------------------- /packages/common-ui-web/src/components/InspectionGallery/hooks/useInspectionGalleryStyles.ts: -------------------------------------------------------------------------------- 1 | import { useMonkTheme, useResponsiveStyle } from '@monkvision/common'; 2 | import { styles } from '../InspectionGallery.styles'; 3 | 4 | export function useInspectionGalleryStyles() { 5 | const { responsive } = useResponsiveStyle(); 6 | const { palette } = useMonkTheme(); 7 | 8 | return { 9 | containerStyle: { 10 | ...styles['container'], 11 | ...responsive(styles['containerSmallScreen']), 12 | backgroundColor: palette.background.base, 13 | }, 14 | itemListStyle: styles['itemList'], 15 | itemStyle: styles['item'], 16 | fillerItemStyle: styles['fillerItem'], 17 | emptyStyle: { 18 | ...styles['empty'], 19 | color: palette.text.primary, 20 | }, 21 | }; 22 | } 23 | -------------------------------------------------------------------------------- /packages/common/src/state/context.ts: -------------------------------------------------------------------------------- 1 | import { createContext, Dispatch } from 'react'; 2 | import { MonkAction } from './actions'; 3 | import { MonkState } from './state'; 4 | 5 | /** 6 | * An object that wraps the Monk state as well as its dispatch function. 7 | */ 8 | export interface MonkStateWithDispatch { 9 | /** 10 | * The state of all the Monk entities. 11 | */ 12 | state: MonkState; 13 | /** 14 | * The dispatch function used to dispatch actions to modify the state. 15 | */ 16 | dispatch: Dispatch; 17 | } 18 | 19 | /** 20 | * A React Context that contains the Monk state as well as its dispatch function. If no MonkProvider was defined above, 21 | * the default value is `null`. 22 | */ 23 | export const MonkContext = createContext(null); 24 | -------------------------------------------------------------------------------- /documentation/src/components/Icons/IconCard/IconCard.module.css: -------------------------------------------------------------------------------- 1 | :root { 2 | --icon-card-border-radius: 10px; 3 | } 4 | 5 | .icon-card { 6 | margin: 20px; 7 | border: none; 8 | padding: 20px; 9 | border-radius: var(--icon-card-border-radius); 10 | background-color: var(--icon-card-background); 11 | width: 150px; 12 | display: flex; 13 | flex-direction: column; 14 | align-self: stretch; 15 | justify-content: center; 16 | align-items: center; 17 | cursor: pointer; 18 | } 19 | 20 | .icon-card:hover { 21 | background-color: var(--icon-card-background-hover); 22 | } 23 | 24 | .icon-card:active { 25 | background-color: var(--icon-card-background-active); 26 | } 27 | 28 | .icon-name { 29 | margin-top: 20px; 30 | font-size: 16px; 31 | font-family: monospace; 32 | position: relative; 33 | } 34 | --------------------------------------------------------------------------------