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