Compare commits
10 Commits
Author | SHA1 | Date | |
---|---|---|---|
8d628d3285 | |||
681de01143 | |||
070d894ea6 | |||
6a6d782288 | |||
ec1660cab5 | |||
5f182ba435 | |||
f73df83768 | |||
0b09f3f61c | |||
d2e0a55a13 | |||
fb1fc7fa6b |
36
package-lock.json
generated
36
package-lock.json
generated
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@designestate/dees-wcctools",
|
||||
"version": "1.0.25",
|
||||
"version": "1.0.30",
|
||||
"lockfileVersion": 1,
|
||||
"requires": true,
|
||||
"dependencies": {
|
||||
@ -1057,27 +1057,26 @@
|
||||
}
|
||||
},
|
||||
"@designestate/dees-domtools": {
|
||||
"version": "1.0.23",
|
||||
"resolved": "https://verdaccio.lossless.one/@designestate%2fdees-domtools/-/dees-domtools-1.0.23.tgz",
|
||||
"integrity": "sha512-mYpI43fxQeQxAEsUlA3otrQDZBaQTDZtBKQG1Wgfco6EjWbp+hsBm9jPDXgFV77waBFCsu6p84GxMI6fAH7kUA==",
|
||||
"version": "1.0.26",
|
||||
"resolved": "https://verdaccio.lossless.one/@designestate%2fdees-domtools/-/dees-domtools-1.0.26.tgz",
|
||||
"integrity": "sha512-EubzqqBQeKZ1f9tRg0QaYygDnsrwlzp8pbAYMfPFlorsAG8JxzrBElnOnd2sBkJOnCT8toNJ6UTH8TtC1G//iQ==",
|
||||
"requires": {
|
||||
"@pushrocks/lik": "^4.0.12",
|
||||
"@pushrocks/lik": "^4.0.13",
|
||||
"@pushrocks/smartpromise": "^3.0.6",
|
||||
"@pushrocks/smartstate": "^1.0.16",
|
||||
"lit-element": "^2.3.1"
|
||||
},
|
||||
"dependencies": {
|
||||
"@pushrocks/lik": {
|
||||
"version": "4.0.12",
|
||||
"resolved": "https://verdaccio.lossless.one/@pushrocks%2flik/-/lik-4.0.12.tgz",
|
||||
"integrity": "sha512-ffd3bJL+kMuhXDulO5VC5OqgfhZR3I4HoVN7IBLlN1z6Dco6j4NFrp+/GKDoPssFPNQY4okv+N4Hm2T/7t+4CQ==",
|
||||
"version": "4.0.13",
|
||||
"resolved": "https://verdaccio.lossless.one/@pushrocks%2flik/-/lik-4.0.13.tgz",
|
||||
"integrity": "sha512-Nde8rq1DjaDCREKlGGY/zS8g+eFu4zSU2jrbO4DdtYD+9oiauBMz2jzao3fr8401XpNW1Ex8T8FPdjUW8lUMow==",
|
||||
"requires": {
|
||||
"@pushrocks/smartdelay": "^2.0.9",
|
||||
"@pushrocks/smartmatch": "^1.0.7",
|
||||
"@pushrocks/smartpromise": "^3.0.6",
|
||||
"@pushrocks/smartrx": "^2.0.15",
|
||||
"@pushrocks/smarttime": "^3.0.18",
|
||||
"@pushrocks/smartunique": "^3.0.3",
|
||||
"@types/minimatch": "^3.0.3",
|
||||
"symbol-tree": "^3.2.4"
|
||||
}
|
||||
@ -2203,9 +2202,9 @@
|
||||
}
|
||||
},
|
||||
"@pushrocks/smartdelay": {
|
||||
"version": "2.0.6",
|
||||
"resolved": "https://verdaccio.lossless.one/@pushrocks%2fsmartdelay/-/smartdelay-2.0.6.tgz",
|
||||
"integrity": "sha512-4wUnzWNhRPODpaaL5GuRaje/C5dg+TMhBxmr57PKc2fqYpy6azWJwonf/s5xpcbJLCPJRbj1x8M5MqgCFq2uvg==",
|
||||
"version": "2.0.9",
|
||||
"resolved": "https://verdaccio.lossless.one/@pushrocks%2fsmartdelay/-/smartdelay-2.0.9.tgz",
|
||||
"integrity": "sha512-aVZJit1wq4fBG6ft2LJSPEnNbLSbRUuwNYggSeDqLtY7mXvAQmu4SIsXx18gfOtf69CoZR36RY3ff/IJv62C7w==",
|
||||
"requires": {
|
||||
"@pushrocks/smartpromise": "^3.0.6"
|
||||
}
|
||||
@ -2463,16 +2462,15 @@
|
||||
},
|
||||
"dependencies": {
|
||||
"@pushrocks/lik": {
|
||||
"version": "4.0.12",
|
||||
"resolved": "https://verdaccio.lossless.one/@pushrocks%2flik/-/lik-4.0.12.tgz",
|
||||
"integrity": "sha512-ffd3bJL+kMuhXDulO5VC5OqgfhZR3I4HoVN7IBLlN1z6Dco6j4NFrp+/GKDoPssFPNQY4okv+N4Hm2T/7t+4CQ==",
|
||||
"version": "4.0.13",
|
||||
"resolved": "https://verdaccio.lossless.one/@pushrocks%2flik/-/lik-4.0.13.tgz",
|
||||
"integrity": "sha512-Nde8rq1DjaDCREKlGGY/zS8g+eFu4zSU2jrbO4DdtYD+9oiauBMz2jzao3fr8401XpNW1Ex8T8FPdjUW8lUMow==",
|
||||
"requires": {
|
||||
"@pushrocks/smartdelay": "^2.0.9",
|
||||
"@pushrocks/smartmatch": "^1.0.7",
|
||||
"@pushrocks/smartpromise": "^3.0.6",
|
||||
"@pushrocks/smartrx": "^2.0.15",
|
||||
"@pushrocks/smarttime": "^3.0.18",
|
||||
"@pushrocks/smartunique": "^3.0.3",
|
||||
"@types/minimatch": "^3.0.3",
|
||||
"symbol-tree": "^3.2.4"
|
||||
}
|
||||
@ -4551,9 +4549,9 @@
|
||||
}
|
||||
},
|
||||
"dayjs": {
|
||||
"version": "1.8.27",
|
||||
"resolved": "https://verdaccio.lossless.one/dayjs/-/dayjs-1.8.27.tgz",
|
||||
"integrity": "sha512-Jpa2acjWIeOkg8KURUHICk0EqnEFSSF5eMEscsOgyJ92ZukXwmpmRkPSUka7KHSfbj5eKH30ieosYip+ky9emQ=="
|
||||
"version": "1.8.28",
|
||||
"resolved": "https://verdaccio.lossless.one/dayjs/-/dayjs-1.8.28.tgz",
|
||||
"integrity": "sha512-ccnYgKC0/hPSGXxj7Ju6AV/BP4HUkXC2u15mikXT5mX9YorEaoi1bEKOmAqdkJHN4EEkmAf97SpH66Try5Mbeg=="
|
||||
},
|
||||
"deasync": {
|
||||
"version": "0.1.20",
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@designestate/dees-wcctools",
|
||||
"version": "1.0.25",
|
||||
"version": "1.0.30",
|
||||
"private": false,
|
||||
"description": "wcc tools for creating element catalogues",
|
||||
"main": "dist_ts_web/index.js",
|
||||
@ -13,8 +13,9 @@
|
||||
"author": "Lossless GmbH",
|
||||
"license": "UNLICENSED",
|
||||
"dependencies": {
|
||||
"@designestate/dees-domtools": "^1.0.23",
|
||||
"@designestate/dees-domtools": "^1.0.26",
|
||||
"@gitzone/tsrun": "^1.1.17",
|
||||
"@pushrocks/smartdelay": "^2.0.9",
|
||||
"@pushrocks/smartexpress": "^3.0.10",
|
||||
"lit-element": "^2.0.0-rc.5",
|
||||
"lit-html": "^1.0.0-rc.2",
|
||||
|
@ -1,6 +1,6 @@
|
||||
import { LitElement, property, html, customElement, TemplateResult } from 'lit-element';
|
||||
|
||||
import * as deesDomtools from '@designestate/dees-domtools';
|
||||
import * as plugins from '../wcctools.plugins';
|
||||
|
||||
import { WccDefaultElement } from './wcc-defaultelement';
|
||||
|
||||
@ -12,13 +12,10 @@ import './wcc-properties';
|
||||
@customElement('wcc-dashboard')
|
||||
export class WccDashboard extends LitElement {
|
||||
@property()
|
||||
public selectedItem: TemplateResult | LitElement = WccDefaultElement as any;
|
||||
public selectedItem: TemplateResult | LitElement;
|
||||
|
||||
@property()
|
||||
public selectedInstance;
|
||||
|
||||
@property()
|
||||
public selectedViewport: deesDomtools.breakpoints.TViewport = 'desktop';
|
||||
public selectedViewport: plugins.deesDomtools.breakpoints.TViewport = 'desktop';
|
||||
|
||||
@property()
|
||||
public pages: { [key: string]: TemplateResult } = {};
|
||||
@ -57,7 +54,7 @@ export class WccDashboard extends LitElement {
|
||||
<wcc-sidebar .pages=${this.pages} .elements=${this.elements} @selectedItem=${eventArg => {
|
||||
this.selectedItem = eventArg.detail;
|
||||
}}></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}>
|
||||
${(() => {
|
||||
if (this.selectedItem instanceof TemplateResult) {
|
||||
@ -77,20 +74,19 @@ export class WccDashboard extends LitElement {
|
||||
return html`${anonItem.demo()}`;
|
||||
} else {
|
||||
this.selectedItem = WccDefaultElement as any;
|
||||
this.updateSlot();
|
||||
}
|
||||
})()}
|
||||
</wcc-frame>
|
||||
${this.selectedViewport}
|
||||
`;
|
||||
}
|
||||
|
||||
public async updateSlot() {
|
||||
console.log('updateSlot');
|
||||
const oldSelectedItem = this.selectedItem;
|
||||
this.selectedItem = null;
|
||||
const domtools = await deesDomtools.DomTools.setupDomTools();
|
||||
const domtools = await plugins.deesDomtools.DomTools.setupDomTools();
|
||||
domtools.setVirtualViewport(this.selectedViewport);
|
||||
this.selectedItem = oldSelectedItem;
|
||||
await plugins.smartdelay.delayFor(0);
|
||||
super.performUpdate();
|
||||
}
|
||||
|
||||
public setWarning(warningTextArg: string) {
|
||||
|
@ -5,9 +5,6 @@ import { TemplateResult } from 'lit-html';
|
||||
export class WccDefaultElement extends LitElement {
|
||||
public static demo = () => html`<wcc-defaultelement></wcc-defaultelement>`;
|
||||
|
||||
@property()
|
||||
public footerText = `Lossless GmbH - 2018`;
|
||||
|
||||
constructor() {
|
||||
super();
|
||||
|
||||
|
@ -1,11 +1,6 @@
|
||||
import { LitElement, property, html, customElement, TemplateResult } from 'lit-element';
|
||||
|
||||
const breakpoints = {
|
||||
desktop: 1240,
|
||||
tablet: 700,
|
||||
phablet: 500,
|
||||
phone: 340,
|
||||
};
|
||||
import * as domtools from '@designestate/dees-domtools';
|
||||
|
||||
@customElement('wcc-frame')
|
||||
export class WccFrame extends LitElement {
|
||||
@ -33,19 +28,26 @@ export class WccFrame extends LitElement {
|
||||
`;
|
||||
case 'tablet':
|
||||
return `
|
||||
padding: 0px ${(document.body.clientWidth - 200 - breakpoints.tablet) / 2}px;
|
||||
padding: 0px ${
|
||||
(document.body.clientWidth - 200 - domtools.breakpoints.tablet) / 2
|
||||
}px;
|
||||
`;
|
||||
case 'phablet':
|
||||
return `
|
||||
padding: 0px ${(document.body.clientWidth - 200 - breakpoints.phablet) / 2}px;
|
||||
padding: 0px ${
|
||||
(document.body.clientWidth - 200 - domtools.breakpoints.phablet) / 2
|
||||
}px;
|
||||
`;
|
||||
case 'phone':
|
||||
return `
|
||||
padding: 0px ${(document.body.clientWidth - 200 - breakpoints.phone) / 2}px;
|
||||
padding: 0px ${
|
||||
(document.body.clientWidth - 200 - domtools.breakpoints.phone) / 2
|
||||
}px;
|
||||
`;
|
||||
}
|
||||
})()}
|
||||
}
|
||||
|
||||
.viewport {
|
||||
position: relative;
|
||||
${this.viewport !== 'desktop'
|
||||
|
@ -13,9 +13,6 @@ export class WccProperties extends LitElement {
|
||||
@property()
|
||||
public selectedItem: TemplateResult | LitElement;
|
||||
|
||||
@property()
|
||||
public selectedInstance;
|
||||
|
||||
@property()
|
||||
public selectedViewport = 'native';
|
||||
|
||||
@ -126,15 +123,7 @@ export class WccProperties extends LitElement {
|
||||
returnArray.push(
|
||||
html`
|
||||
<div class="property">
|
||||
${key} / ${classProperties.get(key).type.name} /
|
||||
<pre>
|
||||
${(() => {
|
||||
const result = this.selectedInstance
|
||||
? JSON.stringify(this.selectedInstance[key], null, 2)
|
||||
: null;
|
||||
return result;
|
||||
})()}</pre
|
||||
>
|
||||
${key} / ${classProperties.get(key).type.name}
|
||||
</div>
|
||||
`
|
||||
);
|
||||
|
11
ts_web/wcctools.plugins.ts
Normal file
11
ts_web/wcctools.plugins.ts
Normal file
@ -0,0 +1,11 @@
|
||||
import * as smartdelay from '@pushrocks/smartdelay';
|
||||
|
||||
export {
|
||||
smartdelay
|
||||
};
|
||||
|
||||
import * as deesDomtools from '@designestate/dees-domtools';
|
||||
|
||||
export {
|
||||
deesDomtools
|
||||
};
|
Reference in New Issue
Block a user