Skip to content
Snippets Groups Projects
Commit 469455e1 authored by Reiter, Christoph's avatar Reiter, Christoph :snake:
Browse files

Remove check-in-place-select

This now lives in the checkin topic, its only user.
parent ac700ec6
No related branches found
No related tags found
No related merge requests found
Pipeline #88654 failed
/**
* Content from https://github.com/select2/select2/blob/master/src/js/select2/i18n/en.js
*/
export default function () {
// English
return {
errorLoading: function () {
return 'The results could not be loaded.';
},
inputTooLong: function (args) {
var overChars = args.input.length - args.maximum;
var message = 'Please delete ' + overChars + ' character';
if (overChars != 1) {
message += 's';
}
return message;
},
inputTooShort: function (args) {
var remainingChars = args.minimum - args.input.length;
var message =
'Please enter ' +
remainingChars +
' or more characters, you can also search for multiple parts of names';
return message;
},
loadingMore: function () {
return 'Loading more results…';
},
maximumSelected: function (args) {
var message = 'You can only select ' + args.maximum + ' item';
if (args.maximum != 1) {
message += 's';
}
return message;
},
noResults: function () {
return 'No results found';
},
searching: function () {
return 'Searching…';
},
removeAllItems: function () {
return 'Remove all items';
},
};
}
{
"check-in-place-select": {
"placeholder": "E.g. \"P1\", \"Rechbauerstraße\", \"PZ2EG048\"",
"login-required": "Login required"
}
}
import {CheckInPlaceSelect} from './check-in-place-select.js';
export {CheckInPlaceSelect};
/**
* Finds an object in a JSON result by identifier
*
* @param identifier
* @param results
* @param identifierAttribute
*/
export const findObjectInApiResults = (identifier, results, identifierAttribute = '@id') => {
const members = results['hydra:member'];
if (members === undefined) {
return;
}
for (const object of members) {
if (object[identifierAttribute] === identifier) {
return object;
}
}
};
import {assert} from '@esm-bundle/chai';
import '../src/dbp-check-in-place-select.js';
import '../src/demo.js';
suite('dbp-check-in-place-select basics', () => {
let node;
setup(async () => {
node = document.createElement('dbp-check-in-place-select');
document.body.appendChild(node);
await node.updateComplete;
});
teardown(() => {
node.remove();
});
test('should render', () => {
assert.isNotNull(node.shadowRoot);
});
});
suite('dbp-check-in-place-select-demo basics', () => {
let node;
setup(async () => {
node = document.createElement('dbp-check-in-place-select-demo');
document.body.appendChild(node);
await node.updateComplete;
});
teardown(() => {
node.remove();
});
test('should render', () => {
assert.isNotNull(node.shadowRoot);
});
});
{
"element": "dbp-check-in-place-select-demo-activity",
"module_src": "dbp-check-in-place-select-demo-activity.js",
"routing_name": "check-in-place-select",
"name": {
"de": "Ortauswahl",
"en": "Check-in place select"
},
"short_name": {
"de": "Ortauswahl",
"en": "Check-in place select"
},
"description": {
"de": "Ort Web Component",
"en": "Check-in place select web component"
},
"subscribe": "lang,entry-point-url"
}
...@@ -22,7 +22,6 @@ ...@@ -22,7 +22,6 @@
{"path": "notification.metadata.json"}, {"path": "notification.metadata.json"},
{"path": "data-table-view.metadata.json"}, {"path": "data-table-view.metadata.json"},
{"path": "language-select.metadata.json"}, {"path": "language-select.metadata.json"},
{"path": "check-in-place-select.metadata.json"},
{"path": "matomo.metadata.json"}, {"path": "matomo.metadata.json"},
{"path": "person-profile.metadata.json"}, {"path": "person-profile.metadata.json"},
{"path": "file-handling.metadata.json"}, {"path": "file-handling.metadata.json"},
......
import {css, html} from 'lit';
import {ScopedElementsMixin} from '@open-wc/scoped-elements';
import {CheckInPlaceSelectDemo} from '@dbp-toolkit/check-in-place-select/src/dbp-check-in-place-select-demo';
import * as commonUtils from '@dbp-toolkit/common/utils';
import * as commonStyles from '@dbp-toolkit/common/styles';
import {unsafeHTML} from 'lit/directives/unsafe-html.js';
import readme from '@dbp-toolkit/check-in-place-select/README.md';
import * as demoStyles from './styles';
import {AdapterLitElement} from '@dbp-toolkit/provider/src/adapter-lit-element';
class DbpActivityNameDemoActivity extends ScopedElementsMixin(AdapterLitElement) {
constructor() {
super();
this.lang = 'en';
this.entryPointUrl = '';
}
static get scopedElements() {
return {
'dbp-check-in-place-select-demo': CheckInPlaceSelectDemo,
};
}
static get properties() {
return {
...super.properties,
lang: {type: String},
entryPointUrl: {type: String, attribute: 'entry-point-url'},
};
}
connectedCallback() {
super.connectedCallback();
this.updateComplete.then(() => {});
}
static get styles() {
// language=css
return [
commonStyles.getThemeCSS(),
commonStyles.getGeneralCSS(),
demoStyles.getDemoCSS(),
css`
h1.title {
margin-bottom: 1em;
}
div.container {
margin-bottom: 1.5em;
}
#demo {
display: block;
padding-top: 50px;
}
`,
];
}
render() {
return html`
${unsafeHTML(readme)}
<dbp-check-in-place-select-demo
id="demo"
lang="${this.lang}"
entry-point-url="${this.entryPointUrl}"
no-auth></dbp-check-in-place-select-demo>
`;
}
}
commonUtils.defineCustomElement(
'dbp-check-in-place-select-demo-activity',
DbpActivityNameDemoActivity
);
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment