Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion angular/document-reader-device/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
"@angular/platform-browser": "^19.0.0",
"@angular/platform-browser-dynamic": "^19.0.0",
"@angular/router": "^19.0.0",
"@regulaforensics/vp-frontend-document-components": "2.6.1",
"@regulaforensics/vp-frontend-document-device": "*",
"rxjs": "~7.8.0",
"tslib": "^2.3.0",
"zone.js": "~0.15.0"
Expand Down
4 changes: 2 additions & 2 deletions angular/document-reader-device/src/app/app.component.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { Component, OnInit } from '@angular/core';
import { CommonModule } from '@angular/common';
import { ReaderComponent } from './components/reader.component';
import { defineComponents, DocumentReaderDetailType } from '@regulaforensics/vp-frontend-document-components';
import { defineComponents, DocumentReaderDeviceDetailType } from '@regulaforensics/vp-frontend-document-device';

@Component({
selector: 'app-root',
Expand All @@ -16,7 +16,7 @@ export class AppComponent implements OnInit {
defineComponents();
}

documentReaderHandler(data: CustomEvent<DocumentReaderDetailType>) {
documentReaderHandler(data: CustomEvent<DocumentReaderDeviceDetailType>) {
if (data.detail.action === 'PROCESS_FINISHED') {
const status = data.detail.data?.status;
const isFinishStatus = status === 1;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Component, AfterViewInit, ViewChild, ElementRef, CUSTOM_ELEMENTS_SCHEMA } from '@angular/core';
import { type DocumentReaderDeviceWebComponent } from '@regulaforensics/vp-frontend-document-components';
import { type DocumentReaderDeviceWebComponent } from '@regulaforensics/vp-frontend-document-device';

@Component({
selector: 'app-reader',
Expand Down
9 changes: 8 additions & 1 deletion angular/document-reader-device/src/globals.d.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,14 @@
import { DocumentReaderDeviceWebComponent } from '@regulaforensics/vp-frontend-document-components';
import {
DocumentReaderDeviceWebComponent,
DocumentReaderDeviceDetailType
} from '@regulaforensics/vp-frontend-document-device';

declare global {
interface HTMLElementTagNameMap {
'document-reader-device': DocumentReaderDeviceWebComponent;
}

interface HTMLElementEventMap {
'document-reader-device': CustomEvent<DocumentReaderDeviceDetailType>;
}
}
5 changes: 2 additions & 3 deletions cdn/document-reader-device.html
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,8 @@
<div id="container">
<button id="button">Open component</button>
</div>
<script src="https://unpkg.com/@regulaforensics/vp-frontend-document-components@2.6.1/dist/main.iife.js"></script>
<script>
const { defineComponents } = window.Regula;
<script type="module">
import { defineComponents } from 'https://unpkg.com/@regulaforensics/vp-frontend-document-device@latest/dist/index.js';

const container = document.querySelector('#container');
const button = document.querySelector('#button');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,13 @@ import {
EventActions,
defineComponents,
type DocumentReaderDeviceWebComponent,
type DocumentReaderDetailType
} from '@regulaforensics/vp-frontend-document-components';
type DocumentReaderDeviceDetailType
} from '@regulaforensics/vp-frontend-document-device';

const component = ref<DocumentReaderDeviceWebComponent>();
const isOpen = ref(false);

const listener = (data: CustomEvent<DocumentReaderDetailType>) => {
const listener = (data: CustomEvent<DocumentReaderDeviceDetailType>) => {
if (data.detail.action === EventActions.PROCESS_FINISHED) {
const status = data.detail.data?.status;
const isFinishStatus = status === 1;
Expand Down
2 changes: 1 addition & 1 deletion nuxt/document-reader-device/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"postinstall": "nuxt prepare"
},
"dependencies": {
"@regulaforensics/vp-frontend-document-components": "2.6.1",
"@regulaforensics/vp-frontend-document-device": "*",
"nuxt": "^3.12.4",
"vue": "latest"
}
Expand Down
4 changes: 2 additions & 2 deletions ui-components/react/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import {
DocumentReaderApi,
Configuration,
Scenario,
InlineResponse2001,
ProcessResponse,
ProcessRequest,
} from '@regulaforensics/document-reader-webclient';
import { ResultTabs } from './components/ResultTabs';
Expand All @@ -17,7 +17,7 @@ interface ProcessingData {

export const App = () => {
const [processingData, setProcessingData] = useState<ProcessingData | null>(null);
const [response, setResponse] = useState<InlineResponse2001 | null>(null);
const [response, setResponse] = useState<ProcessResponse | null>(null);
const [request, setRequest] = useState<ProcessRequest | null>(null);
const [isLoading, setIsLoading] = useState(false);
const showComponent = isLoading || (!isLoading && response);
Expand Down
1 change: 1 addition & 0 deletions ui-components/react/components/Menu.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ export const Menu: FC<MenuProps> = ({
};

const handleImageUpload = (event: ChangeEvent<HTMLInputElement>) => {
if (!event.target.files?.[0]) return;
convertToBase64({ file: event.target.files?.[0], mode: 'upload' });
};

Expand Down
2 changes: 2 additions & 0 deletions ui-components/react/globals.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
declare module '*.jpg';
declare module '*.jpeg';
14 changes: 7 additions & 7 deletions ui-components/react/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,14 @@
"dependencies": {
"@regulaforensics/document-reader-webclient": "*",
"@regulaforensics/ui-components": "*",
"react": "^19.0.0",
"react-dom": "^19.0.0"
"react": "^19.1.0",
"react-dom": "^19.1.0"
},
"devDependencies": {
"@types/react": "^19.0.1",
"@types/react-dom": "^19.0.2",
"@vitejs/plugin-react": "^4.3.4",
"typescript": "^5.7.2",
"vite": "^6.2.0"
"@types/react": "^19.1.8",
"@types/react-dom": "^19.1.6",
"@vitejs/plugin-react": "^4.6.0",
"typescript": "^5.8.3",
"vite": "^7.0.5"
}
}
26 changes: 0 additions & 26 deletions ui-components/react/tsconfig.app.json

This file was deleted.

32 changes: 23 additions & 9 deletions ui-components/react/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,25 @@
{
"files": [],
"references": [
{
"path": "./tsconfig.app.json"
},
{
"path": "./tsconfig.node.json"
}
]
"compilerOptions": {
"composite": true,
"target": "ES2020",
"useDefineForClassFields": true,
"lib": ["ES2020", "DOM", "DOM.Iterable"],
"module": "ESNext",
"skipLibCheck": true,

/* Bundler mode */
"moduleResolution": "bundler",
"allowImportingTsExtensions": true,
"resolveJsonModule": true,
"isolatedModules": true,
"moduleDetection": "force",
"noEmit": true,
"jsx": "react-jsx",

/* Linting */
"strict": true,
"noUnusedLocals": true,
"noUnusedParameters": true,
"noFallthroughCasesInSwitch": true
}
}
15 changes: 0 additions & 15 deletions ui-components/react/tsconfig.node.json

This file was deleted.

8 changes: 4 additions & 4 deletions webpack/camera-snapshot/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@
"@regulaforensics/vp-frontend-document-components": "*"
},
"devDependencies": {
"babel-loader": "^9.2.1",
"babel-loader": "^10.0.0",
"html-webpack-plugin": "^5.6.3",
"webpack": "^5.97.1",
"webpack-cli": "^5.1.4",
"webpack-dev-server": "^5.2.0"
"webpack": "^5.100.2",
"webpack-cli": "^6.0.1",
"webpack-dev-server": "^5.2.2"
}
}
2 changes: 1 addition & 1 deletion webpack/document-reader-device/index.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { defineComponents } from '@regulaforensics/vp-frontend-document-components';
import { defineComponents } from '@regulaforensics/vp-frontend-document-device';

const container = document.querySelector('#container');
const button = document.querySelector('#button');
Expand Down
10 changes: 5 additions & 5 deletions webpack/document-reader-device/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,13 @@
"author": "",
"license": "ISC",
"dependencies": {
"@regulaforensics/vp-frontend-document-components": "2.6.1"
"@regulaforensics/vp-frontend-document-device": "*"
},
"devDependencies": {
"babel-loader": "^9.2.1",
"babel-loader": "^10.0.0",
"html-webpack-plugin": "^5.6.3",
"webpack": "^5.97.1",
"webpack-cli": "^5.1.4",
"webpack-dev-server": "^5.2.0"
"webpack": "^5.100.2",
"webpack-cli": "^6.0.1",
"webpack-dev-server": "^5.2.2"
}
}
8 changes: 4 additions & 4 deletions webpack/document-reader/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@
"@regulaforensics/vp-frontend-document-components": "*"
},
"devDependencies": {
"babel-loader": "^9.2.1",
"babel-loader": "^10.0.0",
"html-webpack-plugin": "^5.6.3",
"webpack": "^5.97.1",
"webpack-cli": "^5.1.4",
"webpack-dev-server": "^5.2.0"
"webpack": "^5.100.2",
"webpack-cli": "^6.0.1",
"webpack-dev-server": "^5.2.2"
}
}