mirror of
https://github.com/F43nd1r/Acrarium.git
synced 2026-03-13 10:42:26 +08:00
update vaadin and jooq
This commit is contained in:
1
.gitignore
vendored
1
.gitignore
vendored
@@ -47,3 +47,4 @@ pnpmfile.js
|
||||
/acrarium/.pnpm-debug.log
|
||||
/acrarium/frontend/generated
|
||||
/acrarium/.pnpmfile.cjs
|
||||
/acrarium/src/main/bundles/prod.bundle
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
import com.vaadin.gradle.vaadin
|
||||
import org.jooq.meta.jaxb.ForcedType
|
||||
import org.jooq.meta.jaxb.Property
|
||||
|
||||
@@ -107,14 +106,9 @@ noArg {
|
||||
}
|
||||
|
||||
tasks.withType<Test> {
|
||||
project.properties["vaadinProKey"]?.let { systemProperty("vaadin.proKey", it) }
|
||||
useJUnitPlatform()
|
||||
}
|
||||
|
||||
vaadin {
|
||||
// productionMode = true
|
||||
}
|
||||
|
||||
val changelogPath = "src/main/resources/db/db.changelog-master.yml"
|
||||
jooq {
|
||||
version.set(libs.versions.jooq.get())
|
||||
|
||||
@@ -14,27 +14,28 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import {css, customElement, html, LitElement} from 'lit-element'
|
||||
import {css, html, LitElement} from 'lit-element'
|
||||
import {customElement} from "lit/decorators.js"
|
||||
|
||||
@customElement("acrarium-box")
|
||||
export default class Box extends LitElement {
|
||||
static get styles() {
|
||||
return css`
|
||||
:host {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
}
|
||||
:host {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.acrarium-box-title {
|
||||
font-weight: bold;
|
||||
}
|
||||
.acrarium-box-title {
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.acrarium-box-text {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
flex: 1;
|
||||
}
|
||||
.acrarium-box-text {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
flex: 1;
|
||||
}
|
||||
`
|
||||
}
|
||||
|
||||
|
||||
@@ -14,7 +14,8 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import {css, customElement, html, LitElement, property} from 'lit-element'
|
||||
import {css, html, LitElement} from 'lit-element'
|
||||
import {customElement, property} from "lit/decorators.js"
|
||||
|
||||
@customElement("acrarium-card")
|
||||
export default class Card extends LitElement {
|
||||
@@ -24,47 +25,47 @@ export default class Card extends LitElement {
|
||||
|
||||
static get styles() {
|
||||
return css`
|
||||
:host {
|
||||
box-shadow: 0 3px 6px rgba(0, 0, 0, 0.16), 0 3px 6px rgba(0, 0, 0, 0.23);
|
||||
border-radius: 2px;
|
||||
margin: 1rem;
|
||||
display: inline-flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
:host {
|
||||
box-shadow: 0 3px 6px rgba(0, 0, 0, 0.16), 0 3px 6px rgba(0, 0, 0, 0.23);
|
||||
border-radius: 2px;
|
||||
margin: 1rem;
|
||||
display: inline-flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
.acrarium-card-header {
|
||||
padding: 1rem;
|
||||
box-sizing: border-box;
|
||||
background-color: var(--acrarium-card-header-color, var(--lumo-contrast-5pct));
|
||||
color: var(--acrarium-card-header-text-color);
|
||||
display: inline-block;
|
||||
width: 100%;
|
||||
}
|
||||
.acrarium-card-header {
|
||||
padding: 1rem;
|
||||
box-sizing: border-box;
|
||||
background-color: var(--acrarium-card-header-color, var(--lumo-contrast-5pct));
|
||||
color: var(--acrarium-card-header-text-color);
|
||||
display: inline-block;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.acrarium-card-content {
|
||||
padding: 1rem;
|
||||
box-sizing: border-box;
|
||||
display: inline-flex;
|
||||
flex-direction: column;
|
||||
align-content: center;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
.acrarium-card-content {
|
||||
padding: 1rem;
|
||||
box-sizing: border-box;
|
||||
display: inline-flex;
|
||||
flex-direction: column;
|
||||
align-content: center;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.acrarium-card-content-wrapper {
|
||||
width: 100%;
|
||||
flex: 1;
|
||||
min-height: 0;
|
||||
}
|
||||
.acrarium-card-content-wrapper {
|
||||
width: 100%;
|
||||
flex: 1;
|
||||
min-height: 0;
|
||||
}
|
||||
|
||||
.collapse {
|
||||
display: none;
|
||||
}
|
||||
.collapse {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.divider > ::slotted(:not(:first-of-type)) {
|
||||
border-top: 1px solid var(--lumo-contrast-20pct);
|
||||
margin-top: 0.5em;
|
||||
}
|
||||
.divider > ::slotted(:not(:first-of-type)) {
|
||||
border-top: 1px solid var(--lumo-contrast-20pct);
|
||||
margin-top: 0.5em;
|
||||
}
|
||||
`
|
||||
}
|
||||
|
||||
|
||||
@@ -14,38 +14,39 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import {css, customElement, html, LitElement} from 'lit-element'
|
||||
import {css, html, LitElement} from 'lit-element'
|
||||
import {customElement} from "lit/decorators.js"
|
||||
|
||||
@customElement("acrarium-dialog-content")
|
||||
export default class DialogContent extends LitElement {
|
||||
static get styles() {
|
||||
//language=css
|
||||
return css`
|
||||
:host {
|
||||
display: block;
|
||||
max-width: 1000px;
|
||||
}
|
||||
|
||||
.content {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
:host {
|
||||
display: block;
|
||||
max-width: 1000px;
|
||||
}
|
||||
|
||||
.footer {
|
||||
background-color: var(--lumo-contrast-5pct);
|
||||
display: flex;
|
||||
margin: calc(var(--lumo-space-l) * -1);
|
||||
margin-top: var(--lumo-space-l);
|
||||
padding: var(--lumo-space-s) var(--lumo-space-l);
|
||||
}
|
||||
.content {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
.spacer {
|
||||
flex: 1;
|
||||
}
|
||||
.footer {
|
||||
background-color: var(--lumo-contrast-5pct);
|
||||
display: flex;
|
||||
margin: calc(var(--lumo-space-l) * -1);
|
||||
margin-top: var(--lumo-space-l);
|
||||
padding: var(--lumo-space-s) var(--lumo-space-l);
|
||||
}
|
||||
|
||||
slot[name="header"]::slotted(*) {
|
||||
margin-top: var(--lumo-space-s) !important;
|
||||
}
|
||||
.spacer {
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
slot[name="header"]::slotted(*) {
|
||||
margin-top: var(--lumo-space-s) !important;
|
||||
}
|
||||
`
|
||||
}
|
||||
|
||||
|
||||
@@ -14,7 +14,8 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import {css, customElement, html, LitElement, property} from 'lit-element'
|
||||
import {css, html, LitElement} from 'lit-element'
|
||||
import {customElement, property} from "lit/decorators.js"
|
||||
|
||||
@customElement("acrarium-image-with-label")
|
||||
export default class ImageWithLabel extends LitElement {
|
||||
@@ -23,20 +24,20 @@ export default class ImageWithLabel extends LitElement {
|
||||
|
||||
static get styles() {
|
||||
return css`
|
||||
:host {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
}
|
||||
:host {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
img {
|
||||
width: 32px;
|
||||
height: 32px;
|
||||
}
|
||||
img {
|
||||
width: 32px;
|
||||
height: 32px;
|
||||
}
|
||||
|
||||
label {
|
||||
padding-left: var(--lumo-space-s);
|
||||
}
|
||||
label {
|
||||
padding-left: var(--lumo-space-s);
|
||||
}
|
||||
`
|
||||
}
|
||||
|
||||
|
||||
@@ -1,6 +1,3 @@
|
||||
body {
|
||||
--paper-menu-button: {
|
||||
padding: 0;
|
||||
};
|
||||
--paper-menu-button-dropdown-background: var(--lumo-base-color);
|
||||
}
|
||||
@@ -1,37 +0,0 @@
|
||||
This directory is automatically generated by Vaadin and contains the pre-compiled
|
||||
frontend files/resources for your project (frontend development bundle).
|
||||
|
||||
It should be added to Version Control System and committed, so that other developers
|
||||
do not have to compile it again.
|
||||
|
||||
Frontend development bundle is automatically updated when needed:
|
||||
|
||||
- an npm/pnpm package is added with @NpmPackage or directly into package.json
|
||||
- CSS, JavaScript or TypeScript files are added with @CssImport, @JsModule or @JavaScript
|
||||
- Vaadin add-on with front-end customizations is added
|
||||
- Custom theme imports/assets added into 'theme.json' file
|
||||
- Exported web component is added.
|
||||
|
||||
If your project development needs a hot deployment of the frontend changes,
|
||||
you can switch Flow to use Vite development server (default in Vaadin 23.3 and earlier versions):
|
||||
|
||||
- set `vaadin.frontend.hotdeploy=true` in `application.properties`
|
||||
- configure `vaadin-maven-plugin`:
|
||||
|
||||
```
|
||||
<configuration>
|
||||
<frontendHotdeploy>true</frontendHotdeploy>
|
||||
</configuration>
|
||||
```
|
||||
|
||||
- configure `jetty-maven-plugin`:
|
||||
|
||||
```
|
||||
<configuration>
|
||||
<systemProperties>
|
||||
<vaadin.frontend.hotdeploy>true</vaadin.frontend.hotdeploy>
|
||||
</systemProperties>
|
||||
</configuration>
|
||||
```
|
||||
|
||||
Read more [about Vaadin development mode](https://vaadin.com/docs/next/configuration/development-mode/#pre-compiled-front-end-bundle-for-faster-start-up).
|
||||
@@ -1,316 +0,0 @@
|
||||
{
|
||||
"packageJsonDependencies": {
|
||||
"@polymer/paper-menu-button": "3.0.1",
|
||||
"@polymer/polymer": "3.5.1",
|
||||
"@vaadin/accordion": "24.0.2",
|
||||
"@vaadin/app-layout": "24.0.2",
|
||||
"@vaadin/avatar": "24.0.2",
|
||||
"@vaadin/avatar-group": "24.0.2",
|
||||
"@vaadin/board": "24.0.2",
|
||||
"@vaadin/bundles": "24.0.2",
|
||||
"@vaadin/button": "24.0.2",
|
||||
"@vaadin/charts": "24.0.2",
|
||||
"@vaadin/checkbox": "24.0.2",
|
||||
"@vaadin/checkbox-group": "24.0.2",
|
||||
"@vaadin/combo-box": "24.0.2",
|
||||
"@vaadin/common-frontend": "0.0.17",
|
||||
"@vaadin/component-base": "24.0.2",
|
||||
"@vaadin/confirm-dialog": "24.0.2",
|
||||
"@vaadin/context-menu": "24.0.2",
|
||||
"@vaadin/cookie-consent": "24.0.2",
|
||||
"@vaadin/crud": "24.0.2",
|
||||
"@vaadin/custom-field": "24.0.2",
|
||||
"@vaadin/date-picker": "24.0.2",
|
||||
"@vaadin/date-time-picker": "24.0.2",
|
||||
"@vaadin/details": "24.0.2",
|
||||
"@vaadin/dialog": "24.0.2",
|
||||
"@vaadin/email-field": "24.0.2",
|
||||
"@vaadin/field-base": "24.0.2",
|
||||
"@vaadin/field-highlighter": "24.0.2",
|
||||
"@vaadin/form-layout": "24.0.2",
|
||||
"@vaadin/grid": "24.0.2",
|
||||
"@vaadin/grid-pro": "24.0.2",
|
||||
"@vaadin/horizontal-layout": "24.0.2",
|
||||
"@vaadin/icon": "24.0.2",
|
||||
"@vaadin/icons": "24.0.2",
|
||||
"@vaadin/input-container": "24.0.2",
|
||||
"@vaadin/integer-field": "24.0.2",
|
||||
"@vaadin/item": "24.0.2",
|
||||
"@vaadin/list-box": "24.0.2",
|
||||
"@vaadin/lit-renderer": "24.0.2",
|
||||
"@vaadin/login": "24.0.2",
|
||||
"@vaadin/map": "24.0.2",
|
||||
"@vaadin/menu-bar": "24.0.2",
|
||||
"@vaadin/message-input": "24.0.2",
|
||||
"@vaadin/message-list": "24.0.2",
|
||||
"@vaadin/multi-select-combo-box": "24.0.2",
|
||||
"@vaadin/notification": "24.0.2",
|
||||
"@vaadin/number-field": "24.0.2",
|
||||
"@vaadin/overlay": "24.0.2",
|
||||
"@vaadin/password-field": "24.0.2",
|
||||
"@vaadin/polymer-legacy-adapter": "24.0.2",
|
||||
"@vaadin/progress-bar": "24.0.2",
|
||||
"@vaadin/radio-group": "24.0.2",
|
||||
"@vaadin/rich-text-editor": "24.0.2",
|
||||
"@vaadin/router": "1.7.5",
|
||||
"@vaadin/scroller": "24.0.2",
|
||||
"@vaadin/select": "24.0.2",
|
||||
"@vaadin/split-layout": "24.0.2",
|
||||
"@vaadin/tabs": "24.0.2",
|
||||
"@vaadin/tabsheet": "24.0.2",
|
||||
"@vaadin/text-area": "24.0.2",
|
||||
"@vaadin/text-field": "24.0.2",
|
||||
"@vaadin/time-picker": "24.0.2",
|
||||
"@vaadin/tooltip": "24.0.2",
|
||||
"@vaadin/upload": "24.0.2",
|
||||
"@vaadin/vaadin-development-mode-detector": "2.0.6",
|
||||
"@vaadin/vaadin-lumo-styles": "24.0.2",
|
||||
"@vaadin/vaadin-material-styles": "24.0.2",
|
||||
"@vaadin/vaadin-themable-mixin": "24.0.2",
|
||||
"@vaadin/vaadin-usage-statistics": "2.1.2",
|
||||
"@vaadin/vertical-layout": "24.0.2",
|
||||
"@vaadin/virtual-list": "24.0.2",
|
||||
"apexcharts": "3.35.0",
|
||||
"construct-style-sheets-polyfill": "3.1.0",
|
||||
"date-fns": "2.29.3",
|
||||
"lit": "2.6.1",
|
||||
"onecolor": "3.1.0",
|
||||
"proj4": "2.8.1"
|
||||
},
|
||||
"npmModules": {
|
||||
"@lit/reactive-element": "1.6.1",
|
||||
"@polymer/iron-a11y-keys-behavior": "3.0.1",
|
||||
"@polymer/iron-behaviors": "3.0.1",
|
||||
"@polymer/iron-dropdown": "3.0.1",
|
||||
"@polymer/iron-fit-behavior": "3.0.2",
|
||||
"@polymer/iron-overlay-behavior": "3.0.3",
|
||||
"@polymer/iron-resizable-behavior": "3.0.1",
|
||||
"@polymer/neon-animation": "3.0.1",
|
||||
"@polymer/paper-menu-button": "3.0.1",
|
||||
"@polymer/paper-styles": "3.0.1",
|
||||
"@polymer/polymer": "3.5.1",
|
||||
"@vaadin/accordion": "24.0.2",
|
||||
"@vaadin/app-layout": "24.0.2",
|
||||
"@vaadin/avatar": "24.0.2",
|
||||
"@vaadin/avatar-group": "24.0.2",
|
||||
"@vaadin/board": "24.0.2",
|
||||
"@vaadin/button": "24.0.2",
|
||||
"@vaadin/charts": "24.0.2",
|
||||
"@vaadin/checkbox": "24.0.2",
|
||||
"@vaadin/checkbox-group": "24.0.2",
|
||||
"@vaadin/combo-box": "24.0.2",
|
||||
"@vaadin/common-frontend": "0.0.17",
|
||||
"@vaadin/component-base": "24.0.2",
|
||||
"@vaadin/confirm-dialog": "24.0.2",
|
||||
"@vaadin/context-menu": "24.0.2",
|
||||
"@vaadin/cookie-consent": "24.0.2",
|
||||
"@vaadin/crud": "24.0.2",
|
||||
"@vaadin/custom-field": "24.0.2",
|
||||
"@vaadin/date-picker": "24.0.2",
|
||||
"@vaadin/date-time-picker": "24.0.2",
|
||||
"@vaadin/details": "24.0.2",
|
||||
"@vaadin/dialog": "24.0.2",
|
||||
"@vaadin/email-field": "24.0.2",
|
||||
"@vaadin/field-base": "24.0.2",
|
||||
"@vaadin/field-highlighter": "24.0.2",
|
||||
"@vaadin/form-layout": "24.0.2",
|
||||
"@vaadin/grid": "24.0.2",
|
||||
"@vaadin/grid-pro": "24.0.2",
|
||||
"@vaadin/horizontal-layout": "24.0.2",
|
||||
"@vaadin/icon": "24.0.2",
|
||||
"@vaadin/icons": "24.0.2",
|
||||
"@vaadin/input-container": "24.0.2",
|
||||
"@vaadin/integer-field": "24.0.2",
|
||||
"@vaadin/item": "24.0.2",
|
||||
"@vaadin/list-box": "24.0.2",
|
||||
"@vaadin/login": "24.0.2",
|
||||
"@vaadin/map": "24.0.2",
|
||||
"@vaadin/menu-bar": "24.0.2",
|
||||
"@vaadin/message-input": "24.0.2",
|
||||
"@vaadin/message-list": "24.0.2",
|
||||
"@vaadin/multi-select-combo-box": "24.0.2",
|
||||
"@vaadin/notification": "24.0.2",
|
||||
"@vaadin/number-field": "24.0.2",
|
||||
"@vaadin/overlay": "24.0.2",
|
||||
"@vaadin/password-field": "24.0.2",
|
||||
"@vaadin/polymer-legacy-adapter": "24.0.2",
|
||||
"@vaadin/progress-bar": "24.0.2",
|
||||
"@vaadin/radio-group": "24.0.2",
|
||||
"@vaadin/rich-text-editor": "24.0.2",
|
||||
"@vaadin/router": "1.7.5",
|
||||
"@vaadin/scroller": "24.0.2",
|
||||
"@vaadin/select": "24.0.2",
|
||||
"@vaadin/split-layout": "24.0.2",
|
||||
"@vaadin/tabs": "24.0.2",
|
||||
"@vaadin/tabsheet": "24.0.2",
|
||||
"@vaadin/text-area": "24.0.2",
|
||||
"@vaadin/text-field": "24.0.2",
|
||||
"@vaadin/time-picker": "24.0.2",
|
||||
"@vaadin/tooltip": "24.0.2",
|
||||
"@vaadin/upload": "24.0.2",
|
||||
"@vaadin/vaadin-development-mode-detector": "2.0.6",
|
||||
"@vaadin/vaadin-lumo-styles": "24.0.2",
|
||||
"@vaadin/vaadin-themable-mixin": "24.0.2",
|
||||
"@vaadin/vaadin-usage-statistics": "2.1.2",
|
||||
"@vaadin/vertical-layout": "24.0.2",
|
||||
"@vaadin/virtual-list": "24.0.2",
|
||||
"@webcomponents/shadycss": "1.11.1",
|
||||
"apexcharts": "3.35.0",
|
||||
"cookieconsent": "3.1.1",
|
||||
"date-fns": "2.29.3",
|
||||
"highcharts": "9.2.2",
|
||||
"lit-element": "3.2.2",
|
||||
"lit-html": "2.7.0",
|
||||
"mgrs": "1.0.0",
|
||||
"ol": "6.13.0",
|
||||
"onecolor": "3.1.0",
|
||||
"proj4": "2.8.1",
|
||||
"quickselect": "2.0.0",
|
||||
"rbush": "3.0.1",
|
||||
"tslib": "2.4.1",
|
||||
"wkt-parser": "1.3.2"
|
||||
},
|
||||
"bundleImports": [
|
||||
"@vaadin/vaadin-themable-mixin",
|
||||
"Frontend/styles/global.css",
|
||||
"Frontend/generated/jar-resources/com/github/appreciated/apexcharts/apexcharts-wrapper-styles.css",
|
||||
"@vaadin/grid/theme/lumo/vaadin-grid.js",
|
||||
"@vaadin/tooltip/theme/lumo/vaadin-tooltip.js",
|
||||
"@vaadin/grid/theme/lumo/vaadin-grid-column.js",
|
||||
"@polymer/paper-menu-button/paper-menu-button.js",
|
||||
"@vaadin/accordion/theme/lumo/vaadin-accordion-panel.js",
|
||||
"@vaadin/accordion/theme/lumo/vaadin-accordion.js",
|
||||
"@vaadin/app-layout/theme/lumo/vaadin-app-layout.js",
|
||||
"@vaadin/app-layout/theme/lumo/vaadin-drawer-toggle.js",
|
||||
"@vaadin/avatar-group/theme/lumo/vaadin-avatar-group.js",
|
||||
"@vaadin/avatar/theme/lumo/vaadin-avatar.js",
|
||||
"@vaadin/board/vaadin-board-row.js",
|
||||
"@vaadin/board/vaadin-board.js",
|
||||
"@vaadin/button/theme/lumo/vaadin-button.js",
|
||||
"@vaadin/charts/theme/lumo/vaadin-chart.js",
|
||||
"@vaadin/checkbox-group/theme/lumo/vaadin-checkbox-group.js",
|
||||
"@vaadin/checkbox/theme/lumo/vaadin-checkbox.js",
|
||||
"@vaadin/combo-box/theme/lumo/vaadin-combo-box.js",
|
||||
"@vaadin/common-frontend/ConnectionIndicator.js",
|
||||
"@vaadin/confirm-dialog/theme/lumo/vaadin-confirm-dialog.js",
|
||||
"@vaadin/context-menu/theme/lumo/vaadin-context-menu.js",
|
||||
"@vaadin/cookie-consent/theme/lumo/vaadin-cookie-consent.js",
|
||||
"@vaadin/crud/src/vaadin-crud-edit-column.js",
|
||||
"@vaadin/crud/theme/lumo/vaadin-crud.js",
|
||||
"@vaadin/custom-field/theme/lumo/vaadin-custom-field.js",
|
||||
"@vaadin/date-picker/theme/lumo/vaadin-date-picker.js",
|
||||
"@vaadin/date-time-picker/theme/lumo/vaadin-date-time-picker.js",
|
||||
"@vaadin/details/theme/lumo/vaadin-details.js",
|
||||
"@vaadin/dialog/theme/lumo/vaadin-dialog.js",
|
||||
"@vaadin/email-field/theme/lumo/vaadin-email-field.js",
|
||||
"@vaadin/field-highlighter/theme/lumo/vaadin-field-highlighter.js",
|
||||
"@vaadin/form-layout/theme/lumo/vaadin-form-item.js",
|
||||
"@vaadin/form-layout/theme/lumo/vaadin-form-layout.js",
|
||||
"@vaadin/grid-pro/theme/lumo/vaadin-grid-pro-edit-column.js",
|
||||
"@vaadin/grid-pro/theme/lumo/vaadin-grid-pro.js",
|
||||
"@vaadin/grid/theme/lumo/vaadin-grid-column-group.js",
|
||||
"@vaadin/grid/theme/lumo/vaadin-grid-sorter.js",
|
||||
"@vaadin/grid/theme/lumo/vaadin-grid-tree-toggle.js",
|
||||
"@vaadin/horizontal-layout/theme/lumo/vaadin-horizontal-layout.js",
|
||||
"@vaadin/icon/vaadin-icon.js",
|
||||
"@vaadin/icons/vaadin-iconset.js",
|
||||
"@vaadin/integer-field/theme/lumo/vaadin-integer-field.js",
|
||||
"@vaadin/item/theme/lumo/vaadin-item.js",
|
||||
"@vaadin/list-box/theme/lumo/vaadin-list-box.js",
|
||||
"@vaadin/login/theme/lumo/vaadin-login-form.js",
|
||||
"@vaadin/login/theme/lumo/vaadin-login-overlay.js",
|
||||
"@vaadin/map/theme/lumo/vaadin-map.js",
|
||||
"@vaadin/menu-bar/theme/lumo/vaadin-menu-bar.js",
|
||||
"@vaadin/message-input/theme/lumo/vaadin-message-input.js",
|
||||
"@vaadin/message-list/theme/lumo/vaadin-message-list.js",
|
||||
"@vaadin/multi-select-combo-box/theme/lumo/vaadin-multi-select-combo-box.js",
|
||||
"@vaadin/notification/theme/lumo/vaadin-notification.js",
|
||||
"@vaadin/number-field/theme/lumo/vaadin-number-field.js",
|
||||
"@vaadin/password-field/theme/lumo/vaadin-password-field.js",
|
||||
"@vaadin/polymer-legacy-adapter/style-modules.js",
|
||||
"@vaadin/progress-bar/theme/lumo/vaadin-progress-bar.js",
|
||||
"@vaadin/radio-group/theme/lumo/vaadin-radio-button.js",
|
||||
"@vaadin/radio-group/theme/lumo/vaadin-radio-group.js",
|
||||
"@vaadin/rich-text-editor/theme/lumo/vaadin-rich-text-editor.js",
|
||||
"@vaadin/scroller/vaadin-scroller.js",
|
||||
"@vaadin/select/theme/lumo/vaadin-select.js",
|
||||
"@vaadin/split-layout/theme/lumo/vaadin-split-layout.js",
|
||||
"@vaadin/tabs/theme/lumo/vaadin-tab.js",
|
||||
"@vaadin/tabs/theme/lumo/vaadin-tabs.js",
|
||||
"@vaadin/tabsheet/theme/lumo/vaadin-tabsheet.js",
|
||||
"@vaadin/text-area/theme/lumo/vaadin-text-area.js",
|
||||
"@vaadin/text-field/theme/lumo/vaadin-text-field.js",
|
||||
"@vaadin/time-picker/theme/lumo/vaadin-time-picker.js",
|
||||
"@vaadin/upload/theme/lumo/vaadin-upload.js",
|
||||
"@vaadin/vaadin-lumo-styles/color.js",
|
||||
"@vaadin/vaadin-lumo-styles/sizing.js",
|
||||
"@vaadin/vaadin-lumo-styles/spacing.js",
|
||||
"@vaadin/vaadin-lumo-styles/style.js",
|
||||
"@vaadin/vaadin-lumo-styles/typography.js",
|
||||
"@vaadin/vaadin-lumo-styles/vaadin-iconset.js",
|
||||
"@vaadin/vertical-layout/theme/lumo/vaadin-vertical-layout.js",
|
||||
"@vaadin/virtual-list/vaadin-virtual-list.js",
|
||||
"Frontend/elements/box.ts",
|
||||
"Frontend/elements/card.ts",
|
||||
"Frontend/elements/dialog-content.ts",
|
||||
"Frontend/elements/image-with-label.ts",
|
||||
"Frontend/generated/jar-resources/com/github/appreciated/apexcharts/apexcharts-wrapper.ts",
|
||||
"Frontend/generated/jar-resources/comboBoxConnector.js",
|
||||
"Frontend/generated/jar-resources/contextMenuConnector.js",
|
||||
"Frontend/generated/jar-resources/contextMenuTargetConnector.js",
|
||||
"Frontend/generated/jar-resources/cookieConsentConnector.js",
|
||||
"Frontend/generated/jar-resources/datepickerConnector.js",
|
||||
"Frontend/generated/jar-resources/dndConnector-es6.js",
|
||||
"Frontend/generated/jar-resources/flow-component-renderer.js",
|
||||
"Frontend/generated/jar-resources/gridConnector.js",
|
||||
"Frontend/generated/jar-resources/gridProConnector.js",
|
||||
"Frontend/generated/jar-resources/lit-renderer.ts",
|
||||
"Frontend/generated/jar-resources/lumo-includes.ts",
|
||||
"Frontend/generated/jar-resources/menubarConnector.js",
|
||||
"Frontend/generated/jar-resources/messageListConnector.js",
|
||||
"Frontend/generated/jar-resources/selectConnector.js",
|
||||
"Frontend/generated/jar-resources/tooltip.ts",
|
||||
"Frontend/generated/jar-resources/vaadin-big-decimal-field.js",
|
||||
"Frontend/generated/jar-resources/vaadin-grid-flow-selection-column.js",
|
||||
"Frontend/generated/jar-resources/vaadin-map/mapConnector.js",
|
||||
"Frontend/generated/jar-resources/vaadin-time-picker/timepickerConnector.js",
|
||||
"Frontend/generated/jar-resources/virtualListConnector.js",
|
||||
"Frontend/styles/shared-styles.js"
|
||||
],
|
||||
"frontendHashes": {
|
||||
"styles/global.css": "57a9b7f102d498601fb330265d807c9daaa542fdb94540d9adba9913a338292d",
|
||||
"elements/box.ts": "7db5d2198a2afdf06a12b3cbfc824c9e7936e7083b5edb6b331264b4b8cfdd5f",
|
||||
"elements/card.ts": "20a768900559e4c3763d3d80410d3f13788525e3e3334ecc61df53ac86273c10",
|
||||
"elements/dialog-content.ts": "ef0934719280aa60a47731e4213e88d1f43f4b1475b1c7a313f0c82d0d4f1db7",
|
||||
"elements/image-with-label.ts": "f55f5a9539e4a3dd4a4c496eeea6f5359a3c2b6649147ffeeb0e11ae1921195f",
|
||||
"styles/shared-styles.js": "4144bb6f78b8f0393409f6f9d7a93fac70a756b24ba896037c6ebc5c69d0b006",
|
||||
"com/github/appreciated/apexcharts/apexcharts-wrapper-styles.css": "d837b7f39ff5cac62b2e0d4a48bb9a2c9c073451ee5c96ca4ba9394e7f91a542",
|
||||
"com/github/appreciated/apexcharts/apexcharts-wrapper.ts": "a7651281f94f4d2ec2eef5ce5dbe70985f2005212f4141f1ddcacefda799edff",
|
||||
"comboBoxConnector.js": "1d004c3dae9c76f8bcc68678abe1b8f7bdc8b456f5c9c4c7f190df8ed25d66cd",
|
||||
"contextMenuConnector.js": "25a200f8086461635ddd92316ebeb5a868294c8650a190efbae120edb1088f4f",
|
||||
"contextMenuTargetConnector.js": "870f67643988dd5618c247bd3c28d843f70aa026ee89f44c3c7556b5e70856af",
|
||||
"cookieConsentConnector.js": "cc362ee370ce0a48d6c0f6882a5faf7fefbda89ea7ac9f483b7b4d65eab9cdf5",
|
||||
"datepickerConnector.js": "84d25236e1e478c2e181a7881464ad75228a30ccd99d60f78186f0804b6a4a37",
|
||||
"dndConnector-es6.js": "d1923b7ec5655346bc130c7ce477d69eb3776417ddc942dd7f69fee1188e0ddf",
|
||||
"flow-component-renderer.js": "69175eaf0e9c85e3e6574203778bdaeb2de62735c2b7279d1925d780797c2018",
|
||||
"gridConnector.js": "844651edd2d8980c5f9d344cc2b8fb0f0f34c0127ce6f0fe04e873930cc1d13f",
|
||||
"gridProConnector.js": "bda2f830ef5a534e672457a633787dad9d7e69467b90330d1f5310d01dcbb61f",
|
||||
"lit-renderer.ts": "afefa9f5fcb38260a0ff08bc044a5f591f242689ca3c7905130ad32df0476e7c",
|
||||
"lumo-includes.ts": "be2372586a5d7de41ae33e60d9b882eba8b7f751d314cfae1672c32ee8fd09ea",
|
||||
"menubarConnector.js": "8ddac5a87155632c516fd16c9402bd9a2fe6d965998169743744842aacdfd412",
|
||||
"messageListConnector.js": "480d7092b9fe42aab45756eb4287b2c4b0d6e5d38514e967543bc5c317948c18",
|
||||
"selectConnector.js": "bd4277e735d390853603351ddd963233349b702789ddf8ce000df5179bb30523",
|
||||
"tooltip.ts": "b7e9af67169277b94cab722d244340c3a9d463bcf4de2aaa84dddcebbd59447b",
|
||||
"vaadin-big-decimal-field.js": "0e0f4e3bb8928c708d02e77d07ede09525102440511942e3b24721702352f140",
|
||||
"vaadin-grid-flow-selection-column.js": "f365d122c334d411f30c5463fb7c0dbfde705f3ee3924bcd41837f7d0a9a0301",
|
||||
"vaadin-map/mapConnector.js": "de0c5df521fb0f62341cc0bb372a3e5269b89fc7daccb2f5e14a937e161ab33b",
|
||||
"vaadin-time-picker/timepickerConnector.js": "68889ce9748478f71bf1620d488abbbd588f8047618ac558315d9b0b689e75e8",
|
||||
"virtualListConnector.js": "e89f6bc6f5cd4765c863ae12721371ebff9079d163679e3989368fb7f74e5e61"
|
||||
},
|
||||
"themeJsonContents": {},
|
||||
"entryScripts": [
|
||||
"VAADIN/build/indexhtml-fc2335b1.js"
|
||||
],
|
||||
"webComponents": [],
|
||||
"packageJsonHash": "f64b2504e1a1b91c9fe51134b19b44d17d016f6440fb0766e575bd33778d85e1"
|
||||
}
|
||||
@@ -1,436 +0,0 @@
|
||||
import {html, LitElement} from 'lit';
|
||||
import {customElement} from 'lit/decorators.js';
|
||||
// @ts-ignore
|
||||
import ApexCharts from 'apexcharts/dist/apexcharts.esm';
|
||||
import '@webcomponents/shadycss/apply-shim.min.js';
|
||||
import color from "onecolor";
|
||||
import {PropertyValues} from "@lit/reactive-element/development/reactive-element";
|
||||
|
||||
declare global {
|
||||
interface Window {
|
||||
ShadyCSS?: any;
|
||||
}
|
||||
}
|
||||
|
||||
@customElement('apex-charts-wrapper')
|
||||
export class ApexChartsWrapper extends LitElement {
|
||||
config: any = {};
|
||||
chartComponent?: ApexCharts;
|
||||
annotations?: string;
|
||||
chart?: string;
|
||||
series?: string;
|
||||
labels?: string;
|
||||
colors?: string;
|
||||
dataLabels?: string;
|
||||
fill?: string;
|
||||
forecastDataPoints?: string;
|
||||
grid?: string;
|
||||
legend?: string;
|
||||
markers?: string;
|
||||
noData?: string;
|
||||
plotOptions?: string;
|
||||
responsive?: string;
|
||||
states?: string;
|
||||
stroke?: string;
|
||||
subtitle?: string;
|
||||
theme?: string;
|
||||
chartTitle?: string;
|
||||
tooltip?: string;
|
||||
xaxis?: string;
|
||||
yaxis?: string;
|
||||
width?: string;
|
||||
height?: string;
|
||||
debug?: string;
|
||||
|
||||
render() {
|
||||
return html`
|
||||
<style include="apex-charts-style"></style>
|
||||
<slot></slot>
|
||||
`;
|
||||
}
|
||||
|
||||
static get properties() {
|
||||
return {
|
||||
annotations: {
|
||||
type: Object
|
||||
}, // ApexAnnotations;
|
||||
chart: {
|
||||
type: Object
|
||||
}, // ApexChart;
|
||||
colors: {
|
||||
type: Object
|
||||
}, // string[];
|
||||
dataLabels: {
|
||||
type: Object
|
||||
}, // ApexDataLabels;
|
||||
fill: {
|
||||
type: Object
|
||||
}, // ApexFill;
|
||||
forecastDataPoints: {
|
||||
type: Object
|
||||
}, // ApexForecastDataPoints;
|
||||
grid: {
|
||||
type: Object
|
||||
}, // ApexGrid;
|
||||
labels: {
|
||||
type: Object
|
||||
}, // string[];
|
||||
legend: {
|
||||
type: Object
|
||||
}, // ApexLegend;
|
||||
markers: {
|
||||
type: Object
|
||||
}, // ApexMarkers;
|
||||
noData: {
|
||||
type: Object
|
||||
}, // ApexNoData;
|
||||
plotOptions: {
|
||||
type: Object
|
||||
}, // ApexPlotOptions;
|
||||
responsive: {
|
||||
type: Object
|
||||
}, // ApexResponsive[];
|
||||
series: {
|
||||
type: Object
|
||||
}, // ApexAxisChartSeries | ApexNonAxisChartSeries;
|
||||
states: {
|
||||
type: Object
|
||||
}, // ApexStates;
|
||||
stroke: {
|
||||
type: Object
|
||||
}, // ApexStroke;
|
||||
subtitle: {
|
||||
type: Object
|
||||
}, // ApexTitleSubtitle;
|
||||
theme: {
|
||||
type: Object
|
||||
}, // ApexTheme;
|
||||
chartTitle: {
|
||||
type: Object
|
||||
}, // ApexTitleSubtitle;
|
||||
tooltip: {
|
||||
type: Object
|
||||
}, // ApexTooltip;
|
||||
xaxis: {
|
||||
type: Object
|
||||
}, // ApexXAxis;
|
||||
yaxis: {
|
||||
type: Object
|
||||
}, // ApexYAxis | ApexYAxis[];
|
||||
debug: {
|
||||
type: Boolean
|
||||
},
|
||||
width: {
|
||||
type: String
|
||||
},
|
||||
height: {
|
||||
type: String
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
firstUpdated(_changedProperties: PropertyValues) {
|
||||
super.firstUpdated(_changedProperties);
|
||||
const div = document.createElement('div');
|
||||
this.appendChild(div);
|
||||
this.updateConfig();
|
||||
this.chartComponent = new ApexCharts(div, this.config);
|
||||
this.beginRender();
|
||||
}
|
||||
|
||||
async beginRender() {
|
||||
try {
|
||||
await this.chartComponent.render();
|
||||
} catch (e) {
|
||||
console.error("An exception occurred during the rendering of the chart with the following configuration:");
|
||||
console.error(this.config);
|
||||
console.error(e);
|
||||
}
|
||||
}
|
||||
|
||||
updateConfig() {
|
||||
let primaryColor;
|
||||
if (window.ShadyCSS) {
|
||||
primaryColor = window.ShadyCSS.getComputedStyleValue(this, '--apex-charts-primary-color');
|
||||
} else {
|
||||
primaryColor = getComputedStyle(this).getPropertyValue('--apex-charts-primary-color');
|
||||
}
|
||||
let backgroundColor;
|
||||
if (window.ShadyCSS) {
|
||||
backgroundColor = window.ShadyCSS.getComputedStyleValue(this, '--apex-charts-background-color');
|
||||
} else {
|
||||
backgroundColor = getComputedStyle(this).getPropertyValue('--apex-charts-background-color');
|
||||
}
|
||||
this.config = {};
|
||||
if (this.annotations) {
|
||||
this.config.annotations = JSON.parse(this.annotations);
|
||||
}
|
||||
if (this.chart) {
|
||||
this.config.chart = JSON.parse(this.chart);
|
||||
if (this.config.chart && this.config.chart.events) {
|
||||
if (this.config.chart.events.animationEnd) {
|
||||
this.config.chart.events.animationEnd = this.evalFunction(this.config.chart.events.animationEnd);
|
||||
}
|
||||
if (this.config.chart.events.beforeMount) {
|
||||
this.config.chart.events.beforeMount = this.evalFunction(this.config.chart.events.beforeMount);
|
||||
}
|
||||
if (this.config.chart.events.mounted) {
|
||||
this.config.chart.events.mounted = this.evalFunction(this.config.chart.events.mounted);
|
||||
}
|
||||
if (this.config.chart.events.updated) {
|
||||
this.config.chart.events.updated = this.evalFunction(this.config.chart.events.updated);
|
||||
}
|
||||
if (this.config.chart.events.click) {
|
||||
this.config.chart.events.click = this.evalFunction(this.config.chart.events.click);
|
||||
}
|
||||
if (this.config.chart.events.mouseMove) {
|
||||
this.config.chart.events.mouseMove = this.evalFunction(this.config.chart.events.mouseMove);
|
||||
}
|
||||
if (this.config.chart.events.legendClick) {
|
||||
this.config.chart.events.legendClick = this.evalFunction(this.config.chart.events.legendClick);
|
||||
}
|
||||
if (this.config.chart.events.markerClick) {
|
||||
this.config.chart.events.markerClick = this.evalFunction(this.config.chart.events.markerClick);
|
||||
}
|
||||
if (this.config.chart.events.selection) {
|
||||
this.config.chart.events.selection = this.evalFunction(this.config.chart.events.selection);
|
||||
}
|
||||
if (this.config.chart.events.dataPointSelection) {
|
||||
this.config.chart.events.dataPointSelection = this.evalFunction(this.config.chart.events.dataPointSelection);
|
||||
}
|
||||
if (this.config.chart.events.dataPointMouseEnter) {
|
||||
this.config.chart.events.dataPointMouseEnter = this.evalFunction(this.config.chart.events.dataPointMouseEnter);
|
||||
}
|
||||
if (this.config.chart.events.dataPointMouseLeave) {
|
||||
this.config.chart.events.dataPointMouseLeave = this.evalFunction(this.config.chart.events.dataPointMouseLeave);
|
||||
}
|
||||
if (this.config.chart.events.beforeZoom) {
|
||||
this.config.chart.events.beforeZoom = this.evalFunction(this.config.chart.events.beforeZoom);
|
||||
}
|
||||
if (this.config.chart.events.beforeResetZoom) {
|
||||
this.config.chart.events.beforeResetZoom = this.evalFunction(this.config.chart.events.beforeResetZoom);
|
||||
}
|
||||
if (this.config.chart.events.zoomed) {
|
||||
this.config.chart.events.zoomed = this.evalFunction(this.config.chart.events.zoomed);
|
||||
}
|
||||
if (this.config.chart.events.scrolled) {
|
||||
this.config.chart.events.scrolled = this.evalFunction(this.config.chart.events.scrolled);
|
||||
}
|
||||
}
|
||||
}
|
||||
if (this.series) {
|
||||
this.config.series = JSON.parse(this.series);
|
||||
}
|
||||
if (this.labels) {
|
||||
this.config.labels = this.labels;
|
||||
if (this.config.labels.formatter) {
|
||||
this.config.labels.formatter = this.evalFunction(this.config.labels.formatter);
|
||||
}
|
||||
}
|
||||
if (this.colors) {
|
||||
this.config.colors = JSON.parse(this.colors);
|
||||
}
|
||||
if (this.dataLabels) {
|
||||
this.config.dataLabels = JSON.parse(this.dataLabels);
|
||||
if (this.config.dataLabels.formatter) {
|
||||
this.config.dataLabels.formatter = this.evalFunction(this.config.dataLabels.formatter);
|
||||
}
|
||||
}
|
||||
if (this.fill) {
|
||||
this.config.fill = JSON.parse(this.fill);
|
||||
}
|
||||
if (this.forecastDataPoints) {
|
||||
this.config.forecastDataPoints = JSON.parse(this.forecastDataPoints);
|
||||
}
|
||||
if (this.grid) {
|
||||
this.config.grid = JSON.parse(this.grid);
|
||||
}
|
||||
if (this.legend) {
|
||||
this.config.legend = JSON.parse(this.legend);
|
||||
if (this.config.legend.formatter) {
|
||||
this.config.legend.formatter = this.evalFunction(this.config.legend.formatter);
|
||||
}
|
||||
}
|
||||
if (this.markers) {
|
||||
this.config.markers = JSON.parse(this.markers);
|
||||
}
|
||||
if (this.noData) {
|
||||
this.config.noData = this.noData;
|
||||
}
|
||||
if (this.plotOptions) {
|
||||
this.config.plotOptions = JSON.parse(this.plotOptions);
|
||||
}
|
||||
if (this.responsive) {
|
||||
this.config.responsive = JSON.parse(this.responsive);
|
||||
}
|
||||
if (this.states) {
|
||||
this.config.states = JSON.parse(this.states);
|
||||
}
|
||||
if (this.stroke) {
|
||||
this.config.stroke = JSON.parse(this.stroke);
|
||||
}
|
||||
if (this.subtitle) {
|
||||
this.config.subtitle = JSON.parse(this.subtitle);
|
||||
}
|
||||
if (this.theme) {
|
||||
this.config.theme = JSON.parse(this.theme);
|
||||
} else if (!this.config.fill || !this.config.fill.type || !Array.isArray(this.config.fill.type) || this.config.fill.type[0] !== "gradient") {
|
||||
if (backgroundColor && color(backgroundColor)) {
|
||||
this.config.theme = {
|
||||
mode: ((color(backgroundColor).lightness() > 0.5) ? 'light' : 'dark')
|
||||
};
|
||||
}
|
||||
if (!this.colors && primaryColor && color(primaryColor)) {
|
||||
this.config.theme.monochrome = {
|
||||
enabled: true,
|
||||
color: color(primaryColor).hex(),
|
||||
shadeTo: 'light',
|
||||
shadeIntensity: 0.65
|
||||
};
|
||||
}
|
||||
}
|
||||
if (this.chartTitle) {
|
||||
this.config.title = JSON.parse(this.chartTitle);
|
||||
}
|
||||
if (this.tooltip) {
|
||||
this.config.tooltip = JSON.parse(this.tooltip);
|
||||
if (this.config.tooltip.x && this.config.tooltip.x.formatter) {
|
||||
this.config.tooltip.x.formatter = this.evalFunction(this.config.tooltip.x.formatter);
|
||||
}
|
||||
if (this.config.tooltip.y && this.config.tooltip.y.formatter) {
|
||||
this.config.tooltip.y.formatter = this.evalFunction(this.config.tooltip.y.formatter);
|
||||
}
|
||||
if (this.config.tooltip.z && this.config.tooltip.z.formatter) {
|
||||
this.config.tooltip.z.formatter = this.evalFunction(this.config.tooltip.z.formatter);
|
||||
}
|
||||
if (this.config.tooltip.custom) {
|
||||
this.config.tooltip.custom = this.evalFunction(this.config.tooltip.custom);
|
||||
}
|
||||
}
|
||||
if (this.xaxis) {
|
||||
this.config.xaxis = JSON.parse(this.xaxis);
|
||||
if (this.config.xaxis.labels && this.config.xaxis.labels.formatter) {
|
||||
this.config.xaxis.labels.formatter = this.evalFunction(this.config.xaxis.labels.formatter);
|
||||
}
|
||||
if (this.config.xaxis.title && this.config.xaxis.title.formatter) {
|
||||
this.config.xaxis.title.formatter = this.evalFunction(this.config.xaxis.title.formatter);
|
||||
}
|
||||
}
|
||||
if (this.yaxis) {
|
||||
this.config.yaxis = JSON.parse(this.yaxis);
|
||||
for (let i = 0; i < this.config.yaxis.length; i++) {
|
||||
if (this.config.yaxis[i].labels && this.config.yaxis[i].labels.formatter) {
|
||||
this.config.yaxis[i].labels.formatter = this.evalFunction(this.config.yaxis[i].labels.formatter);
|
||||
}
|
||||
if (this.config.yaxis[i].title && this.config.yaxis[i].title.formatter) {
|
||||
this.config.yaxis[i].title.formatter = this.evalFunction(this.config.yaxis[i].title.formatter);
|
||||
}
|
||||
}
|
||||
}
|
||||
if (!this.config.chart) {
|
||||
this.config.chart = {};
|
||||
}
|
||||
if (this.width) {
|
||||
this.config.chart.width = this.width;
|
||||
}
|
||||
if (this.height) {
|
||||
this.config.chart.height = this.height;
|
||||
}
|
||||
if (!this.config.chart.background && backgroundColor && color(backgroundColor)) {
|
||||
this.config.chart.background = backgroundColor;
|
||||
}
|
||||
if (!this.config.stroke) {
|
||||
this.config.stroke = {};
|
||||
}
|
||||
if (this.config.chart && this.config.chart.type === "radar") {
|
||||
if (!this.config.plotOptions && backgroundColor && color(backgroundColor)) {
|
||||
this.config.plotOptions = {
|
||||
radar: {
|
||||
polygons: {
|
||||
fill: {
|
||||
colors: [color(backgroundColor).hex()]
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
if (this.config.plotoptions && this.config.plotoptions.radialbar && this.config.plotoptions.radialbar.datalabels && this.config.plotoptions.radialbar.datalabels.value && this.config.plotoptions.radialbar.datalabels.value.formatter) {
|
||||
this.config.plotoptions.radialbar.datalabels.value.formatter = this.evalFunction(this.config.plotoptions.radialbar.datalabels.value.formatter);
|
||||
}
|
||||
if (this.config.plotoptions && this.config.plotoptions.radialbar && this.config.plotoptions.radialbar.datalabels && this.config.plotoptions.radialbar.datalabels.total && this.config.plotoptions.radialbar.datalabels.total.formatter) {
|
||||
this.config.plotoptions.radialbar.datalabels.total.formatter = this.evalFunction(this.config.plotoptions.radialbar.datalabels.total.formatter);
|
||||
}
|
||||
if (this.config.plotoptions && this.config.plotoptions.pie && this.config.plotoptions.pie.datalabels && this.config.plotoptions.pie.datalabels.total && this.config.plotoptions.pie.datalabels.total.formatter) {
|
||||
this.config.plotoptions.pie.datalabels.total.formatter = this.evalFunction(this.config.plotoptions.pie.datalabels.total.formatter);
|
||||
}
|
||||
if (this.config.plotoptions && this.config.plotoptions.pie && this.config.plotoptions.pie.datalabels && this.config.plotoptions.pie.datalabels.value && this.config.plotoptions.pie.datalabels.value.formatter) {
|
||||
this.config.plotoptions.pie.datalabels.value.formatter = this.evalFunction(this.config.plotoptions.pie.datalabels.value.formatter);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* This is due to the way the eval function works eval("function (){return \"test\"}") will throw an
|
||||
* Uncaught SyntaxError: Function statements require a function name.
|
||||
*
|
||||
* If the string is wrapped with brackets, as for example eval("(function (){return \"test\"})") the function
|
||||
* returns ƒ (){return "test"} which is what is needed.
|
||||
* @param string for example "function (){return \"test\"}"
|
||||
* @returns {function} returns an actual JavaScript instance of the passed string function
|
||||
*/
|
||||
evalFunction(string: string) {
|
||||
return eval("(" + string + ")");
|
||||
}
|
||||
|
||||
updateData() {
|
||||
if (this.chartComponent && this.series) {
|
||||
this.chartComponent.updateSeries(JSON.parse(this.series));
|
||||
}
|
||||
if (this.debug) {
|
||||
console.log(this.chartComponent);
|
||||
}
|
||||
}
|
||||
|
||||
reRender() {
|
||||
if (this.chartComponent) {
|
||||
this.updateConfig();
|
||||
this.chartComponent.render();
|
||||
}
|
||||
}
|
||||
|
||||
dataURI() {
|
||||
if (this.chartComponent) {
|
||||
this.updateConfig();
|
||||
return this.chartComponent.dataURI();
|
||||
}
|
||||
}
|
||||
|
||||
toggleSeries(seriesName: string) {
|
||||
if (this.chartComponent) {
|
||||
this.updateConfig();
|
||||
return this.chartComponent.toggleSeries(seriesName);
|
||||
}
|
||||
}
|
||||
|
||||
hideSeries(seriesName: string) {
|
||||
if (this.chartComponent) {
|
||||
this.updateConfig();
|
||||
return this.chartComponent.hideSeries(seriesName);
|
||||
}
|
||||
}
|
||||
|
||||
showSeries(seriesName: string) {
|
||||
if (this.chartComponent) {
|
||||
this.updateConfig();
|
||||
return this.chartComponent.showSeries(seriesName);
|
||||
}
|
||||
}
|
||||
|
||||
resetSeries(shouldUpdateChart: boolean, shouldResetZoom: boolean) {
|
||||
if (this.chartComponent) {
|
||||
this.updateConfig();
|
||||
return this.chartComponent.resetSeries(shouldUpdateChart, shouldResetZoom);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,50 +0,0 @@
|
||||
/*
|
||||
* (C) Copyright 2019 Lukas Morawietz (https://github.com/F43nd1r)
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import {css, customElement, html, LitElement} from 'lit-element'
|
||||
|
||||
@customElement("acrarium-box")
|
||||
export default class Box extends LitElement {
|
||||
static get styles() {
|
||||
return css`
|
||||
:host {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.acrarium-box-title {
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.acrarium-box-text {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
flex: 1;
|
||||
}
|
||||
`
|
||||
}
|
||||
|
||||
render() {
|
||||
return html`
|
||||
<div class="acrarium-box-text">
|
||||
<slot name="title" class="acrarium-box-title"></slot>
|
||||
<slot name="details"></slot>
|
||||
</div>
|
||||
<slot name="action"></slot>
|
||||
`
|
||||
}
|
||||
}
|
||||
@@ -1,85 +0,0 @@
|
||||
/*
|
||||
* (C) Copyright 2019 Lukas Morawietz (https://github.com/F43nd1r)
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import {css, customElement, html, LitElement, property} from 'lit-element'
|
||||
|
||||
@customElement("acrarium-card")
|
||||
export default class Card extends LitElement {
|
||||
@property() canCollapse: Boolean = false
|
||||
@property() isCollapsed: Boolean = false
|
||||
@property() divider: Boolean = false
|
||||
|
||||
static get styles() {
|
||||
return css`
|
||||
:host {
|
||||
box-shadow: 0 3px 6px rgba(0, 0, 0, 0.16), 0 3px 6px rgba(0, 0, 0, 0.23);
|
||||
border-radius: 2px;
|
||||
margin: 1rem;
|
||||
display: inline-flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
.acrarium-card-header {
|
||||
padding: 1rem;
|
||||
box-sizing: border-box;
|
||||
background-color: var(--acrarium-card-header-color, var(--lumo-contrast-5pct));
|
||||
color: var(--acrarium-card-header-text-color);
|
||||
display: inline-block;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.acrarium-card-content {
|
||||
padding: 1rem;
|
||||
box-sizing: border-box;
|
||||
display: inline-flex;
|
||||
flex-direction: column;
|
||||
align-content: center;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.acrarium-card-content-wrapper {
|
||||
width: 100%;
|
||||
flex: 1;
|
||||
min-height: 0;
|
||||
}
|
||||
|
||||
.collapse {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.divider > ::slotted(:not(:first-of-type)) {
|
||||
border-top: 1px solid var(--lumo-contrast-20pct);
|
||||
margin-top: 0.5em;
|
||||
}
|
||||
`
|
||||
}
|
||||
|
||||
render() {
|
||||
return html`
|
||||
<slot name="header" class="acrarium-card-header" @click="${this.handleClick}"></slot>
|
||||
<div class="acrarium-card-content-wrapper ${this.isCollapsed ? "collapse" : this.divider ? "divider" : ""}">
|
||||
<slot class="acrarium-card-content"></slot>
|
||||
</div>
|
||||
`
|
||||
}
|
||||
|
||||
handleClick() {
|
||||
if (this.canCollapse) {
|
||||
this.isCollapsed = !this.isCollapsed;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,67 +0,0 @@
|
||||
/*
|
||||
* (C) Copyright 2019 Lukas Morawietz (https://github.com/F43nd1r)
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import {css, customElement, html, LitElement} from 'lit-element'
|
||||
|
||||
@customElement("acrarium-dialog-content")
|
||||
export default class DialogContent extends LitElement {
|
||||
static get styles() {
|
||||
//language=css
|
||||
return css`
|
||||
:host {
|
||||
display: block;
|
||||
max-width: 1000px;
|
||||
}
|
||||
|
||||
.content {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
.footer {
|
||||
background-color: var(--lumo-contrast-5pct);
|
||||
display: flex;
|
||||
margin: calc(var(--lumo-space-l) * -1);
|
||||
margin-top: var(--lumo-space-l);
|
||||
padding: var(--lumo-space-s) var(--lumo-space-l);
|
||||
}
|
||||
|
||||
.spacer {
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
slot[name="header"]::slotted(*) {
|
||||
margin-top: var(--lumo-space-s) !important;
|
||||
}
|
||||
`
|
||||
}
|
||||
|
||||
render() {
|
||||
return html`
|
||||
<div class="header">
|
||||
<slot name="header"></slot>
|
||||
</div>
|
||||
<div class="content">
|
||||
<slot></slot>
|
||||
</div>
|
||||
<div class="footer">
|
||||
<slot name="negative"></slot>
|
||||
<div class="spacer"></div>
|
||||
<slot name="positive"></slot>
|
||||
</div>
|
||||
`
|
||||
}
|
||||
}
|
||||
@@ -1,49 +0,0 @@
|
||||
/*
|
||||
* (C) Copyright 2019 Lukas Morawietz (https://github.com/F43nd1r)
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import {css, customElement, html, LitElement, property} from 'lit-element'
|
||||
|
||||
@customElement("acrarium-image-with-label")
|
||||
export default class ImageWithLabel extends LitElement {
|
||||
@property() image: String = ""
|
||||
@property() label: String = ""
|
||||
|
||||
static get styles() {
|
||||
return css`
|
||||
:host {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
img {
|
||||
width: 32px;
|
||||
height: 32px;
|
||||
}
|
||||
|
||||
label {
|
||||
padding-left: var(--lumo-space-s);
|
||||
}
|
||||
`
|
||||
}
|
||||
|
||||
render() {
|
||||
return html`
|
||||
<img src="${this.image}" alt="${this.label}">
|
||||
<label>${this.label}</label>
|
||||
`
|
||||
}
|
||||
}
|
||||
@@ -1,26 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<!--
|
||||
This file is auto-generated by Vaadin.
|
||||
-->
|
||||
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
||||
<style>
|
||||
body, #outlet {
|
||||
height: 100vh;
|
||||
width: 100%;
|
||||
margin: 0;
|
||||
}
|
||||
</style>
|
||||
<meta name="robots" content="noindex,nofollow"/>
|
||||
<!-- index.ts is included here automatically (either by the dev server or during the build) -->
|
||||
|
||||
<script type="module" crossorigin src="./VAADIN/build/indexhtml-fc2335b1.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<!-- This outlet div is where the views are rendered -->
|
||||
<div id="outlet"></div>
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* (C) Copyright 2021 Lukas Morawietz (https://github.com/F43nd1r)
|
||||
* (C) Copyright 2021-2024 Lukas Morawietz (https://github.com/F43nd1r)
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -15,6 +15,8 @@
|
||||
*/
|
||||
package com.faendir.acra.ui.component
|
||||
|
||||
import com.faendir.acra.ui.ext.SizeUnit
|
||||
import com.faendir.acra.ui.ext.setPadding
|
||||
import com.github.appreciated.papermenubutton.PaperMenuButton
|
||||
import com.vaadin.flow.component.Component
|
||||
import com.vaadin.flow.component.Composite
|
||||
@@ -30,6 +32,7 @@ open class PopupButton(private val icon: VaadinIcon) : Composite<PaperMenuButton
|
||||
override fun initContent(): PaperMenuButton {
|
||||
return PaperMenuButton(Button(Icon(icon)).apply { element.appendChild(Icon(VaadinIcon.CHEVRON_DOWN_SMALL).element) }, container).apply {
|
||||
setDynamicAlign(true)
|
||||
setPadding(0.0, SizeUnit.PIXEL)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# (C) Copyright 2022-2023 Lukas Morawietz (https://github.com/F43nd1r)
|
||||
# (C) Copyright 2022-2024 Lukas Morawietz (https://github.com/F43nd1r)
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
@@ -55,6 +55,8 @@ springdoc:
|
||||
vaadin:
|
||||
pnpm:
|
||||
enable: true
|
||||
copilot:
|
||||
enable: false
|
||||
servlet:
|
||||
productionMode: true
|
||||
exclude-urls:
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
// You might want to change the configurations to fit your preferences
|
||||
// For more information about the configurations, please refer to http://www.typescriptlang.org/docs/handbook/tsconfig-json.html
|
||||
{
|
||||
"_version": "9",
|
||||
"_version": "9.1",
|
||||
"compilerOptions": {
|
||||
"sourceMap": true,
|
||||
"jsx": "react-jsx",
|
||||
|
||||
15
acrarium/types.d.ts
vendored
15
acrarium/types.d.ts
vendored
@@ -3,8 +3,15 @@
|
||||
// This is needed for TypeScript compiler to declare and export as a TypeScript module.
|
||||
// It is recommended to commit this file to the VCS.
|
||||
// You might want to change the configurations to fit your preferences
|
||||
declare module '*.css' {
|
||||
import { CSSResultGroup } from 'lit';
|
||||
const content: CSSResultGroup;
|
||||
export default content;
|
||||
declare module '*.css?inline' {
|
||||
import type { CSSResultGroup } from 'lit';
|
||||
const content: CSSResultGroup;
|
||||
export default content;
|
||||
}
|
||||
|
||||
// Allow any CSS Custom Properties
|
||||
declare module 'csstype' {
|
||||
interface Properties {
|
||||
[index: `--${string}`]: any;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,8 +2,8 @@ import { UserConfigFn } from 'vite';
|
||||
import { overrideVaadinConfig } from './vite.generated';
|
||||
|
||||
const customConfig: UserConfigFn = (env) => ({
|
||||
// Here you can add custom Vite parameters
|
||||
// https://vitejs.dev/config/
|
||||
// Here you can add custom Vite parameters
|
||||
// https://vitejs.dev/config/
|
||||
});
|
||||
|
||||
export default overrideVaadinConfig(customConfig);
|
||||
|
||||
@@ -2,10 +2,10 @@
|
||||
kotlin = "2.0.20"
|
||||
dokka = "1.9.20"
|
||||
springBoot = "3.3.3"
|
||||
vaadin-base = "24.1.16"
|
||||
vaadin-base = "24.5.8"
|
||||
kotlinPoet = "1.18.1"
|
||||
testContainers = "1.20.1"
|
||||
jooq = "3.18.5"
|
||||
jooq = "3.19.10"
|
||||
karibu = "2.1.6"
|
||||
|
||||
[libraries]
|
||||
|
||||
@@ -23,6 +23,7 @@ dependencyResolutionManagement {
|
||||
versionCatalogs {
|
||||
generate("springLibs") {
|
||||
from(toml("spring-boot-bom"))
|
||||
propertyOverrides = mapOf("jooq.version" to versionRef("jooq"))
|
||||
}
|
||||
generate("vaadinLibs") {
|
||||
from(toml("vaadin-base-bom"))
|
||||
|
||||
Reference in New Issue
Block a user