Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found
Select Git revision
  • advertisement
  • automagic
  • dbp-translation-component
  • demo
  • demo-file-handling
  • favorites-and-recent-files
  • icon-set-mapping
  • lit2
  • main
  • person-select-custom
  • port-i18next-parser
  • publish
  • remove-sentry
  • renovate/lock-file-maintenance
  • revert-6c632dc6
  • wc-part
  • wip-cleanup
17 results

Target

Select target project
  • 987FCF504483CBC8/toolkit
1 result
Select Git revision
  • advertisement
  • automagic
  • dbp-translation-component
  • demo
  • demo-file-handling
  • favorites-and-recent-files
  • icon-set-mapping
  • lit2
  • main
  • person-select-custom
  • port-i18next-parser
  • publish
  • remove-sentry
  • renovate/lock-file-maintenance
  • revert-6c632dc6
  • wc-part
  • wip-cleanup
17 results
Show changes
......@@ -20,7 +20,7 @@
"@rollup/plugin-url": "^6.0.0",
"chai": "^4.2.0",
"eslint": "^7.3.1",
"eslint-plugin-jsdoc": "^31.0.0",
"eslint-plugin-jsdoc": "^32.0.0",
"i18next-scanner": "^3.0.0",
"karma": "^6.0.0",
"karma-chrome-launcher": "^3.0.0",
......
......@@ -20,7 +20,7 @@
"@rollup/plugin-url": "^6.0.0",
"chai": "^4.2.0",
"eslint": "^7.3.1",
"eslint-plugin-jsdoc": "^31.0.0",
"eslint-plugin-jsdoc": "^32.0.0",
"i18next-scanner": "^3.0.0",
"karma": "^6.0.0",
"karma-chrome-launcher": "^3.0.0",
......
......@@ -20,7 +20,7 @@
"@rollup/plugin-url": "^6.0.0",
"chai": "^4.2.0",
"eslint": "^7.3.1",
"eslint-plugin-jsdoc": "^31.0.0",
"eslint-plugin-jsdoc": "^32.0.0",
"i18next-scanner": "^3.0.0",
"karma": "^6.0.0",
"karma-chrome-launcher": "^3.0.0",
......
......@@ -24,9 +24,9 @@ npm i @dbp-toolkit/person-select
- the `value` will also be set automatically when a person is chosen in the selector
- `data-object` (read-only): when a person is selected the person object will be set as json string
- example `<dbp-person-select data-object="{"@id":"/people/testuser", "@type":"http://schema.org/Person", "identifier":"testuser", "givenName":"Hans", "familyName":"Tester", "honorificSuffix":"Ing.", "telephone":"+43 (876) 123-4567", "phoneExtension":"4567", "email":"hans.tester@email.com", "name":"Hans Tester"}"></dbp-person-select>`
- `show-birth-date` (optional): also shows the birth date of the persons to distinguish people with the same name
- the currently logged in user needs to have permissions to show the birth date of people
- example `<dbp-person-select show-birth-date></dbp-person-select>`
- `show-details` (optional): also shows the email address of the persons to distinguish people with the same name
- the currently logged in user needs to have permissions to show the email address of people
- example `<dbp-person-select show-details></dbp-person-select>`
- `show-reload-button` (optional): if set a reload button will be viewed next to the select box
- the button triggers a `change` event on the web component
- the button is disabled if no person is selected
......
......@@ -21,7 +21,7 @@
"@rollup/plugin-url": "^6.0.0",
"chai": "^4.2.0",
"eslint": "^7.3.1",
"eslint-plugin-jsdoc": "^31.0.0",
"eslint-plugin-jsdoc": "^32.0.0",
"i18next-scanner": "^3.0.0",
"karma": "^6.0.0",
"karma-chrome-launcher": "^3.0.0",
......
......@@ -18,7 +18,7 @@ import {AdapterLitElement} from "@dbp-toolkit/provider/src/adapter-lit-element";
const personContext = {
"@id": "@id",
"name": "http://schema.org/name",
"birthDate": "http://schema.org/Date"
"email": "http://schema.org/email"
};
select2(window, $);
......@@ -43,7 +43,7 @@ export class PersonSelect extends ScopedElementsMixin(AdapterLitElement) {
this.lastResult = {};
this.showReloadButton = false;
this.reloadButtonTitle = '';
this.showBirthDate = false;
this.showDetails = false;
}
static get scopedElements() {
......@@ -66,7 +66,7 @@ export class PersonSelect extends ScopedElementsMixin(AdapterLitElement) {
object: { type: Object, attribute: false },
showReloadButton: { type: Boolean, attribute: 'show-reload-button' },
reloadButtonTitle: { type: String, attribute: 'reload-button-title' },
showBirthDate: { type: Boolean, attribute: 'show-birth-date' },
showDetails: { type: Boolean, attribute: 'show-details' },
auth: { type: Object },
};
}
......@@ -261,9 +261,8 @@ export class PersonSelect extends ScopedElementsMixin(AdapterLitElement) {
let text = person["name"];
// add birth date to name if present
if (this.showBirthDate && (person["birthDate"] !== undefined) && (person["birthDate"] !== null)) {
const date = new Date(person["birthDate"]);
text += ` (${date.toLocaleDateString("de-AT")})`;
if (this.showDetails && (person["email"] !== undefined) && (person["email"] !== null)) {
text += ` (${person["email"]})`;
}
return text;
......
......@@ -20,7 +20,7 @@
"@rollup/plugin-url": "^6.0.0",
"chai": "^4.2.0",
"eslint": "^7.3.1",
"eslint-plugin-jsdoc": "^31.0.0",
"eslint-plugin-jsdoc": "^32.0.0",
"glob": "^7.1.6",
"i18next-scanner": "^3.0.0",
"karma": "^6.0.0",
......
......@@ -20,7 +20,7 @@
"@rollup/plugin-url": "^6.0.0",
"chai": "^4.2.0",
"eslint": "^7.11.0",
"eslint-plugin-jsdoc": "^31.0.0",
"eslint-plugin-jsdoc": "^32.0.0",
"i18next-scanner": "^3.0.0",
"karma": "^6.0.0",
"karma-chrome-launcher": "^3.0.0",
......@@ -37,7 +37,7 @@
"dependencies": {
"@dbp-toolkit/common": "^0.2.2",
"@open-wc/scoped-elements": "^1.3.3",
"async-mutex": "^0.2.4",
"async-mutex": "^0.3.0",
"lit-element": "^2.4.0",
"qr-scanner": "^1.2.0"
},
......
......@@ -57,7 +57,7 @@ export async function generateTLSConfig() {
if (!fs.existsSync(keyPath) || !fs.existsSync(certPath)) {
const attrs = [{name: 'commonName', value: 'dbp-dev.localhost'}];
const pems = selfsigned.generate(attrs, {algorithm: 'sha256', days: 9999});
const pems = selfsigned.generate(attrs, {algorithm: 'sha256', days: 9999, keySize: 2048});
await fs.promises.writeFile(keyPath, pems.private);
await fs.promises.writeFile(certPath, pems.cert);
}
......
......@@ -24,7 +24,7 @@
"chai": "^4.2.0",
"chokidar": "^3.4.0",
"eslint": "^7.3.1",
"eslint-plugin-jsdoc": "^31.0.0",
"eslint-plugin-jsdoc": "^32.0.0",
"find-cache-dir": "^3.3.1",
"glob": "^7.1.6",
"i18next-scanner": "^3.0.0",
......
This diff is collapsed.
This diff is collapsed.