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
Commits on Source (13)
Showing
with 37 additions and 84 deletions
{
"name": "dbp-toolkit",
"version": "0.1.0",
"version": "0.1.1",
"description": "",
"main": "index.js",
"private": true,
......
{
"name": "@dbp-toolkit/app-shell",
"homepage": "https://gitlab.tugraz.at/dbp/web-components/toolkit/-/tree/master/packages/app-shell",
"version": "0.1.5",
"version": "0.1.6",
"main": "src/index.js",
"license": "LGPL-2.1-or-later",
"repository": {
......@@ -28,7 +28,6 @@
"karma-mocha": "^2.0.1",
"mocha": "^8.0.1",
"rollup": "^2.33.3",
"rollup-plugin-consts": "^1.0.1",
"rollup-plugin-copy": "^3.1.0",
"rollup-plugin-delete": "^2.0.0",
"rollup-plugin-emit-ejs": "^3.1.0",
......
......@@ -3,10 +3,9 @@ import resolve from '@rollup/plugin-node-resolve';
import commonjs from '@rollup/plugin-commonjs';
import copy from 'rollup-plugin-copy';
import serve from 'rollup-plugin-serve';
import consts from 'rollup-plugin-consts';
import del from 'rollup-plugin-delete';
import json from '@rollup/plugin-json';
import {getBuildInfo, getPackagePath, getDistPath} from '../../rollup.utils.js';
import {getPackagePath, getDistPath} from '../../rollup.utils.js';
const build = (typeof process.env.BUILD !== 'undefined') ? process.env.BUILD : 'local';
console.log("build: " + build);
......@@ -32,10 +31,6 @@ export default (async () => {
del({
targets: 'dist/*'
}),
consts({
environment: build,
buildinfo: getBuildInfo(build),
}),
resolve(),
commonjs(),
json(),
......
......@@ -7,7 +7,7 @@
<body>
<dbp-auth-demo lang="de"></dbp-auth-demo>
<dbp-auth-demo lang="de" entry-point-url="http://127.0.0.1:8000"></dbp-auth-demo>
</body>
</html>
{
"name": "@dbp-toolkit/auth",
"homepage": "https://gitlab.tugraz.at/dbp/web-components/toolkit/-/tree/master/packages/auth",
"version": "0.1.4",
"version": "0.1.5",
"main": "src/index.js",
"license": "LGPL-2.1-or-later",
"repository": {
......@@ -31,7 +31,6 @@
"karma-mocha": "^2.0.1",
"mocha": "^8.0.1",
"rollup": "^2.33.3",
"rollup-plugin-consts": "^1.0.1",
"rollup-plugin-copy": "^3.1.0",
"rollup-plugin-delete": "^2.0.0",
"rollup-plugin-serve": "^1.0.1",
......
......@@ -5,7 +5,6 @@ import copy from 'rollup-plugin-copy';
import {terser} from "rollup-plugin-terser";
import json from '@rollup/plugin-json';
import serve from 'rollup-plugin-serve';
import consts from 'rollup-plugin-consts';
import del from 'rollup-plugin-delete';
import {getPackagePath, getDistPath} from '../../rollup.utils.js';
......@@ -34,9 +33,6 @@ export default (async () => {
del({
targets: 'dist/*'
}),
consts({
environment: build,
}),
resolve(),
commonjs(),
json(),
......
import {i18n} from './i18n.js';
import {html, LitElement} from 'lit-element';
import {html} from 'lit-element';
import {ScopedElementsMixin} from '@open-wc/scoped-elements';
import {AuthKeycloak} from './auth-keycloak.js';
import {LoginButton} from './login-button.js';
import * as commonUtils from '@dbp-toolkit/common/utils';
import {name as pkgName} from './../package.json';
import DBPLitElement from "@dbp-toolkit/common/dbp-lit-element";
class AuthDemo extends ScopedElementsMixin(LitElement) {
class AuthDemo extends ScopedElementsMixin(DBPLitElement) {
constructor() {
super();
this.lang = 'de';
this.entryPointUrl = '';
}
static get scopedElements() {
......@@ -20,9 +22,10 @@ class AuthDemo extends ScopedElementsMixin(LitElement) {
}
static get properties() {
return {
return this.getProperties({
lang: { type: String },
};
entryPointUrl: { type: String, attribute: 'entry-point-url' },
});
}
update(changedProperties) {
......@@ -91,7 +94,7 @@ class AuthDemo extends ScopedElementsMixin(LitElement) {
<h1 class="title">Auth-Demo</h1>
</div>
<div class="container">
<dbp-auth-keycloak lang="${this.lang}" url="https://auth-dev.tugraz.at/auth" realm="tugraz" client-id="auth-dev-mw-frontend-local" silent-check-sso-redirect-uri="${silentCheckSsoUri}" scope="optional-test-scope" load-person try-login></dbp-auth-keycloak>
<dbp-auth-keycloak lang="${this.lang}" entry-point-url="${this.entryPointUrl}" url="https://auth-dev.tugraz.at/auth" realm="tugraz" client-id="auth-dev-mw-frontend-local" silent-check-sso-redirect-uri="${silentCheckSsoUri}" scope="optional-test-scope" load-person try-login></dbp-auth-keycloak>
<dbp-login-button lang="${this.lang}" show-image></dbp-login-button>
</div>
......
......@@ -8,6 +8,6 @@
<body>
<dbp-check-in-place-select-demo lang="de"></dbp-check-in-place-select-demo>
<dbp-check-in-place-select-demo lang="de" entry-point-url="http://127.0.0.1:8000"></dbp-check-in-place-select-demo>
</body>
</html>
{
"name": "@dbp-toolkit/check-in-place-select",
"homepage": "https://gitlab.tugraz.at/dbp/web-components/toolkit/-/tree/master/packages/check-in-place-select",
"version": "0.1.1",
"version": "0.1.2",
"main": "src/index.js",
"license": "LGPL-2.1-or-later",
"repository": {
......@@ -29,7 +29,6 @@
"karma-mocha": "^2.0.1",
"mocha": "^8.0.1",
"rollup": "^2.33.3",
"rollup-plugin-consts": "^1.0.1",
"rollup-plugin-copy": "^3.1.0",
"rollup-plugin-delete": "^2.0.0",
"rollup-plugin-serve": "^1.0.1",
......
......@@ -6,7 +6,6 @@ import {terser} from "rollup-plugin-terser";
import json from '@rollup/plugin-json';
import serve from 'rollup-plugin-serve';
import url from "@rollup/plugin-url"
import consts from 'rollup-plugin-consts';
import del from 'rollup-plugin-delete';
import {getPackagePath, getDistPath} from '../../rollup.utils.js';
......@@ -34,9 +33,6 @@ export default (async () => {
del({
targets: 'dist/*'
}),
consts({
environment: build,
}),
resolve(),
commonjs(),
url({
......
......@@ -25,7 +25,7 @@ export class CheckInPlaceSelect extends ScopedElementsMixin(AdapterLitElement) {
constructor() {
super();
this.lang = 'de';
this.entryPointUrl = commonUtils.getAPiUrl();
this.entryPointUrl = '';
this.jsonld = null;
this.$select = null;
this.active = false;
......
import {i18n} from './i18n.js';
import {css, html, LitElement} from 'lit-element';
import {css, html} from 'lit-element';
import {ScopedElementsMixin} from '@open-wc/scoped-elements';
import {CheckInPlaceSelect} from './check-in-place-select.js';
import {AuthKeycloak, LoginButton} from '@dbp-toolkit/auth';
import * as commonUtils from '@dbp-toolkit/common/utils';
import * as commonStyles from '@dbp-toolkit/common/styles';
import DBPLitElement from "@dbp-toolkit/common/dbp-lit-element";
export class CheckInPlaceSelectDemo extends ScopedElementsMixin(LitElement) {
export class CheckInPlaceSelectDemo extends ScopedElementsMixin(DBPLitElement) {
constructor() {
super();
this.lang = 'de';
this.entryPointUrl = '';
this.noAuth = false;
}
......@@ -22,10 +24,11 @@ export class CheckInPlaceSelectDemo extends ScopedElementsMixin(LitElement) {
}
static get properties() {
return {
return this.getProperties({
lang: { type: String },
entryPointUrl: { type: String, attribute: 'entry-point-url' },
noAuth: { type: Boolean, attribute: 'no-auth' },
};
});
}
connectedCallback() {
......@@ -51,7 +54,7 @@ export class CheckInPlaceSelectDemo extends ScopedElementsMixin(LitElement) {
getAuthComponentHtml() {
return this.noAuth ? html`<dbp-login-button lang="${this.lang}" show-image></dbp-login-button>` : html`
<div class="container">
<dbp-auth-keycloak lang="${this.lang}" silent-check-sso-redirect-uri="/dist/silent-check-sso.html"
<dbp-auth-keycloak lang="${this.lang}" entry-point-url="${this.entryPointUrl}" silent-check-sso-redirect-uri="/dist/silent-check-sso.html"
url="https://auth-dev.tugraz.at/auth" realm="tugraz"
client-id="auth-dev-mw-frontend-local" load-person try-login></dbp-auth-keycloak>
<dbp-login-button lang="${this.lang}" show-image></dbp-login-button>
......@@ -71,13 +74,13 @@ export class CheckInPlaceSelectDemo extends ScopedElementsMixin(LitElement) {
<div class="field">
<label class="label">Check-In-Place 1</label>
<div class="control">
<dbp-check-in-place-select lang="${this.lang}" entry-point-url="${commonUtils.getAPiUrl()}"></dbp-check-in-place-select>
<dbp-check-in-place-select lang="${this.lang}" entry-point-url="${this.entryPointUrl}"></dbp-check-in-place-select>
</div>
</div>
<div class="field">
<label class="label">Check-In-Place 2</label>
<div class="control">
<dbp-check-in-place-select lang="${this.lang}" entry-point-url="${commonUtils.getAPiUrl()}" show-reload-button reload-button-title="Click me"></dbp-check-in-place-select>
<dbp-check-in-place-select lang="${this.lang}" entry-point-url="${this.entryPointUrl}" show-reload-button reload-button-title="Click me"></dbp-check-in-place-select>
</div>
</div>
</form>
......
{
"name": "@dbp-toolkit/common",
"homepage": "https://gitlab.tugraz.at/dbp/web-components/toolkit/-/tree/master/packages/common",
"version": "0.1.2",
"version": "0.1.3",
"module": "index.js",
"license": "LGPL-2.1-or-later",
"repository": {
......@@ -23,7 +23,6 @@
"karma-mocha": "^2.0.1",
"mocha": "^8.0.1",
"rollup": "^2.33.3",
"rollup-plugin-consts": "^1.0.1",
"rollup-plugin-copy": "^3.1.0",
"rollup-plugin-delete": "^2.0.0",
"rollup-plugin-serve": "^1.0.1"
......
......@@ -3,7 +3,6 @@ import resolve from '@rollup/plugin-node-resolve';
import commonjs from '@rollup/plugin-commonjs';
import copy from 'rollup-plugin-copy';
import serve from 'rollup-plugin-serve';
import consts from 'rollup-plugin-consts';
import del from 'rollup-plugin-delete';
import json from '@rollup/plugin-json';
import {getDistPath} from '../../rollup.utils.js';
......@@ -33,9 +32,6 @@ export default (async () => {
del({
targets: 'dist/*'
}),
consts({
environment: build,
}),
resolve(),
commonjs(),
json(),
......
......@@ -34,10 +34,6 @@ suite('utils', () => {
assert.isTrue(res);
});
test('getAPiUrl', () => {
assert(utils.getAPiUrl().startsWith("http"));
});
test('getAssetURL', () => {
// Backwards compat
assert.equal(new URL(utils.getAssetURL("foo/bar")).pathname, "/foo/bar");
......
import environment from 'consts:environment';
/**
* Parses a link header
*
......@@ -30,30 +28,6 @@ export const parseLinkHeader = (header) => {
return links;
};
export const getAPiUrl = (path = "") => {
let apiBaseUrl = '';
switch(environment) {
case "development":
apiBaseUrl = 'https://mw-dev.tugraz.at';
break;
case "demo":
apiBaseUrl = 'https://api-demo.tugraz.at';
break;
case "production":
apiBaseUrl = 'https://api.tugraz.at';
break;
case "bs":
apiBaseUrl = 'http://bs-local.com:8000';
break;
case "local":
default:
apiBaseUrl = 'http://127.0.0.1:8000';
}
return apiBaseUrl + path;
};
/**
* Parses the base url from an url
*
......
......@@ -15,6 +15,6 @@
<body>
<dbp-data-table-view-demo lang="de"></dbp-data-table-view-demo>
<dbp-data-table-view-demo lang="de" entry-point-url="http://127.0.0.1:8000"></dbp-data-table-view-demo>
</body>
</html>
{
"name": "@dbp-toolkit/data-table-view",
"homepage": "https://gitlab.tugraz.at/dbp/web-components/toolkit/-/tree/master/packages/data-table-view",
"version": "0.1.1",
"version": "0.1.2",
"main": "src/index.js",
"license": "LGPL-2.1-or-later",
"repository": {
......@@ -28,7 +28,6 @@
"karma-mocha": "^2.0.1",
"mocha": "^8.0.1",
"rollup": "^2.33.3",
"rollup-plugin-consts": "^1.0.1",
"rollup-plugin-copy": "^3.1.0",
"rollup-plugin-delete": "^2.0.0",
"rollup-plugin-serve": "^1.0.1",
......
......@@ -6,7 +6,6 @@ import {terser} from "rollup-plugin-terser";
import json from '@rollup/plugin-json';
import serve from 'rollup-plugin-serve';
import urlPlugin from "@rollup/plugin-url";
import consts from 'rollup-plugin-consts';
import del from 'rollup-plugin-delete';
import {getPackagePath, getDistPath} from '../../rollup.utils.js';
......@@ -42,9 +41,6 @@ export default (async () => {
del({
targets: 'dist/*'
}),
consts({
environment: build,
}),
resolve(),
commonjs(),
json(),
......
import {AuthKeycloak, LoginButton} from '@dbp-toolkit/auth';
import {DataTableView} from './data-table-view.js';
import {i18n} from './i18n';
import {css, html, LitElement} from 'lit-element';
import {css, html} from 'lit-element';
import {ScopedElementsMixin} from '@open-wc/scoped-elements';
import * as commonUtils from '@dbp-toolkit/common/utils';
import * as commonStyles from '@dbp-toolkit/common/styles';
import DBPLitElement from "@dbp-toolkit/common/dbp-lit-element";
export class DataTableViewDemo extends ScopedElementsMixin(LitElement) {
export class DataTableViewDemo extends ScopedElementsMixin(DBPLitElement) {
constructor() {
super();
this.lang = 'de';
this.entryPointUrl = '';
this.noAuth = false;
}
......@@ -22,10 +24,11 @@ export class DataTableViewDemo extends ScopedElementsMixin(LitElement) {
}
static get properties() {
return {
return this.getProperties({
lang: { type: String },
entryPointUrl: { type: String, attribute: 'entry-point-url' },
noAuth: { type: Boolean, attribute: 'no-auth' },
};
});
}
connectedCallback() {
......@@ -137,7 +140,7 @@ export class DataTableViewDemo extends ScopedElementsMixin(LitElement) {
getAuthComponentHtml() {
return this.noAuth ? html`<dbp-login-button lang="${this.lang}" show-image></dbp-login-button>` : html`
<div class="container">
<dbp-auth-keycloak lang="${this.lang}" silent-check-sso-redirect-uri="/dist/silent-check-sso.html"
<dbp-auth-keycloak lang="${this.lang}" entry-point-url="${this.entryPointUrl}" silent-check-sso-redirect-uri="/dist/silent-check-sso.html"
url="https://auth-dev.tugraz.at/auth" realm="tugraz"
client-id="auth-dev-mw-frontend-local" load-person try-login></dbp-auth-keycloak>
<dbp-login-button lang="${this.lang}" show-image></dbp-login-button>
......