Skip to content
Snippets Groups Projects
Unverified Commit 4c4b4c84 authored by Bekerle, Patrizio's avatar Bekerle, Patrizio :fire:
Browse files

Integrate dbp-provider and AdapterLitElement (#32)

parent 520c4b7f
No related branches found
No related tags found
No related merge requests found
Pipeline #15664 passed
Showing with 58 additions and 1290 deletions
......@@ -13,5 +13,6 @@
"description": {
"de": "Erlaubt das Hochladen von PDF-Dokumenten, um sie mit einer Amtssignatur zu versehen",
"en": "Allows upload of PDF-documents to officially sign them"
}
},
"subscribe": "lang:lang,entry-point-url:global-entry-point-url"
}
......@@ -13,5 +13,6 @@
"description": {
"de": "Erlaubt das Hochladen von PDF-Dokumenten, um sie mit einer persönlichen elektronischen Signatur zu versehen",
"en": "Allows upload of PDF-documents to personally sign them"
}
},
"subscribe": "lang:lang,entry-point-url:global-entry-point-url"
}
......@@ -13,5 +13,6 @@
"description": {
"de": "Erlaubt das Verifizieren von signierten PDF-Dokumenten",
"en": "Allows verification of signed PDF-documents"
}
},
"subscribe": "lang:lang,entry-point-url:global-entry-point-url"
}
......@@ -13,5 +13,6 @@
"description": {
"de": "Erlaubt das Verifizieren von signierten PDF-Dokumenten",
"en": "Allows verification of signed PDF-documents"
}
},
"subscribe": "lang:lang,entry-point-url:global-entry-point-url"
}
......@@ -18,6 +18,7 @@
</script>
<!-- App bundles-->
<script type="module" src="<%= getUrl('dbp-provider.js') %>"></script>
<script type="module" src="<%= getUrl(name + '.js') %>"></script>
<!-- Prevent Chrome/Edge from suggesting to translate the page -->
......@@ -53,15 +54,17 @@
</head>
<body>
<dbp-provider id="root"
init="lang=de,global-entry-point-url=<%= entryPointURL %>">
<<%= name %>
lang="de"
subscribe="lang:lang,entry-point-url:global-entry-point-url"
src="<%= getUrl(name + '.topic.metadata.json') %>"
entry-point-url="<%= entryPointURL %>"
base-path="<%= getUrl('') %>"
keycloak-config='{"url": "<%= keyCloakBaseURL %>", "realm": "tugraz", "clientId": "<%= keyCloakClientId %>", "silentCheckSsoRedirectUri": "<%= getUrl('silent-check-sso.html') %>"}'
matomo-url='https://analytics.tugraz.at/'
matomo-site-id='<%= matomoSiteId %>'
><dbp-loading-spinner></dbp-loading-spinner></<%= name %>>
</dbp-provider>
<!-- Error handling for too old browsers -->
<script src="<%= getPrivateUrl('browser-check.js') %>" defer></script>
......
......@@ -186,6 +186,7 @@ export async function getPackagePath(packageName, assetPath) {
export default (async () => {return {
input: (build != 'test') ? [
'src/' + pkg.name + '.js',
'vendor/toolkit/packages/provider/src/dbp-provider.js',
'src/dbp-official-signature-pdf-upload.js',
'src/dbp-qualified-signature-pdf-upload.js',
'src/dbp-signature-verification.js',
......
......@@ -61,7 +61,7 @@ class OfficialSignaturePdfUpload extends ScopedElementsMixin(DBPSignatureLitElem
}
static get properties() {
return {
return this.getProperties({
lang: { type: String },
entryPointUrl: { type: String, attribute: 'entry-point-url' },
signedFiles: { type: Array, attribute: false },
......@@ -81,7 +81,7 @@ class OfficialSignaturePdfUpload extends ScopedElementsMixin(DBPSignatureLitElem
signaturePlacementInProgress: { type: Boolean, attribute: false },
withSigBlock: { type: Boolean, attribute: false },
isSignaturePlacement: { type: Boolean, attribute: false },
};
});
}
connectedCallback() {
......
......@@ -51,7 +51,7 @@ export class PdfPreview extends ScopedElementsMixin(DBPLitElement) {
* See: https://lit-element.polymer-project.org/guide/properties#initialize
*/
static get properties() {
return {
return this.getProperties({
lang: { type: String },
currentPage: { type: Number, attribute: false },
totalPages: { type: Number, attribute: false },
......@@ -62,7 +62,7 @@ export class PdfPreview extends ScopedElementsMixin(DBPLitElement) {
placeholder: { type: String, attribute: 'signature-placeholder-image-src' },
signature_width: { type: Number, attribute: 'signature-width' },
signature_height: { type: Number, attribute: 'signature-height' },
};
});
}
update(changedProperties) {
......
......@@ -65,7 +65,7 @@ class QualifiedSignaturePdfUpload extends ScopedElementsMixin(DBPSignatureLitEle
}
static get properties() {
return {
return this.getProperties({
lang: { type: String },
entryPointUrl: { type: String, attribute: 'entry-point-url' },
signedFiles: { type: Array, attribute: false },
......@@ -86,7 +86,7 @@ class QualifiedSignaturePdfUpload extends ScopedElementsMixin(DBPSignatureLitEle
signaturePlacementInProgress: { type: Boolean, attribute: false },
withSigBlock: { type: Boolean, attribute: false },
isSignaturePlacement: { type: Boolean, attribute: false },
};
});
}
connectedCallback() {
......
import {LitElement} from "lit-element";
import {EventBus} from '@dbp-toolkit/common';
import buildinfo from 'consts:buildinfo';
import * as utils from "./utils";
import {AdapterLitElement} from "@dbp-toolkit/provider/src/adapter-lit-element";
export class DBPSignatureBaseLitElement extends LitElement {
export class DBPSignatureBaseLitElement extends AdapterLitElement {
constructor() {
super();
}
......
......@@ -52,7 +52,7 @@ class SignatureVerificationFull extends ScopedElementsMixin(DBPSignatureLitEleme
}
static get properties() {
return {
return this.getProperties({
lang: { type: String },
entryPointUrl: { type: String, attribute: 'entry-point-url' },
verifiedFiles: { type: Array, attribute: false },
......@@ -70,7 +70,7 @@ class SignatureVerificationFull extends ScopedElementsMixin(DBPSignatureLitEleme
currentFileName: { type: String, attribute: false },
previewInProgress: { type: Boolean, attribute: false },
isSignaturePlacement: { type: Boolean, attribute: false },
};
});
}
connectedCallback() {
......
......@@ -18,9 +18,9 @@ class SignatureVerification extends ScopedElementsMixin(DBPSignatureLitElement)
}
static get properties() {
return {
return this.getProperties({
lang: { type: String },
};
});
}
update(changedProperties) {
......
Subproject commit dcd4d7b101b8f87939496916a4d53d41867ac696
Subproject commit 1972b2cea217bc732da1d65499e6070e8fcb0a8f
This diff is collapsed.
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment