diff --git a/package-lock.json b/package-lock.json index fa8d49aa3a2ba72b4f35cefc5d201f0f68101410..398b7a82afd34387c8d4df83134d14244f045c87 100644 --- a/package-lock.json +++ b/package-lock.json @@ -5461,6 +5461,7 @@ "vpu-auth": { "version": "file:vendor/auth", "requires": { + "@open-wc/scoped-elements": "^1.0.8", "event-target-shim": "^5.0.1", "keycloak-js": "^8.0.0", "lit-element": "^2.1.0" @@ -5469,6 +5470,7 @@ "vpu-common": { "version": "file:vendor/common", "requires": { + "@open-wc/scoped-elements": "^1.0.8", "@sentry/browser": "^5.13.2", "i18next": "^19.3.2", "lit-element": "^2.2.1" @@ -5477,6 +5479,7 @@ "vpu-file-upload": { "version": "file:vendor/file-upload", "requires": { + "@open-wc/scoped-elements": "^1.0.8", "i18next": "^19.4.2", "lit-element": "^2.1.0", "lit-html": "^1.1.1", @@ -5493,6 +5496,7 @@ "vpu-notification": { "version": "file:vendor/notification", "requires": { + "@open-wc/scoped-elements": "^1.0.8", "lit-element": "^2.1.0" } }, diff --git a/package.json b/package.json index 61402d483dcc3aa7e4ef62e9d52a16c462c8895e..3190742aa0bec568969e8ee459ebbdf63b17f76d 100644 --- a/package.json +++ b/package.json @@ -40,6 +40,7 @@ "selfsigned": "^1.10.7" }, "dependencies": { + "@open-wc/scoped-elements": "^1.0.8", "file-saver": "^2.0.2", "i18next": "^19.4.2", "jquery": "^3.5.0", diff --git a/src/vpu-official-signature-pdf-upload.js b/src/vpu-official-signature-pdf-upload.js index 56defbfb651429b89004e24edbe806e6a7ed5424..c4a089777a4c00bd4853d6099eab956f98351c18 100644 --- a/src/vpu-official-signature-pdf-upload.js +++ b/src/vpu-official-signature-pdf-upload.js @@ -1,18 +1,20 @@ import {createI18nInstance} from './i18n.js'; import {humanFileSize} from 'vpu-common/i18next.js'; import {css, html} from 'lit-element'; +import {ScopedElementsMixin} from '@open-wc/scoped-elements'; import VPUSignatureLitElement from "./vpu-signature-lit-element"; import * as commonUtils from 'vpu-common/utils'; +import {Icon} from 'vpu-common'; import * as utils from './utils'; import JSZip from 'jszip/dist/jszip.js'; import 'file-saver'; import * as commonStyles from 'vpu-common/styles'; import {classMap} from 'lit-html/directives/class-map.js'; -import 'vpu-file-upload'; +import {FileUpload} from 'vpu-file-upload'; const i18n = createI18nInstance(); -class OfficialSignaturePdfUpload extends VPUSignatureLitElement { +class OfficialSignaturePdfUpload extends ScopedElementsMixin(VPUSignatureLitElement) { constructor() { super(); this.lang = i18n.language; @@ -27,6 +29,16 @@ class OfficialSignaturePdfUpload extends VPUSignatureLitElement { this.uploadStatusText = ""; } + static get scopedElements() { + return { + 'vpu-icon': Icon, + 'vpu-fileupload': FileUpload, + // FIXME: move them to explicit exports + 'vpu-mini-spinner': customElements.get('vpu-mini-spinner'), + 'vpu-button': customElements.get('vpu-button'), + }; + } + static get properties() { return { lang: { type: String }, diff --git a/src/vpu-qualified-signature-pdf-upload.js b/src/vpu-qualified-signature-pdf-upload.js index bdfef3ea9f278d936d1c0d0cbbce2f8cee9cab82..e2bc0976273e15bfd0e1de9bba8fddf963b06c6d 100644 --- a/src/vpu-qualified-signature-pdf-upload.js +++ b/src/vpu-qualified-signature-pdf-upload.js @@ -1,18 +1,20 @@ import {createI18nInstance} from './i18n.js'; import {humanFileSize} from 'vpu-common/i18next.js'; import {css, html} from 'lit-element'; +import {ScopedElementsMixin} from '@open-wc/scoped-elements'; import VPUSignatureLitElement from "./vpu-signature-lit-element"; import * as commonUtils from 'vpu-common/utils'; import * as utils from './utils'; +import {Icon} from 'vpu-common'; import JSZip from 'jszip/dist/jszip.js'; import 'file-saver'; import * as commonStyles from 'vpu-common/styles'; import {classMap} from 'lit-html/directives/class-map.js'; -import 'vpu-file-upload'; +import {FileUpload} from 'vpu-file-upload'; const i18n = createI18nInstance(); -class QualifiedSignaturePdfUpload extends VPUSignatureLitElement { +class QualifiedSignaturePdfUpload extends ScopedElementsMixin(VPUSignatureLitElement) { constructor() { super(); this.lang = i18n.language; @@ -29,6 +31,16 @@ class QualifiedSignaturePdfUpload extends VPUSignatureLitElement { this.uploadStatusText = ""; } + static get scopedElements() { + return { + 'vpu-icon': Icon, + 'vpu-fileupload': FileUpload, + // FIXME: move them to explicit exports + 'vpu-mini-spinner': customElements.get('vpu-mini-spinner'), + 'vpu-button': customElements.get('vpu-button'), + }; + } + static get properties() { return { lang: { type: String }, diff --git a/vendor/app-shell b/vendor/app-shell index 9a4486988002f72524f56c07b89a06e467e6cdd1..6279a585c904cf59118b99d2e022cfc500c95de7 160000 --- a/vendor/app-shell +++ b/vendor/app-shell @@ -1 +1 @@ -Subproject commit 9a4486988002f72524f56c07b89a06e467e6cdd1 +Subproject commit 6279a585c904cf59118b99d2e022cfc500c95de7 diff --git a/vendor/auth b/vendor/auth index 0ec14423f6d7472608b0ee1bdaded8a0e89dc331..fbf83528159f7d3eeceedff287831dece6b9b46d 160000 --- a/vendor/auth +++ b/vendor/auth @@ -1 +1 @@ -Subproject commit 0ec14423f6d7472608b0ee1bdaded8a0e89dc331 +Subproject commit fbf83528159f7d3eeceedff287831dece6b9b46d diff --git a/vendor/common b/vendor/common index 4add31a6dd4c0576fc2189ca250afed101b871f8..010b54fa455829d732152b6794c7a92a874249aa 160000 --- a/vendor/common +++ b/vendor/common @@ -1 +1 @@ -Subproject commit 4add31a6dd4c0576fc2189ca250afed101b871f8 +Subproject commit 010b54fa455829d732152b6794c7a92a874249aa diff --git a/vendor/file-upload b/vendor/file-upload index 8ca07137492cf9111247224691e52ea8d296b42d..3e3d72eac23816f90f2cfa276e2c8b5a260f2448 160000 --- a/vendor/file-upload +++ b/vendor/file-upload @@ -1 +1 @@ -Subproject commit 8ca07137492cf9111247224691e52ea8d296b42d +Subproject commit 3e3d72eac23816f90f2cfa276e2c8b5a260f2448 diff --git a/vendor/language-select b/vendor/language-select index f6797279a5f00dfe4db52e44f1e016aedeec6a6d..05266ff50d60b31743904ca3988afa9647455a1f 160000 --- a/vendor/language-select +++ b/vendor/language-select @@ -1 +1 @@ -Subproject commit f6797279a5f00dfe4db52e44f1e016aedeec6a6d +Subproject commit 05266ff50d60b31743904ca3988afa9647455a1f diff --git a/vendor/notification b/vendor/notification index b4e2cbb05eb4c4b57f48d96da1caf9b0e1a1d2a1..c7fe70928a4414a0943d5e5ca4e38e851faad270 160000 --- a/vendor/notification +++ b/vendor/notification @@ -1 +1 @@ -Subproject commit b4e2cbb05eb4c4b57f48d96da1caf9b0e1a1d2a1 +Subproject commit c7fe70928a4414a0943d5e5ca4e38e851faad270