Compare commits
12 Commits
Author | SHA1 | Date | |
---|---|---|---|
8d628d3285 | |||
681de01143 | |||
070d894ea6 | |||
6a6d782288 | |||
ec1660cab5 | |||
5f182ba435 | |||
f73df83768 | |||
0b09f3f61c | |||
d2e0a55a13 | |||
fb1fc7fa6b | |||
374a3c58c4 | |||
b36846737b |
36
package-lock.json
generated
36
package-lock.json
generated
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@designestate/dees-wcctools",
|
"name": "@designestate/dees-wcctools",
|
||||||
"version": "1.0.24",
|
"version": "1.0.30",
|
||||||
"lockfileVersion": 1,
|
"lockfileVersion": 1,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
@ -1057,27 +1057,26 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"@designestate/dees-domtools": {
|
"@designestate/dees-domtools": {
|
||||||
"version": "1.0.21",
|
"version": "1.0.26",
|
||||||
"resolved": "https://verdaccio.lossless.one/@designestate%2fdees-domtools/-/dees-domtools-1.0.21.tgz",
|
"resolved": "https://verdaccio.lossless.one/@designestate%2fdees-domtools/-/dees-domtools-1.0.26.tgz",
|
||||||
"integrity": "sha512-oT8f0vjxitSUn+452u3IZj8D9zQGMh7POw+zH1bGLrlmhHrh+b9hshLyMIec6gjNejAa+HSp+3pyxSALfq0wiQ==",
|
"integrity": "sha512-EubzqqBQeKZ1f9tRg0QaYygDnsrwlzp8pbAYMfPFlorsAG8JxzrBElnOnd2sBkJOnCT8toNJ6UTH8TtC1G//iQ==",
|
||||||
"requires": {
|
"requires": {
|
||||||
"@pushrocks/lik": "^4.0.12",
|
"@pushrocks/lik": "^4.0.13",
|
||||||
"@pushrocks/smartpromise": "^3.0.6",
|
"@pushrocks/smartpromise": "^3.0.6",
|
||||||
"@pushrocks/smartstate": "^1.0.16",
|
"@pushrocks/smartstate": "^1.0.16",
|
||||||
"lit-element": "^2.3.1"
|
"lit-element": "^2.3.1"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@pushrocks/lik": {
|
"@pushrocks/lik": {
|
||||||
"version": "4.0.12",
|
"version": "4.0.13",
|
||||||
"resolved": "https://verdaccio.lossless.one/@pushrocks%2flik/-/lik-4.0.12.tgz",
|
"resolved": "https://verdaccio.lossless.one/@pushrocks%2flik/-/lik-4.0.13.tgz",
|
||||||
"integrity": "sha512-ffd3bJL+kMuhXDulO5VC5OqgfhZR3I4HoVN7IBLlN1z6Dco6j4NFrp+/GKDoPssFPNQY4okv+N4Hm2T/7t+4CQ==",
|
"integrity": "sha512-Nde8rq1DjaDCREKlGGY/zS8g+eFu4zSU2jrbO4DdtYD+9oiauBMz2jzao3fr8401XpNW1Ex8T8FPdjUW8lUMow==",
|
||||||
"requires": {
|
"requires": {
|
||||||
"@pushrocks/smartdelay": "^2.0.9",
|
"@pushrocks/smartdelay": "^2.0.9",
|
||||||
"@pushrocks/smartmatch": "^1.0.7",
|
"@pushrocks/smartmatch": "^1.0.7",
|
||||||
"@pushrocks/smartpromise": "^3.0.6",
|
"@pushrocks/smartpromise": "^3.0.6",
|
||||||
"@pushrocks/smartrx": "^2.0.15",
|
"@pushrocks/smartrx": "^2.0.15",
|
||||||
"@pushrocks/smarttime": "^3.0.18",
|
"@pushrocks/smarttime": "^3.0.18",
|
||||||
"@pushrocks/smartunique": "^3.0.3",
|
|
||||||
"@types/minimatch": "^3.0.3",
|
"@types/minimatch": "^3.0.3",
|
||||||
"symbol-tree": "^3.2.4"
|
"symbol-tree": "^3.2.4"
|
||||||
}
|
}
|
||||||
@ -2203,9 +2202,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"@pushrocks/smartdelay": {
|
"@pushrocks/smartdelay": {
|
||||||
"version": "2.0.6",
|
"version": "2.0.9",
|
||||||
"resolved": "https://verdaccio.lossless.one/@pushrocks%2fsmartdelay/-/smartdelay-2.0.6.tgz",
|
"resolved": "https://verdaccio.lossless.one/@pushrocks%2fsmartdelay/-/smartdelay-2.0.9.tgz",
|
||||||
"integrity": "sha512-4wUnzWNhRPODpaaL5GuRaje/C5dg+TMhBxmr57PKc2fqYpy6azWJwonf/s5xpcbJLCPJRbj1x8M5MqgCFq2uvg==",
|
"integrity": "sha512-aVZJit1wq4fBG6ft2LJSPEnNbLSbRUuwNYggSeDqLtY7mXvAQmu4SIsXx18gfOtf69CoZR36RY3ff/IJv62C7w==",
|
||||||
"requires": {
|
"requires": {
|
||||||
"@pushrocks/smartpromise": "^3.0.6"
|
"@pushrocks/smartpromise": "^3.0.6"
|
||||||
}
|
}
|
||||||
@ -2463,16 +2462,15 @@
|
|||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@pushrocks/lik": {
|
"@pushrocks/lik": {
|
||||||
"version": "4.0.12",
|
"version": "4.0.13",
|
||||||
"resolved": "https://verdaccio.lossless.one/@pushrocks%2flik/-/lik-4.0.12.tgz",
|
"resolved": "https://verdaccio.lossless.one/@pushrocks%2flik/-/lik-4.0.13.tgz",
|
||||||
"integrity": "sha512-ffd3bJL+kMuhXDulO5VC5OqgfhZR3I4HoVN7IBLlN1z6Dco6j4NFrp+/GKDoPssFPNQY4okv+N4Hm2T/7t+4CQ==",
|
"integrity": "sha512-Nde8rq1DjaDCREKlGGY/zS8g+eFu4zSU2jrbO4DdtYD+9oiauBMz2jzao3fr8401XpNW1Ex8T8FPdjUW8lUMow==",
|
||||||
"requires": {
|
"requires": {
|
||||||
"@pushrocks/smartdelay": "^2.0.9",
|
"@pushrocks/smartdelay": "^2.0.9",
|
||||||
"@pushrocks/smartmatch": "^1.0.7",
|
"@pushrocks/smartmatch": "^1.0.7",
|
||||||
"@pushrocks/smartpromise": "^3.0.6",
|
"@pushrocks/smartpromise": "^3.0.6",
|
||||||
"@pushrocks/smartrx": "^2.0.15",
|
"@pushrocks/smartrx": "^2.0.15",
|
||||||
"@pushrocks/smarttime": "^3.0.18",
|
"@pushrocks/smarttime": "^3.0.18",
|
||||||
"@pushrocks/smartunique": "^3.0.3",
|
|
||||||
"@types/minimatch": "^3.0.3",
|
"@types/minimatch": "^3.0.3",
|
||||||
"symbol-tree": "^3.2.4"
|
"symbol-tree": "^3.2.4"
|
||||||
}
|
}
|
||||||
@ -4551,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",
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@designestate/dees-wcctools",
|
"name": "@designestate/dees-wcctools",
|
||||||
"version": "1.0.24",
|
"version": "1.0.30",
|
||||||
"private": false,
|
"private": false,
|
||||||
"description": "wcc tools for creating element catalogues",
|
"description": "wcc tools for creating element catalogues",
|
||||||
"main": "dist_ts_web/index.js",
|
"main": "dist_ts_web/index.js",
|
||||||
@ -13,8 +13,9 @@
|
|||||||
"author": "Lossless GmbH",
|
"author": "Lossless GmbH",
|
||||||
"license": "UNLICENSED",
|
"license": "UNLICENSED",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@designestate/dees-domtools": "^1.0.21",
|
"@designestate/dees-domtools": "^1.0.26",
|
||||||
"@gitzone/tsrun": "^1.1.17",
|
"@gitzone/tsrun": "^1.1.17",
|
||||||
|
"@pushrocks/smartdelay": "^2.0.9",
|
||||||
"@pushrocks/smartexpress": "^3.0.10",
|
"@pushrocks/smartexpress": "^3.0.10",
|
||||||
"lit-element": "^2.0.0-rc.5",
|
"lit-element": "^2.0.0-rc.5",
|
||||||
"lit-html": "^1.0.0-rc.2",
|
"lit-html": "^1.0.0-rc.2",
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
import { LitElement, property, html, customElement, TemplateResult } from 'lit-element';
|
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';
|
import { WccDefaultElement } from './wcc-defaultelement';
|
||||||
|
|
||||||
@ -12,13 +12,10 @@ 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()
|
@property()
|
||||||
public selectedInstance;
|
public selectedViewport: plugins.deesDomtools.breakpoints.TViewport = 'desktop';
|
||||||
|
|
||||||
@property()
|
|
||||||
public selectedViewport: deesDomtools.breakpoints.TViewport = 'desktop';
|
|
||||||
|
|
||||||
@property()
|
@property()
|
||||||
public pages: { [key: string]: TemplateResult } = {};
|
public pages: { [key: string]: TemplateResult } = {};
|
||||||
@ -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,20 +74,19 @@ 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>
|
||||||
${this.selectedViewport}
|
|
||||||
`;
|
`;
|
||||||
}
|
}
|
||||||
|
|
||||||
public async updateSlot() {
|
public async updateSlot() {
|
||||||
console.log('updateSlot');
|
console.log('updateSlot');
|
||||||
const oldSelectedItem = this.selectedItem;
|
const domtools = await plugins.deesDomtools.DomTools.setupDomTools();
|
||||||
this.selectedItem = null;
|
|
||||||
const domtools = await deesDomtools.DomTools.setupDomTools();
|
|
||||||
domtools.setVirtualViewport(this.selectedViewport);
|
domtools.setVirtualViewport(this.selectedViewport);
|
||||||
this.selectedItem = oldSelectedItem;
|
await plugins.smartdelay.delayFor(0);
|
||||||
|
super.performUpdate();
|
||||||
}
|
}
|
||||||
|
|
||||||
public setWarning(warningTextArg: string) {
|
public setWarning(warningTextArg: string) {
|
||||||
|
@ -5,9 +5,6 @@ import { TemplateResult } from 'lit-html';
|
|||||||
export class WccDefaultElement extends LitElement {
|
export class WccDefaultElement extends LitElement {
|
||||||
public static demo = () => html`<wcc-defaultelement></wcc-defaultelement>`;
|
public static demo = () => html`<wcc-defaultelement></wcc-defaultelement>`;
|
||||||
|
|
||||||
@property()
|
|
||||||
public footerText = `Lossless GmbH - 2018`;
|
|
||||||
|
|
||||||
constructor() {
|
constructor() {
|
||||||
super();
|
super();
|
||||||
|
|
||||||
|
@ -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,19 +28,26 @@ 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;
|
||||||
`;
|
`;
|
||||||
}
|
}
|
||||||
})()}
|
})()}
|
||||||
}
|
}
|
||||||
|
|
||||||
.viewport {
|
.viewport {
|
||||||
position: relative;
|
position: relative;
|
||||||
${this.viewport !== 'desktop'
|
${this.viewport !== 'desktop'
|
||||||
|
@ -13,9 +13,6 @@ export class WccProperties extends LitElement {
|
|||||||
@property()
|
@property()
|
||||||
public selectedItem: TemplateResult | LitElement;
|
public selectedItem: TemplateResult | LitElement;
|
||||||
|
|
||||||
@property()
|
|
||||||
public selectedInstance;
|
|
||||||
|
|
||||||
@property()
|
@property()
|
||||||
public selectedViewport = 'native';
|
public selectedViewport = 'native';
|
||||||
|
|
||||||
@ -126,15 +123,7 @@ export class WccProperties extends LitElement {
|
|||||||
returnArray.push(
|
returnArray.push(
|
||||||
html`
|
html`
|
||||||
<div class="property">
|
<div class="property">
|
||||||
${key} / ${classProperties.get(key).type.name} /
|
${key} / ${classProperties.get(key).type.name}
|
||||||
<pre>
|
|
||||||
${(() => {
|
|
||||||
const result = this.selectedInstance
|
|
||||||
? JSON.stringify(this.selectedInstance[key], null, 2)
|
|
||||||
: null;
|
|
||||||
return result;
|
|
||||||
})()}</pre
|
|
||||||
>
|
|
||||||
</div>
|
</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