Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature 1366: Struktur Datenpanel anpassen #1403

Open
wants to merge 2 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .idea/inspectionProfiles/Project_Default.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion ui/locales/app.de.json
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,6 @@
"dtd_cant_upload_kml_error": "Fehler beim Hochladen von KML",
"dtd_change_order_label": "Anordnen",
"dtd_clamp_to_ground": "Auf Terrain legen",
"dtd_configure_data_btn": "Angezeigte Daten konfigurieren",
"dtd_displayed_data_label": "Angezeigte Daten",
"dtd_download_hint": "Herunterladen / Legende",
"dtd_empty_map_label": "Kein Hintergrund",
Expand Down
1 change: 0 additions & 1 deletion ui/locales/app.en.json
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,6 @@
"dtd_cant_upload_kml_error": "Error while uploading KML",
"dtd_change_order_label": "Change order",
"dtd_clamp_to_ground": "Clamp to terrain",
"dtd_configure_data_btn": "Configure data displayed",
"dtd_displayed_data_label": "Data displayed",
"dtd_download_hint": "Download / Legend",
"dtd_empty_map_label": "No background",
Expand Down
1 change: 0 additions & 1 deletion ui/locales/app.fr.json
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,6 @@
"dtd_cant_upload_kml_error": "Erreur lors du téléchargement de KML",
"dtd_change_order_label": "Réarranger",
"dtd_clamp_to_ground": "Fixation au terrain",
"dtd_configure_data_btn": "Configurer les données affichées",
"dtd_displayed_data_label": "Données affichées",
"dtd_download_hint": "Télécharger / Légende",
"dtd_empty_map_label": "Sans arrière-plan",
Expand Down
1 change: 0 additions & 1 deletion ui/locales/app.it.json
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,6 @@
"dtd_cant_upload_kml_error": "Errore nel download di KML",
"dtd_change_order_label": "Riordinare",
"dtd_clamp_to_ground": "Morsetto al terreno",
"dtd_configure_data_btn": "Configurare i dati visualizzati ",
"dtd_displayed_data_label": "Dati mostrati",
"dtd_download_hint": "Scaricare / Scala",
"dtd_empty_map_label": "Senza sfondo",
Expand Down
18 changes: 18 additions & 0 deletions ui/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions ui/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,7 @@
"source-map-loader": "5.0.0",
"start-server-and-test": "2.0.8",
"stream-to-promise": "3.0.0",
"style-loader": "^4.0.0",
"ts-loader": "9.5.1",
"ts-node": "10.9.2",
"typescript": "5.6.3",
Expand Down
32 changes: 20 additions & 12 deletions ui/rollup.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,18 @@ const cesiumSource = 'node_modules/cesium/Source';
const cesiumWorkers = '../Build/Cesium/Workers';
const extensions = ['.ts', '.js'];

const postcssPlugins = [
inlinesvg(),
cssimport({
plugins: [
postcssurl([
{filter: '**/*.+(woff|woff2)', url: (asset) => `fonts/${path.basename(asset.url)}`},
])
]
}),
autoprefixer()
];

const config = {
input: 'src/index.ts',
output: [{
Expand All @@ -27,18 +39,14 @@ const config = {
postcss({
minimize: true,
inject: false,
extract: 'index.css',
plugins: [
inlinesvg(),
cssimport({
plugins: [
postcssurl([
{filter: '**/*.+(woff|woff2)', url: (asset) => `fonts/${path.basename(asset.url)}`},
])
]
}),
autoprefixer()
]
extract: false,
plugins: postcssPlugins,
}),
postcss({
minimize: true,
inject: false,
extract: '**/style/index.css',
plugins: postcssPlugins,
}),
json(),
resolve({
Expand Down
44 changes: 44 additions & 0 deletions ui/src/components/core/core-button.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
import {css, html, LitElement} from 'lit';
import {customElement, property} from 'lit/decorators.js';

@customElement('ngm-core-button')
export class CoreButton extends LitElement {
@property({reflect: true})
accessor variant: Variant = 'default';

@property({type: Boolean, attribute: 'active', reflect: true})
accessor isActive: boolean = false;

readonly render = () => html`
<button>
<slot></slot>
</button>
`;

static readonly styles = css`
button {
font-family: var(--font);
font-size: 14px;
}

:host([variant='text']) button {
color: var(--color-highlight--darker);

border: none;
background-color: transparent;
cursor: pointer;
}

:host([variant='text'][active]) button {
color: var(--color-action);
}

:host([variant='text']) button:hover {
color: var(--color-action--light);
}
`;
}

export type Variant =
| 'default'
| 'text'
49 changes: 49 additions & 0 deletions ui/src/components/core/core-icon.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
import {css, html, LitElement} from 'lit';
import {customElement, property} from 'lit/decorators.js';

@customElement('ngm-core-icon')
export class CoreIcon extends LitElement {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we should probably discuss how we proceed with icons from here on forward

@property()
accessor icon: IconName | null = null;

@property({type: Boolean, attribute: 'interactive'})
accessor isInteractive: boolean = false;

readonly render = () => html``;

static readonly styles = css`
:host {
display: inline-block;

--size: var(--icon-size--normal);
width: var(--size);
height: var(--size);
background-color: var(--color-bg-contrast);

mask: var(--mask, none) no-repeat center;
-webkit-mask: var(--mask, none) no-repeat center;

/* Hide element if no valid icon has been specified. */
visibility: hidden;
}

:host([interactive]:hover) {
cursor: pointer;
background-color: var(--color-action);
}

:host([icon='close']) {
visibility: initial;
--mask: url('images/i_close.svg');
}

:host([icon='dropdown']) {
visibility: initial;
--mask: url('images/i_menu-1.svg')
}
`;
}

export type IconName =
| 'close'
| 'dropdown'
2 changes: 2 additions & 0 deletions ui/src/components/core/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
import './core-button';
import './core-icon';
Loading
Loading