UNPKG

@dbp-topics/signature

Version:

[GitLab Repository](https://gitlab.tugraz.at/dbp/esign/signature) | [npmjs package](https://www.npmjs.com/package/@dbp-topics/signature) | [Unpkg CDN](https://unpkg.com/browse/@dbp-topics/signature/) | [Esign Bundle](https://gitlab.tugraz.at/dbp/esign/dbp

1 lines 4.11 kB
{"version":3,"file":"dbp-signature-verification.js","sources":["../src/dbp-signature-verification.js"],"sourcesContent":["import {createInstance} from './i18n.js';\nimport {css, html} from 'lit';\nimport {ScopedElementsMixin} from '@open-wc/scoped-elements';\nimport DBPSignatureLitElement from './dbp-signature-lit-element';\nimport * as commonUtils from '@dbp-toolkit/common/utils';\nimport * as commonStyles from '@dbp-toolkit/common/styles';\nimport metadata from './dbp-signature-verification.metadata.json';\nimport {Activity} from './activity.js';\n\nclass SignatureVerification extends ScopedElementsMixin(DBPSignatureLitElement) {\n constructor() {\n super();\n this._i18n = createInstance();\n this.lang = this._i18n.language;\n }\n\n static get scopedElements() {\n return {};\n }\n\n static get properties() {\n return {\n ...super.properties,\n lang: {type: String},\n };\n }\n\n update(changedProperties) {\n changedProperties.forEach((oldValue, propName) => {\n switch (propName) {\n case 'lang':\n this._i18n.changeLanguage(this.lang);\n break;\n }\n });\n\n super.update(changedProperties);\n }\n\n static get styles() {\n // language=css\n return css`\n ${commonStyles.getThemeCSS()}\n ${commonStyles.getGeneralCSS(false)}\n ${commonStyles.getLinkCss()}\n \n a {\n border-bottom: var(--dbp-border);\n border-color: var(--dbp-content);\n padding: 0;\n }\n\n h2:first-child {\n margin-top: 0;\n margin-bottom: 0px;\n }\n\n .subheadline {\n font-style: italic;\n padding-left: 2em;\n margin-top: -1px;\n /*line-height: 1.8;*/\n margin-bottom: 1.2em;\n }\n `;\n }\n\n render() {\n const i18n = this._i18n;\n const activity = new Activity(metadata);\n return html`\n <h2>${activity.getName(this.lang)}</h2>\n <p class=\"subheadline\">${activity.getDescription(this.lang)}</p>\n <p>${i18n.t('signature-verification-extern.description-text')}</p>\n <a\n target=\"_blank\"\n rel=\"noopener\"\n class=\"link\"\n href=\"https://www.signaturpruefung.gv.at\">\n ${i18n.t('signature-verification-extern.link-label')}\n </a>\n <p>${i18n.t('signature-verification-extern.adobe-reader-text')}</p>\n <slot name=\"additional-information\"></slot>\n `;\n }\n}\n\ncommonUtils.defineCustomElement('dbp-signature-verification', SignatureVerification);\n"],"names":["SignatureVerification","ScopedElementsMixin","DBPSignatureLitElement","constructor","super","this","_i18n","createInstance","lang","language","scopedElements","properties","_extends","type","String","update","changedProperties","forEach","oldValue","propName","changeLanguage","styles","css","_t","_","commonStyles.getThemeCSS","commonStyles.getGeneralCSS","commonStyles.getLinkCss","render","i18n","activity","Activity","metadata","html","_t2","getName","getDescription","t","commonUtils.defineCustomElement"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;onBASA,MAAMA,UAA8BC,EAAoBC,IACpDC,cACIC,QACAC,KAAKC,MAAQC,IACbF,KAAKG,KAAOH,KAAKC,MAAMG,SAGhBC,4BACP,MAAO,GAGAC,wBACP,OAAAC,EAAA,GACOR,MAAMO,WADb,CAEIH,KAAM,CAACK,KAAMC,UAIrBC,OAAOC,GACHA,EAAkBC,SAAQ,CAACC,EAAUC,KACjC,GACS,SADDA,EAEAd,KAAKC,MAAMc,eAAef,KAAKG,SAK3CJ,MAAMW,OAAOC,GAGNK,oBAEP,OAAOC,EAAIC,IAAAA,EAAAC,CAAA;cAAX;cAAA;cAAA;;;;;;;;;;;;;;;;;;;;WACMC,IACAC,GAA2B,GAC3BC,KAuBVC,SACI,MAAMC,EAAOxB,KAAKC,MACZwB,EAAW,IAAIC,EAASC,GAC9B,OAAOC,EAAKC,IAAAA,EAAAV,CAAA;kBAAZ;qCAAA;iBAAA;;;;;;kBAAA;;iBAAA;;WACUM,EAASK,QAAQ9B,KAAKG,MACHsB,EAASM,eAAe/B,KAAKG,MACjDqB,EAAKQ,EAAE,kDAMNR,EAAKQ,EAAE,4CAERR,EAAKQ,EAAE,qDAMxBC,EAAgC,6BAA8BtC"}