fix(core): update

This commit is contained in:
Philipp Kunz 2020-06-01 13:18:51 +00:00
parent f73df83768
commit 5f182ba435
4 changed files with 20 additions and 21 deletions

12
package-lock.json generated
View File

@ -1057,9 +1057,9 @@
} }
}, },
"@designestate/dees-domtools": { "@designestate/dees-domtools": {
"version": "1.0.25", "version": "1.0.26",
"resolved": "https://verdaccio.lossless.one/@designestate%2fdees-domtools/-/dees-domtools-1.0.25.tgz", "resolved": "https://verdaccio.lossless.one/@designestate%2fdees-domtools/-/dees-domtools-1.0.26.tgz",
"integrity": "sha512-JCsO/w6T6d4Jcp/C+ctQ99zzKrwrNHp265tzPaP8pfsy/LO6gN2C2wQ72+0fImDDvaZszd0NbUS4kt1LFQdvFg==", "integrity": "sha512-EubzqqBQeKZ1f9tRg0QaYygDnsrwlzp8pbAYMfPFlorsAG8JxzrBElnOnd2sBkJOnCT8toNJ6UTH8TtC1G//iQ==",
"requires": { "requires": {
"@pushrocks/lik": "^4.0.13", "@pushrocks/lik": "^4.0.13",
"@pushrocks/smartpromise": "^3.0.6", "@pushrocks/smartpromise": "^3.0.6",
@ -4549,9 +4549,9 @@
} }
}, },
"dayjs": { "dayjs": {
"version": "1.8.27", "version": "1.8.28",
"resolved": "https://verdaccio.lossless.one/dayjs/-/dayjs-1.8.27.tgz", "resolved": "https://verdaccio.lossless.one/dayjs/-/dayjs-1.8.28.tgz",
"integrity": "sha512-Jpa2acjWIeOkg8KURUHICk0EqnEFSSF5eMEscsOgyJ92ZukXwmpmRkPSUka7KHSfbj5eKH30ieosYip+ky9emQ==" "integrity": "sha512-ccnYgKC0/hPSGXxj7Ju6AV/BP4HUkXC2u15mikXT5mX9YorEaoi1bEKOmAqdkJHN4EEkmAf97SpH66Try5Mbeg=="
}, },
"deasync": { "deasync": {
"version": "0.1.20", "version": "0.1.20",

View File

@ -13,7 +13,7 @@
"author": "Lossless GmbH", "author": "Lossless GmbH",
"license": "UNLICENSED", "license": "UNLICENSED",
"dependencies": { "dependencies": {
"@designestate/dees-domtools": "^1.0.25", "@designestate/dees-domtools": "^1.0.26",
"@gitzone/tsrun": "^1.1.17", "@gitzone/tsrun": "^1.1.17",
"@pushrocks/smartexpress": "^3.0.10", "@pushrocks/smartexpress": "^3.0.10",
"lit-element": "^2.0.0-rc.5", "lit-element": "^2.0.0-rc.5",

View File

@ -12,10 +12,7 @@ import './wcc-properties';
@customElement('wcc-dashboard') @customElement('wcc-dashboard')
export class WccDashboard extends LitElement { export class WccDashboard extends LitElement {
@property() @property()
public selectedItem: TemplateResult | LitElement = WccDefaultElement as any; public selectedItem: TemplateResult | LitElement;
@property()
public selectedInstance;
@property() @property()
public selectedViewport: deesDomtools.breakpoints.TViewport = 'desktop'; public selectedViewport: deesDomtools.breakpoints.TViewport = 'desktop';
@ -57,7 +54,7 @@ export class WccDashboard extends LitElement {
<wcc-sidebar .pages=${this.pages} .elements=${this.elements} @selectedItem=${eventArg => { <wcc-sidebar .pages=${this.pages} .elements=${this.elements} @selectedItem=${eventArg => {
this.selectedItem = eventArg.detail; this.selectedItem = eventArg.detail;
}}></wcc-sidebar> }}></wcc-sidebar>
<wcc-properties .warning="${this.warning}" .selectedItem=${this.selectedItem} .selectedInstance=${this.selectedInstance} @selectedViewport=${eventArg => {this.selectedViewport = eventArg.detail; this.updateSlot();}}></wcc-properties> <wcc-properties .warning="${this.warning}" .selectedItem=${this.selectedItem} @selectedViewport=${eventArg => {this.selectedViewport = eventArg.detail; this.updateSlot();}}></wcc-properties>
<wcc-frame id="wccFrame" viewport=${this.selectedViewport}> <wcc-frame id="wccFrame" viewport=${this.selectedViewport}>
${(() => { ${(() => {
if (this.selectedItem instanceof TemplateResult) { if (this.selectedItem instanceof TemplateResult) {
@ -77,6 +74,7 @@ export class WccDashboard extends LitElement {
return html`${anonItem.demo()}`; return html`${anonItem.demo()}`;
} else { } else {
this.selectedItem = WccDefaultElement as any; this.selectedItem = WccDefaultElement as any;
this.updateSlot();
} }
})()} })()}
</wcc-frame> </wcc-frame>

View File

@ -1,11 +1,6 @@
import { LitElement, property, html, customElement, TemplateResult } from 'lit-element'; import { LitElement, property, html, customElement, TemplateResult } from 'lit-element';
const breakpoints = { import * as domtools from '@designestate/dees-domtools';
desktop: 1240,
tablet: 700,
phablet: 500,
phone: 340,
};
@customElement('wcc-frame') @customElement('wcc-frame')
export class WccFrame extends LitElement { export class WccFrame extends LitElement {
@ -33,15 +28,21 @@ export class WccFrame extends LitElement {
`; `;
case 'tablet': case 'tablet':
return ` return `
padding: 0px ${(document.body.clientWidth - 200 - breakpoints.tablet) / 2}px; padding: 0px ${
(document.body.clientWidth - 200 - domtools.breakpoints.tablet) / 2
}px;
`; `;
case 'phablet': case 'phablet':
return ` return `
padding: 0px ${(document.body.clientWidth - 200 - breakpoints.phablet) / 2}px; padding: 0px ${
(document.body.clientWidth - 200 - domtools.breakpoints.phablet) / 2
}px;
`; `;
case 'phone': case 'phone':
return ` return `
padding: 0px ${(document.body.clientWidth - 200 - breakpoints.phone) / 2}px; padding: 0px ${
(document.body.clientWidth - 200 - domtools.breakpoints.phone) / 2
}px;
`; `;
} }
})()} })()}